feat: add create workspace test (#914)

This commit is contained in:
DiamondThree
2023-02-09 16:28:01 +08:00
committed by GitHub
parent 5a93b26cc3
commit 3d6d8694ba
5 changed files with 20 additions and 2 deletions

View File

@@ -27,6 +27,21 @@ test.describe('Local first workspace list', () => {
//check workspace list length
const workspaceCards = await page.$$('data-testid=workspace-card');
expect(workspaceCards.length).toBe(2);
//check page list length
const closeWorkspaceModal = page.getByTestId('close-workspace-modal');
await closeWorkspaceModal.click();
const allPageButton = page.getByTestId('all-pages');
await allPageButton.click();
await page.waitForTimeout(1000);
const pageList = page.locator('[data-testid=page-list-item]');
const result = await pageList.count();
expect(result).toBe(1);
await page.reload();
await page.waitForTimeout(1000);
const pageList1 = page.locator('[data-testid=page-list-item]');
const result1 = await pageList1.count();
expect(result1).toBe(1);
});
test('create multi workspace in the workspace list', async ({ page }) => {