feat: new workspace switch dropdown design (#3700)

Co-authored-by: Alex Yang <himself65@outlook.com>
This commit is contained in:
danielchim
2023-08-17 06:18:43 +08:00
committed by GitHub
parent f369ca39f7
commit 9ab9c0c70d
11 changed files with 368 additions and 192 deletions

View File

@@ -625,7 +625,7 @@ test('tooltips for all buttons should be visible when hovering', async ({
}
await locator.getByTestId('download-button').hover();
await page.waitForTimeout(2000);
await page.waitForTimeout(1000);
{
const element = await page.getByRole('tooltip');
const downloadTooltip = await element.getByText('Download').count();

View File

@@ -45,8 +45,7 @@ test('create one workspace in the workspace list', async ({
expect(workspaceCards.length).toBe(2);
//check page list length
const closeWorkspaceModal = page.getByTestId('close-workspace-modal');
await closeWorkspaceModal.click();
await page.keyboard.press('Escape');
await clickSideBarAllPageButton(page);
await page.waitForTimeout(1000);
const pageList = page.locator('[data-testid=page-list-item]');
@@ -91,6 +90,7 @@ test('create multi workspace in the workspace list', async ({
expect(currentWorkspace.flavour).toContain('local');
await openWorkspaceListModal(page);
await page.waitForTimeout(1000);
const sourceElement = page.getByTestId('draggable-item').nth(2);
const targetElement = page.getByTestId('draggable-item').nth(1);

View File

@@ -16,12 +16,14 @@ export async function createWorkspace(
await openWorkspaceListModal(page);
// open create workspace modal
await page.locator('.add-icon').click();
await page.getByTestId('new-workspace').click();
// input workspace name
await page.getByPlaceholder('Set a Workspace name').click();
await page.getByPlaceholder('Set a Workspace name').fill(params.name);
// click create button
return page.getByRole('button', { name: 'Create' }).click();
return page.getByRole('button', { name: 'Create' }).click({
delay: 500,
});
}