Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: make flow name required and update all contexts for passing e2e tests #3268

Merged
merged 3 commits into from
Jun 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion e2e/tests/ui-driven/src/context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export interface Context {
id?: string;
publishedId?: number;
slug: string;
name?: string;
name: string;
data?: object;
};
sessionIds?: string[];
Expand Down
1 change: 1 addition & 0 deletions e2e/tests/ui-driven/src/invite-to-pay/agent.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
...contextDefaults,
flow: {
slug: "invite-to-pay-test",
name: "Invite to pay test",
data: inviteToPayFlow,
},
sessionIds: [], // used to collect and clean up sessions
Expand Down Expand Up @@ -89,7 +90,7 @@
await page.getByText("Continue").click();
await page.getByLabel("email").fill(context.user.email);
await page.getByText("Continue").click();
await page.waitForLoadState("networkidle");

Check warning on line 93 in e2e/tests/ui-driven/src/invite-to-pay/agent.spec.ts

View workflow job for this annotation

GitHub Actions / E2E tests

Unexpected use of networkidle

await expect(toggleInviteToPayButton).toBeDisabled();
});
Expand Down
1 change: 1 addition & 0 deletions e2e/tests/ui-driven/src/invite-to-pay/nominee.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
...contextDefaults,
flow: {
slug: "invite-to-pay-test",
name: "Invite to pay test",
data: inviteToPayFlow,
},
sessionIds: [], // used to collect and clean up sessions
Expand Down Expand Up @@ -83,7 +84,7 @@
const invalidPaymentRequestURL = `/${context.team!.slug!}/${context.flow!
.slug!}/pay?analytics=false&paymentRequestId=INVALID-ID`;
await page.goto(invalidPaymentRequestURL);
await page.waitForLoadState("networkidle");

Check warning on line 87 in e2e/tests/ui-driven/src/invite-to-pay/nominee.spec.ts

View workflow job for this annotation

GitHub Actions / E2E tests

Unexpected use of networkidle

await expect(page.getByText(PAYMENT_NOT_FOUND_TEXT)).toBeVisible();
});
Expand All @@ -92,7 +93,7 @@
const invalidPaymentRequestURL = `/${context.team!.slug!}/${context.flow!
.slug!}/pay?analytics=false`;
await page.goto(invalidPaymentRequestURL);
await page.waitForLoadState("networkidle");

Check warning on line 96 in e2e/tests/ui-driven/src/invite-to-pay/nominee.spec.ts

View workflow job for this annotation

GitHub Actions / E2E tests

Unexpected use of networkidle

await expect(page.getByText(PAYMENT_NOT_FOUND_TEXT)).toBeVisible();
});
Expand Down Expand Up @@ -127,7 +128,7 @@
const paymentRequestURL = `/${context.team!.slug!}/${context.flow!
.slug!}/pay?analytics=false&paymentRequestId=${paymentRequest.id}`;
await page.goto(paymentRequestURL);
await page.waitForLoadState("networkidle");

Check warning on line 131 in e2e/tests/ui-driven/src/invite-to-pay/nominee.spec.ts

View workflow job for this annotation

GitHub Actions / E2E tests

Unexpected use of networkidle
}

async function setupPaymentRequest(
Expand Down
1 change: 1 addition & 0 deletions e2e/tests/ui-driven/src/pay.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ let context: Context = {
...contextDefaults,
flow: {
slug: "pay-test",
name: "Pay test",
data: payFlow,
},
sessionIds: [], // used to collect and clean up sessions
Expand Down
1 change: 1 addition & 0 deletions e2e/tests/ui-driven/src/save-and-return.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ test.describe("Save and return", () => {
...contextDefaults,
flow: {
slug: "e2e-save-and-return-test-flow",
name: "E2E Save and Return test flow",
data: simpleSendFlow,
},
};
Expand Down
1 change: 1 addition & 0 deletions e2e/tests/ui-driven/src/sections.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ test.describe("Section statuses", () => {
...contextDefaults,
flow: {
slug: "sections-test-flow",
name: "Sections test flow",
data: flow,
},
};
Expand Down
Loading