feat: add change log (#1734)

Co-authored-by: Himself65 <himself65@outlook.com>
This commit is contained in:
JimmFly
2023-03-31 04:17:36 +08:00
committed by GitHub
parent 91c32b6715
commit c9bd4e34b3
12 changed files with 292 additions and 49 deletions
+28
View File
@@ -29,3 +29,31 @@ test.describe('Open AFFiNE', () => {
expect(currentWorkspaceName).toEqual('New Workspace 2');
});
});
test.describe('AFFiNE change log', () => {
test('Open affine in first time after updated', async ({ page }) => {
await openHomePage(page);
const changeLogItem = page.locator('[data-testid=change-log]');
await expect(changeLogItem).toBeVisible();
const closeButton = page.locator('[data-testid=change-log-close-button]');
await closeButton.click();
await expect(changeLogItem).not.toBeVisible();
await page.goto('http://localhost:8080');
const currentChangeLogItem = page.locator('[data-testid=change-log]');
await expect(currentChangeLogItem).not.toBeVisible();
});
test('Click right-bottom corner change log icon', async ({ page }) => {
await openHomePage(page);
await waitMarkdownImported(page);
await page.locator('[data-testid=help-island]').click();
const editorRightBottomChangeLog = page.locator(
'[data-testid=right-bottom-change-log-icon]'
);
expect(await editorRightBottomChangeLog.isVisible()).toEqual(true);
await page.getByRole('link', { name: 'All pages' }).click();
const normalRightBottomChangeLog = page.locator(
'[data-testid=right-bottom-change-log-icon]'
);
expect(await normalRightBottomChangeLog.isVisible()).toEqual(true);
});
});
+18
View File
@@ -186,4 +186,22 @@ test.describe('Novice guidance for quick search', () => {
await page.locator('[data-testid=quick-search-got-it]').click();
await expect(quickSearchTips).not.toBeVisible();
});
test('After appearing once, it will not appear a second time', async ({
page,
}) => {
await openHomePage(page);
await waitMarkdownImported(page);
const quickSearchTips = page.locator('[data-testid=quick-search-tips]');
await expect(quickSearchTips).not.toBeVisible();
await page.getByTestId('sliderBar-arrowButton-collapse').click();
const sliderBarArea = page.getByTestId('sliderBar');
await expect(sliderBarArea).not.toBeVisible();
await expect(quickSearchTips).toBeVisible();
await page.locator('[data-testid=quick-search-got-it]').click();
await expect(quickSearchTips).not.toBeVisible();
await page.reload();
await page.locator('[data-testid=sliderBar-arrowButton-expand]').click();
await page.getByTestId('sliderBar-arrowButton-collapse').click();
await expect(quickSearchTips).not.toBeVisible();
});
});