-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
82 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,3 @@ | ||
export const PHONES = [ | ||
'+12015550121', | ||
'+12015550122', | ||
'+12015550123', | ||
'+12015550124', | ||
'+12015550125', | ||
'+12015550126' | ||
]; | ||
export const USERS_WITH_NOTHING = [1, 2, 7]; | ||
export const USERS_WITH_EMPTY_HOUSEHOLD = [3, 4]; | ||
export const USERS_WITH_ACTIVE_SESSION = [2, 4, 6, 7]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import { expect, test } from '@playwright/test'; | ||
import { run } from '../prisma/seed'; | ||
|
||
const host = 'http://localhost:5173'; | ||
|
||
test.beforeAll(async () => { | ||
await run(); | ||
}); | ||
|
||
test('User can create new kid', async ({ page, context }) => { | ||
await context.addCookies([ | ||
{ | ||
name: 'session', | ||
value: 'user7session', | ||
url: host | ||
} | ||
]); | ||
await page.goto(host); | ||
await page.waitForURL(`${host}/household`); | ||
await page.waitForTimeout(2000) | ||
expect(await page.locator('.kid-card').count()).toBe(0) | ||
|
||
await page.locator('input[name="first-name"]').fill('FIRST_NAME') | ||
await page.locator('input[name="last-name"]').fill('LAST_NAME') | ||
await page.locator('select[name="pronouns"]').selectOption('SHE_HER_HERS'); | ||
|
||
await page.getByText('Save Child').click(); | ||
await page.locator('.kid-card').first().waitFor(); | ||
expect(await page.locator('.kid-card').count()).toBe(1) | ||
}); |