Skip to content

Commit

Permalink
Page reload
Browse files Browse the repository at this point in the history
  • Loading branch information
bmingles committed Nov 22, 2023
1 parent b70091a commit 21ea1d8
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions tests/styleguide.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,13 @@ test.beforeAll(async ({ browser }) => {
});

// Iterate over all sample sections and take a screenshot of each one.
test('UI regression test - Styleguide sections', async ({ context }) => {
test('UI regression test - Styleguide sections', async ({ page }) => {
for (let i = 0; i < sampleSectionIds.length; i += 1) {
const page = await context.newPage();

const id = sampleSectionIds[i];

// Isolate the section
await page.goto(`/ide/styleguide?isolateSection=true#${id}`);
await page.reload();

const sampleSection = page.locator(`#${id}`);

Expand All @@ -55,8 +54,6 @@ test('UI regression test - Styleguide sections', async ({ context }) => {
await expect(sampleSection).toHaveScreenshot(
`${id.replace(/^sample-section-/, '')}.png`
);

await page.close();
}
});

Expand Down

0 comments on commit 21ea1d8

Please sign in to comment.