-
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.
First pass at revamping our purchase flow. Keep in mind this PR goes against a branch `fon/new-sdk-views`. I'd love feedback on what we have until now
- Loading branch information
1 parent
ef99bd6
commit e31050d
Showing
93 changed files
with
2,744 additions
and
2,828 deletions.
There are no files selected for viewing
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
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
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
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 |
---|---|---|
|
@@ -10,10 +10,6 @@ const RC_PAYWALL_TEST_OFFERING_ID_WITH_VARIABLES = | |
"rc_paywalls_e2e_test_variables_2"; | ||
|
||
test.describe("Main", () => { | ||
test.afterEach(({ browser }) => { | ||
browser.close(); | ||
}); | ||
|
||
test("Get offerings displays packages", async ({ browser, browserName }) => { | ||
const userId = getUserId(browserName); | ||
const page = await setupTest(browser, userId); | ||
|
@@ -210,11 +206,11 @@ test.describe("Main", () => { | |
}); | ||
|
||
[ | ||
["es", "Email de facturación"], | ||
["it", "Indirizzo email per la fatturazione"], | ||
["en", "Billing email address"], | ||
["fr", "Adresse e-mail de facturation"], | ||
["de", "E-Mail-Adresse für Rechnungsstellung"], | ||
["es", "¿Cuál es tu correo electrónico?"], | ||
["it", "Qual è la tua email?"], | ||
["en", "What's your email?"], | ||
["fr", "Quelle est votre adresse e-mail?"], | ||
["de", "Wie lautet Ihre E-Mail-Adresse?"], | ||
].forEach(([lang, title]) => { | ||
test(`Shows the purchase flow in ${lang}`, async ({ | ||
browser, | ||
|
@@ -234,11 +230,11 @@ test.describe("Main", () => { | |
}); | ||
|
||
[ | ||
["es", "Email de facturación"], | ||
["it", "Indirizzo email per la fatturazione"], | ||
["en", "Billing email address"], | ||
["fr", "Adresse e-mail de facturation"], | ||
["de", "E-Mail-Adresse für Rechnungsstellung"], | ||
["es", "¿Cuál es tu correo electrónico?"], | ||
["it", "Qual è la tua email?"], | ||
["en", "What's your email?"], | ||
["fr", "Quelle est votre adresse e-mail?"], | ||
["de", "Wie lautet Ihre E-Mail-Adresse?"], | ||
].forEach(([lang, title]) => { | ||
test(`Shows the purchase flow in ${lang} when purchasing from paywalls`, async ({ | ||
browser, | ||
|
@@ -284,9 +280,8 @@ async function performPurchase(page: Page, card: Locator, userId: string) { | |
|
||
await enterEmailAndContinue(page, userId); | ||
await enterCreditCardDetailsAndContinue(page); | ||
|
||
// Confirm success page has shown. | ||
const successText = page.getByText("Purchase successful"); | ||
const successText = page.getByText("Payment complete"); | ||
await expect(successText).toBeVisible({ timeout: 10000 }); | ||
} | ||
|
||
|
@@ -379,7 +374,7 @@ async function navigateToUrl( | |
|
||
async function typeTextInPageSelector(page: Page, text: string): Promise<void> { | ||
// Fill email | ||
const emailTitle = page.getByText("Billing email address"); | ||
const emailTitle = page.getByText("What's your email?"); | ||
await expect(emailTitle).toBeVisible(); | ||
await page.getByPlaceholder("[email protected]").click(); | ||
await page.getByPlaceholder("[email protected]").fill(text); | ||
|
Oops, something went wrong.