Skip to content

Commit

Permalink
Ported destination selection unknown error test
Browse files Browse the repository at this point in the history
  • Loading branch information
marekdedic committed Oct 21, 2023
1 parent b789430 commit a7b2b4f
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 30 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { expect, test } from "@playwright/test";

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

test.beforeEach(async ({ page }) => {
await page.goto("/");
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import { expect, test } from "@playwright/test";

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

test.beforeEach(async ({ page }) => {
await page.goto("/");
await setup(page);

await page.evaluate(() => {
window._endpointStubs.listFolders = {
status: "success",
value: { status: "error", type: "unknown" },
};
window._endpointStubs.listSharedDrives = {
status: "success",
value: {
status: "success",
response: [
{ id: "ID_DRIVE_1", name: "DRIVE 1" },
{ id: "ID_DRIVE_2", name: "DRIVE 2" },
],
},
};
});
});

test("handles raw errors in source folder selection gracefully", async ({
page,
}) => {
await expect(
page.getByText("Shared drive mover", { exact: true }),
).toBeVisible();
await page.getByText("Continue").click();
await page.getByText("DRIVE 1").click();
await page.getByText("Continue").click();
await page.getByText("DRIVE 2").dblclick();
await expect(
page.getByText("An error occurred", { exact: true }),
).toBeVisible();
await expect(page.getByText("An unknown error occurred")).toBeVisible();
});
29 changes: 0 additions & 29 deletions __tests__/frontend/destination-selection-unknown-error.cy.ts

This file was deleted.

0 comments on commit a7b2b4f

Please sign in to comment.