mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 12:55:00 +00:00
fix: app sidebar ui issues (#3783)
Co-authored-by: Alex Yang <himself65@outlook.com>
This commit is contained in:
@@ -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')
|
||||
|
||||
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user