-
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 source selection API error test
- Loading branch information
1 parent
48e6172
commit e79bbf2
Showing
2 changed files
with
30 additions
and
17 deletions.
There are no files selected for viewing
30 changes: 30 additions & 0 deletions
30
__tests__/frontend-playwright/source-selection-api-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,30 @@ | ||
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: "success", | ||
value: { status: "error", type: "DriveAPIError" }, | ||
}, | ||
]; | ||
}); | ||
|
||
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("An error occurred in Google Drive"), | ||
).toBeVisible(); | ||
}); |
This file was deleted.
Oops, something went wrong.