mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-10 23:36:14 -05:00
Updated Playwright test: Sign up for paid plan via portal - single tier
refs https://github.com/TryGhost/Team/issues/2371 - Includes new data-test-* attributes - Includes better checking of paid tier from member
This commit is contained in:
parent
9d434b8105
commit
e44f10bc5d
1 changed files with 6 additions and 4 deletions
|
@ -15,17 +15,19 @@ test.describe('Portal', () => {
|
|||
await portalTriggerButton.click();
|
||||
|
||||
// fill out signup form and submit
|
||||
await portalFrame.locator('#input-name').fill('Testy McTesterson');
|
||||
await portalFrame.locator('#input-email').fill('testy@example.com');
|
||||
await portalFrame.locator('.gh-portal-btn-product .gh-portal-btn').nth(1).click();
|
||||
await portalFrame.locator('[data-test-input="input-name"]').fill('Testy McTesterson');
|
||||
await portalFrame.locator('[data-test-input="input-email"]').fill('testy@example.com');
|
||||
await portalFrame.locator('[data-test-button="select-tier"]').nth(1).click();
|
||||
|
||||
// complete the stripe checkout flow
|
||||
await completeStripeSubscription(page);
|
||||
|
||||
// come back to the website, open portal and check member is logged in
|
||||
// come back to the website, open portal and check member is logged in and has paid
|
||||
await page.waitForSelector('h1.site-title', {state: 'visible'});
|
||||
await portalTriggerButton.click();
|
||||
await expect(portalFrame.getByText('testy@example.com')).toBeVisible();
|
||||
await expect(portalFrame.getByRole('heading', {name: 'Billing info'})).toBeVisible();
|
||||
await expect(portalFrame.getByText('**** **** **** 4242')).toBeVisible();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Reference in a new issue