test: make workspace list tests stable

This commit is contained in:
tzhangchi
2023-02-08 17:48:03 +08:00
parent 4e1f812160
commit 6fa0820734
2 changed files with 7 additions and 5 deletions
+6 -2
View File
@@ -16,13 +16,17 @@ test.describe('Local first workspace list', () => {
).not.toBeNull();
});
test.skip('create one workspace in the workspace list', async ({ page }) => {
test('create one workspace in the workspace list', async ({ page }) => {
const newWorkspaceNameStr = 'New Workspace';
await createWorkspace({ name: newWorkspaceNameStr }, page);
// check new workspace name
const newWorkspaceName = page.getByTestId('workspace-name');
expect(await newWorkspaceName.textContent()).toBe(newWorkspaceNameStr);
await newWorkspaceName.click();
//check workspace list length
const workspaceCards = await page.$$('data-testid=workspace-card');
expect(workspaceCards.length).toBe(2);
});
test('create multi workspace in the workspace list', async ({ page }) => {