Skip to content

Commit

Permalink
Parallel project check.
Browse files Browse the repository at this point in the history
  • Loading branch information
amyjko committed Dec 1, 2024
1 parent 291356d commit 7dd36b4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 14 deletions.
6 changes: 3 additions & 3 deletions playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ export default defineConfig({
fullyParallel: !process.env.CI,
/* Fail the build on CI if you accidentally left test.only in the source code. */
forbidOnly: !!process.env.CI,
/* Retry on CI only */
retries: process.env.CI ? 2 : 0,
/* Retry once on CI, never locally */
retries: process.env.CI ? 1 : 0,
/* Opt out of parallel tests on CI. */
workers: process.env.CI ? 2 : undefined,
workers: process.env.CI ? 1 : undefined,
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
reporter: 'html',
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
Expand Down
18 changes: 7 additions & 11 deletions tests/end2end/project.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,17 @@ test('create project and visit its tiles ', async ({ page }) => {
// Wait for the URL redirect to the project.
await page.waitForURL(/\/project\/.+/);

// Expect an output view to be visible.
await expect(page.getByTestId('output')).toHaveCount(1);

// Expect to have an editor to be visible.
await expect(page.getByTestId('editor')).toHaveCount(1);

// Click to open the guide
await page.getByTestId('docs-toggle').click();

// Click to open the palette
await page.getByTestId('palette-toggle').click();

// Expect the guide to be visible.
await expect(page.getByTestId('documentation')).toBeVisible();

// // Expect the palette to be visible.
await expect(page.getByTestId('palette')).toBeVisible();
// Expect all four tiles to be visible.
await Promise.all([
expect(page.getByTestId('output')).toBeVisible(),
expect(page.getByTestId('editor')).toBeVisible(),
expect(page.getByTestId('documentation')).toBeVisible(),
expect(page.getByTestId('palette')).toBeVisible(),
]);
});

0 comments on commit 7dd36b4

Please sign in to comment.