File tree Expand file tree Collapse file tree 2 files changed +2
-5
lines changed
Expand file tree Collapse file tree 2 files changed +2
-5
lines changed Original file line number Diff line number Diff line change 11import { test , expect } from "@playwright/test" ;
2- import { randomEmailAddress } from "./utils" ;
2+ import { clickMyAccountMenuItem , randomEmailAddress } from "./utils" ;
33
44const getPageInIframe = ( page ) =>
55 page . frameLocator ( 'iframe[name="newspack_modal_checkout_iframe"]' ) ;
@@ -61,8 +61,7 @@ test("Donations", {
6161 await expect ( page . locator ( "#newspack_account_email" ) ) . toHaveValue (
6262 emailAddress
6363 ) ;
64- await page . getByRole ( "link" , { name : "My Subscription" } ) . click ( ) ;
65-
64+ await clickMyAccountMenuItem ( page , "Subscription" ) ;
6665 await expect ( page . getByText ( "Visa card ending in 4242" ) ) . toBeVisible ( ) ;
6766 await expect (
6867 page . getByRole ( "cell" , { name : "$15.00 / month" } ) . first ( )
Original file line number Diff line number Diff line change @@ -59,7 +59,6 @@ test("Register on the site", {
5959 * Now the user is authenticated via the magic link, they can update their name.
6060 */
6161 await page . getByRole ( "link" , { name : "My Account" } ) . click ( ) ;
62- await clickMyAccountMenuItem ( page , "Account settings" ) ;
6362 await page . getByPlaceholder ( "Your First Name" ) . click ( ) ;
6463 await page . getByPlaceholder ( "Your First Name" ) . fill ( "John" ) ;
6564 await page . getByPlaceholder ( "Your Last Name" ) . click ( ) ;
@@ -119,7 +118,6 @@ test("Register on the site", {
119118 * Reader updates their email address.
120119 */
121120 const newEmailAddress = randomEmailAddress ( ) ;
122- await clickMyAccountMenuItem ( page , "Account settings" ) ;
123121 await page . locator ( "#newspack_account_email" ) . fill ( newEmailAddress ) ;
124122 await page . getByRole ( "button" , { name : "Update profile" } ) . click ( ) ;
125123 const expectedNotification = `A verification email has been sent to ${ newEmailAddress } . Please verify to complete the change.` ;
You can’t perform that action at this time.
0 commit comments