fix: app sidebar ui issues (#3783)

Co-authored-by: Alex Yang <himself65@outlook.com>
This commit is contained in:
Peng Xiao
2023-08-18 02:36:17 +08:00
committed by GitHub
parent 7a31089c4b
commit 068c697be9
19 changed files with 137 additions and 82 deletions

View File

@@ -53,12 +53,14 @@ test('Show collections items in sidebar', async ({ page }) => {
await first.getByTestId('fav-collapsed-button').click();
const collectionPage = collections.getByTestId('collection-page').nth(0);
expect(await collectionPage.textContent()).toBe('test page');
await collectionPage.hover();
await collectionPage.getByTestId('collection-page-options').click();
const deletePage = page
.getByTestId('collection-page-option')
.getByText('Delete');
await deletePage.click();
expect(await collections.getByTestId('collection-page').count()).toBe(0);
await first.hover();
await first.getByTestId('collection-options').click();
const deleteCollection = page
.getByTestId('collection-option')
@@ -76,6 +78,7 @@ test('pin and unpin collection', async ({ page }) => {
await page.waitForTimeout(50);
expect(await items.count()).toBe(1);
const first = items.first();
await first.hover();
await first.getByTestId('collection-options').click();
const deleteCollection = page
.getByTestId('collection-option')
@@ -99,6 +102,7 @@ test('edit collection', async ({ page }) => {
const items = collections.getByTestId('collection-item');
expect(await items.count()).toBe(1);
const first = items.first();
await first.hover();
await first.getByTestId('collection-options').click();
const editCollection = page
.getByTestId('collection-option')
@@ -117,6 +121,7 @@ test('edit collection and change filter date', async ({ page }) => {
const items = collections.getByTestId('collection-item');
expect(await items.count()).toBe(1);
const first = items.first();
await first.hover();
await first.getByTestId('collection-options').click();
const editCollection = page
.getByTestId('collection-option')

View File

@@ -122,7 +122,7 @@ test("Deleted page's reference will not be shown in sidebar", async ({
'[data-testid="fav-collapsed-button"]'
);
await expect(collapseButton).not.toBeVisible();
expect(collapseButton).toHaveAttribute('data-disabled', 'true');
const currentWorkspace = await workspace.current();
expect(currentWorkspace.flavour).toContain('local');