-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ported destination selection unknown error test
- Loading branch information
1 parent
b789430
commit a7b2b4f
Showing
3 changed files
with
42 additions
and
30 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
__tests__/frontend-playwright/destination-selection-unhandled-error.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
__tests__/frontend-playwright/destination-selection-unknown-error.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
29
__tests__/frontend/destination-selection-unknown-error.cy.ts
This file was deleted.
Oops, something went wrong.