Skip to content

Commit

Permalink
Ported source selection unhandled error test
Browse files Browse the repository at this point in the history
  • Loading branch information
marekdedic committed Oct 22, 2023
1 parent e79bbf2 commit 1e5c0f6
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 17 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import { expect, test } from "@playwright/test";

import { setup } from "../test-utils-playwright/stub-endpoints";

test("handles raw errors in source folder selection gracefully", async ({
page,
}) => {
await page.goto("/");
await setup(page);

await page.evaluate(() => {
window._endpointStubs.listSharedDrives = [
{
status: "failure",
value: new Error("ERROR MESSAGE"),
},
];
});

await expect(
page.getByText("Shared drive mover", { exact: true }),
).toBeVisible();
await page.getByText("Continue").click();
await expect(
page.getByText("An error occurred", { exact: true }),
).toBeVisible();
await expect(page.getByText("ERROR MESSAGE")).toBeVisible();
});
17 changes: 0 additions & 17 deletions __tests__/frontend/source-selection-unhandled-error.cy.ts

This file was deleted.

0 comments on commit 1e5c0f6

Please sign in to comment.