Skip to content
This repository was archived by the owner on Sep 9, 2025. It is now read-only.

Commit 6a21f12

Browse files
committed
Using index signature to access index properties
1 parent dc59d20 commit 6a21f12

24 files changed

+53
-57
lines changed

__tests__/frontend/basic.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ test("works with basic configuration", async ({ page }) => {
77
const getCalls = await setup(page);
88

99
await page.evaluate(() => {
10-
window._endpointStubs.listSharedDrives = [
10+
window._endpointStubs["listSharedDrives"] = [
1111
{
1212
status: "success",
1313
value: { response: [], status: "success" },
@@ -17,7 +17,7 @@ test("works with basic configuration", async ({ page }) => {
1717
value: { response: [], status: "success" },
1818
},
1919
];
20-
window._endpointStubs.move = [
20+
window._endpointStubs["move"] = [
2121
{
2222
status: "success",
2323
value: { response: { errors: [] }, status: "success" },

__tests__/frontend/configuration.spec.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ test("works with copy configuration", async ({ page }) => {
77
const getCalls = await setup(page);
88

99
await page.evaluate(() => {
10-
window._endpointStubs.listSharedDrives = [
10+
window._endpointStubs["listSharedDrives"] = [
1111
{
1212
status: "success",
1313
value: { response: [], status: "success" },
@@ -17,7 +17,7 @@ test("works with copy configuration", async ({ page }) => {
1717
value: { response: [], status: "success" },
1818
},
1919
];
20-
window._endpointStubs.move = [
20+
window._endpointStubs["move"] = [
2121
{
2222
status: "success",
2323
value: { response: { errors: [] }, status: "success" },
@@ -53,7 +53,7 @@ test("works with merge configuration", async ({ page }) => {
5353
const getCalls = await setup(page);
5454

5555
await page.evaluate(() => {
56-
window._endpointStubs.listSharedDrives = [
56+
window._endpointStubs["listSharedDrives"] = [
5757
{
5858
status: "success",
5959
value: { response: [], status: "success" },
@@ -63,7 +63,7 @@ test("works with merge configuration", async ({ page }) => {
6363
value: { response: [], status: "success" },
6464
},
6565
];
66-
window._endpointStubs.move = [
66+
window._endpointStubs["move"] = [
6767
{
6868
status: "success",
6969
value: { response: { errors: [] }, status: "success" },

__tests__/frontend/destination-selection-api-error.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ test("handles raw errors in source folder selection gracefully", async ({
99
await setup(page);
1010

1111
await page.evaluate(() => {
12-
window._endpointStubs.listFolders = [
12+
window._endpointStubs["listFolders"] = [
1313
{
1414
status: "success",
1515
value: { status: "error", type: "DriveAPIError" },
1616
},
1717
];
18-
window._endpointStubs.listSharedDrives = [
18+
window._endpointStubs["listSharedDrives"] = [
1919
{
2020
status: "success",
2121
value: {

__tests__/frontend/destination-selection-invalid-parameter-error.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ test("handles raw errors in source folder selection gracefully", async ({
99
await setup(page);
1010

1111
await page.evaluate(() => {
12-
window._endpointStubs.listFolders = [
12+
window._endpointStubs["listFolders"] = [
1313
{
1414
status: "success",
1515
value: { status: "error", type: "invalidParameter" },
1616
},
1717
];
18-
window._endpointStubs.listSharedDrives = [
18+
window._endpointStubs["listSharedDrives"] = [
1919
{
2020
status: "success",
2121
value: {

__tests__/frontend/destination-selection-unhandled-error.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ test("handles raw errors in source folder selection gracefully", async ({
99
await setup(page);
1010

1111
await page.evaluate(() => {
12-
window._endpointStubs.listFolders = [
12+
window._endpointStubs["listFolders"] = [
1313
{
1414
status: "failure",
1515
value: new Error("ERROR MESSAGE"),
1616
},
1717
];
18-
window._endpointStubs.listSharedDrives = [
18+
window._endpointStubs["listSharedDrives"] = [
1919
{
2020
status: "success",
2121
value: {

__tests__/frontend/destination-selection-unknown-error.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ test("handles raw errors in source folder selection gracefully", async ({
99
await setup(page);
1010

1111
await page.evaluate(() => {
12-
window._endpointStubs.listFolders = [
12+
window._endpointStubs["listFolders"] = [
1313
{
1414
status: "success",
1515
value: { status: "error", type: "unknown" },
1616
},
1717
];
18-
window._endpointStubs.listSharedDrives = [
18+
window._endpointStubs["listSharedDrives"] = [
1919
{
2020
status: "success",
2121
value: {

__tests__/frontend/move-api-error.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ test("works with an API error", async ({ page }) => {
77
await setup(page);
88

99
await page.evaluate(() => {
10-
window._endpointStubs.listSharedDrives = [
10+
window._endpointStubs["listSharedDrives"] = [
1111
{
1212
status: "success",
1313
value: { response: [], status: "success" },
@@ -17,7 +17,7 @@ test("works with an API error", async ({ page }) => {
1717
value: { response: [], status: "success" },
1818
},
1919
];
20-
window._endpointStubs.move = [
20+
window._endpointStubs["move"] = [
2121
{
2222
status: "success",
2323
value: { status: "error", type: "DriveAPIError" },

__tests__/frontend/move-folders-equal-error.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ test("works with source and destination folders being equal", async ({
99
await setup(page);
1010

1111
await page.evaluate(() => {
12-
window._endpointStubs.listSharedDrives = [
12+
window._endpointStubs["listSharedDrives"] = [
1313
{
1414
status: "success",
1515
value: { response: [], status: "success" },
@@ -19,7 +19,7 @@ test("works with source and destination folders being equal", async ({
1919
value: { response: [], status: "success" },
2020
},
2121
];
22-
window._endpointStubs.move = [
22+
window._endpointStubs["move"] = [
2323
{
2424
status: "success",
2525
value: { status: "error", type: "sourceEqualsDestination" },

__tests__/frontend/move-invalid-parameter-error.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ test("works with an API error", async ({ page }) => {
77
await setup(page);
88

99
await page.evaluate(() => {
10-
window._endpointStubs.listSharedDrives = [
10+
window._endpointStubs["listSharedDrives"] = [
1111
{
1212
status: "success",
1313
value: { response: [], status: "success" },
@@ -17,7 +17,7 @@ test("works with an API error", async ({ page }) => {
1717
value: { response: [], status: "success" },
1818
},
1919
];
20-
window._endpointStubs.move = [
20+
window._endpointStubs["move"] = [
2121
{
2222
status: "success",
2323
value: { status: "error", type: "invalidParameter" },

__tests__/frontend/move-repeat-after-timeout.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ test("works with an unhandled move error", async ({ page }) => {
99
await page.evaluate(() => {
1010
const e = new Error();
1111
e.name = "ScriptError";
12-
window._endpointStubs.listSharedDrives = [
12+
window._endpointStubs["listSharedDrives"] = [
1313
{
1414
status: "success",
1515
value: { response: [], status: "success" },
@@ -19,7 +19,7 @@ test("works with an unhandled move error", async ({ page }) => {
1919
value: { response: [], status: "success" },
2020
},
2121
];
22-
window._endpointStubs.move = [
22+
window._endpointStubs["move"] = [
2323
{
2424
status: "failure",
2525
value: e,

0 commit comments

Comments
 (0)