Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mattcorner committed Feb 23, 2024
1 parent 4fb7b9a commit a7abdc0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/LoadErrorMessage/LoadErrorMessage.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ test("Renders the title", async ({ page }) => {

const title = page
.frameLocator('iframe[title="storybook-preview-iframe"]')
.getByText("Failed to load");
.getByText("Title");

await expect(title).toBeVisible();
});

test("Renders the action button", async ({ page }) => {
await page.goto(
"http://localhost:6006/?path=/story/card-loaderrormessage--default"
"http://localhost:6006/?path=/story/card-loaderrormessage--default&args=actionButtonText:Refresh"
);

const button = page
Expand All @@ -41,9 +41,9 @@ test('Does not render "View More Details" text if no details are provided', asyn
await expect(viewMoreDetailsText).toBeHidden();
});

test("Does not render image when showImg is false", async ({ page }) => {
test("Does not render image when image is none", async ({ page }) => {
await page.goto(
"http://localhost:6006/?path=/story/card-loaderrormessage--default&args=showImg:false"
"http://localhost:6006/?path=/story/card-loaderrormessage--default&args=image:none"
);

const frame = page.frameLocator('iframe[title="storybook-preview-iframe"]');
Expand Down

0 comments on commit a7abdc0

Please sign in to comment.