Skip to content

Commit

Permalink
rm page and context closes
Browse files Browse the repository at this point in the history
  • Loading branch information
jho44 committed Feb 27, 2024
1 parent 6a02dbf commit cb8501a
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 23 deletions.
1 change: 0 additions & 1 deletion prisma/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ export default class SeedUtils {
return {
household: {
create: {
id: ind,
name: `Household ${ind}`,
children: {
create: {
Expand Down
5 changes: 0 additions & 5 deletions tests/db.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ test("User can't save profile without session cookie", async ({ page, context })
});
// should redirect user to home page for logging in
expect(res.url()).toEqual(host + '/');
await page.close();
});

/*
Expand Down Expand Up @@ -178,7 +177,3 @@ test.describe('Friend Requests', () => {
});
});
// TODO: Can't create household for someone who's already in a household

test.afterAll(async ({ browser }) => {
await browser.close();
});
4 changes: 0 additions & 4 deletions tests/household.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,3 @@ test('User can create new kid', async ({ page, context }) => {
expect(await page.locator('.kid-card').count()).toBe(1);
await page.close();
});

test.afterAll(async ({ browser }) => {
await browser.close();
});
4 changes: 0 additions & 4 deletions tests/login.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,3 @@ test('Redirect to login page w/ prefilled phone num on expired magic link', asyn
await expect(page).toHaveURL(`${host}?phone=+12015550018&status=403`);
await page.close();
});

test.afterAll(async ({ browser }) => {
await browser.close();
});
7 changes: 2 additions & 5 deletions tests/profile.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ test.beforeEach(async ({ utils }) => {
await utils.deleteUserAndHousehold(phone);
});

test('User can create new profile with valid phone number', async ({ page }) => {
test('User can create new profile with valid phone number', async ({ page, context }) => {
await context.clearCookies();
await page.goto(host);
await page.waitForURL(host);
await page.getByRole('textbox').fill(phone);
Expand Down Expand Up @@ -50,7 +51,3 @@ test('User can create new profile with valid phone number', async ({ page }) =>
await page.waitForURL(`${host}/household`);
await page.close();
});

test.afterAll(async ({ browser }) => {
await browser.close();
});
4 changes: 0 additions & 4 deletions tests/twilio.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,4 @@ Skipped tests b/c the generated SMSes are only ever sent back to the user (low /
);
expect(res.status()).toEqual(401);
});

test.afterAll(async ({ browser }) => {
await browser.close();
});
});

0 comments on commit cb8501a

Please sign in to comment.