test: coverage on enable public workspace (#1733)

This commit is contained in:
Himself65
2023-03-28 20:57:50 -05:00
committed by GitHub
parent f18127dfd6
commit 62955e7de4
5 changed files with 56 additions and 8 deletions

View File

@@ -38,6 +38,7 @@ export const EnableAffineCloudModal: React.FC<EnableAffineCloudModalProps> = ({
{/* <StyleTips>{t('Retain cached cloud data')}</StyleTips> */}
<div>
<StyleButton
data-testid="confirm-enable-affine-cloud-button"
shape="round"
type="primary"
onClick={() => {

View File

@@ -58,7 +58,12 @@ const PublishPanelAffine: React.FC<PublishPanelAffineProps> = ({
<Content weight="500">{t('Share with link')}</Content>
</Wrapper>
<FlexWrapper>
<Input width={582} value={shareUrl} disabled={true}></Input>
<Input
data-testid="share-url"
width={582}
value={shareUrl}
disabled={true}
></Input>
<Button
onClick={copyUrl}
type="light"
@@ -86,6 +91,7 @@ const PublishPanelAffine: React.FC<PublishPanelAffineProps> = ({
<>
<Wrapper marginBottom="42px">{t('Publishing Description')}</Wrapper>
<Button
data-testid="publish-to-web-button"
onClick={() => {
publishWorkspace(true);
}}
@@ -118,6 +124,7 @@ const PublishPanelLocal: React.FC<PublishPanelLocalProps> = ({
{t('Publishing')}
</Box>
<Button
data-testid="publish-enable-affine-cloud-button"
type="light"
shape="circle"
onClick={() => {