Make sure page.goto is always awaited

no issue
This commit is contained in:
Sam Lord 2023-10-10 12:56:18 +01:00 committed by Sam Lord
parent 7aa7447db9
commit a497d2ed85
2 changed files with 7 additions and 7 deletions

View File

@ -280,7 +280,7 @@ test.describe('Admin', () => {
});
test('A member can be granted a comp in admin', async ({page}) => {
page.goto('/ghost');
await page.goto('/ghost');
await deleteAllMembers(page);
// create a new member with a comped plan

View File

@ -6,7 +6,7 @@ test.describe('Portal', () => {
test.describe('Offers', () => {
test('Creates and uses a free-trial Offer', async ({page}) => {
// reset members by deleting all existing
page.goto('/ghost');
await page.goto('/ghost');
await deleteAllMembers(page);
// add a new tier for offers
@ -78,7 +78,7 @@ test.describe('Portal', () => {
test('Creates and uses a one-time discount Offer', async ({page}) => {
// reset members by deleting all existing
page.goto('/ghost');
await page.goto('/ghost');
await deleteAllMembers(page);
// add new tier
@ -137,13 +137,13 @@ test.describe('Portal', () => {
await page.locator('.gh-nav a[href="#/members/"]').click();
// 1 member, should be Testy, on Portal Tier
await expect(page.getByRole('link', {name: 'Testy McTesterson testy@example.com'}), 'Should have 1 paid member').toBeVisible();
await expect(page.getByRole('link', {name: 'Testy McTesterson example.com'}), 'Should have 1 paid member').toBeVisible();
await expect(page.getByRole('link', {name: tierName}), `Paid member should be on ${tierName}`).toBeVisible();
});
test('Creates and uses a multiple-months discount Offer', async ({page}) => {
// reset members by deleting all existing
page.goto('/ghost');
await page.goto('/ghost');
await deleteAllMembers(page);
// add new tier
@ -211,7 +211,7 @@ test.describe('Portal', () => {
test('Creates and uses a forever discount Offer', async ({page}) => {
// reset members by deleting all existing
page.goto('/ghost');
await page.goto('/ghost');
await deleteAllMembers(page);
// add tier
@ -275,7 +275,7 @@ test.describe('Portal', () => {
});
test('Archiving an offer', async ({page}) => {
page.goto('/ghost');
await page.goto('/ghost');
// Create a new tier to attach offer to
const tierName = 'Portal Tier';