feat: new collections (#4530)

Co-authored-by: Peng Xiao <pengxiao@outlook.com>
This commit is contained in:
3720
2023-10-27 17:06:59 +08:00
committed by GitHub
parent 9fc0152cb1
commit ef8024c657
133 changed files with 8382 additions and 3743 deletions

View File

@@ -4,6 +4,7 @@ import {
clickNewPageButton,
clickPageMoreActions,
getBlockSuiteEditorTitle,
getPageOperationButton,
waitForEditorLoad,
} from '@affine-test/kit/utils/page-logic';
import { expect } from '@playwright/test';
@@ -18,9 +19,9 @@ test('New a page ,then open it and show delete modal', async ({
await getBlockSuiteEditorTitle(page).click();
await getBlockSuiteEditorTitle(page).fill('this is a new page to delete');
await page.getByTestId('all-pages').click();
const cell = page.getByRole('cell', {
name: 'this is a new page to delete',
});
const cell = page
.getByTestId('page-list-item')
.getByText('this is a new page to delete');
expect(cell).not.toBeUndefined();
await cell.click();
@@ -50,11 +51,7 @@ test('New a page ,then go to all pages and show delete modal', async ({
});
expect(cell).not.toBeUndefined();
await page
.getByTestId('more-actions-' + newPageId)
.getByRole('button')
.first()
.click();
await getPageOperationButton(page, newPageId).click();
const deleteBtn = page.getByTestId('move-to-trash');
await deleteBtn.click();
const confirmTip = page.getByText('Delete page?');