Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
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
5 changes: 2 additions & 3 deletions tests/donations.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { test, expect } from "@playwright/test";
import { randomEmailAddress } from "./utils";
import { clickMyAccountMenuItem, randomEmailAddress } from "./utils";

const getPageInIframe = (page) =>
page.frameLocator('iframe[name="newspack_modal_checkout_iframe"]');
Expand Down Expand Up @@ -61,8 +61,7 @@ test("Donations", {
await expect(page.locator("#newspack_account_email")).toHaveValue(
emailAddress
);
await page.getByRole("link", { name: "My Subscription" }).click();

await clickMyAccountMenuItem(page, "Subscription");
await expect(page.getByText("Visa card ending in 4242")).toBeVisible();
await expect(
page.getByRole("cell", { name: "$15.00 / month" }).first()
Expand Down
2 changes: 0 additions & 2 deletions tests/reader-registration.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ test("Register on the site", {
* Now the user is authenticated via the magic link, they can update their name.
*/
await page.getByRole("link", { name: "My Account" }).click();
await clickMyAccountMenuItem(page, "Account settings");
await page.getByPlaceholder("Your First Name").click();
await page.getByPlaceholder("Your First Name").fill("John");
await page.getByPlaceholder("Your Last Name").click();
Expand Down Expand Up @@ -119,7 +118,6 @@ test("Register on the site", {
* Reader updates their email address.
*/
const newEmailAddress = randomEmailAddress();
await clickMyAccountMenuItem(page, "Account settings");
await page.locator("#newspack_account_email").fill(newEmailAddress);
await page.getByRole("button", { name: "Update profile" }).click();
const expectedNotification = `A verification email has been sent to ${newEmailAddress}. Please verify to complete the change.`;
Expand Down