Skip to content

Commit

Permalink
add logging to profile test
Browse files Browse the repository at this point in the history
  • Loading branch information
jho44 committed Feb 28, 2024
1 parent 5168bdc commit ae17876
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/routes/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
async function login() {
if (!phoneInput.isValidNumber()) {
alert('You have entered an invalid contact number.');
alert(`You have entered an invalid contact number: ${phoneInput.telInput.value}`);
return;
}
Expand Down
4 changes: 3 additions & 1 deletion tests/profile.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@ test.beforeEach(async ({ utils }) => {
await utils.deleteUserAndHousehold(phone);
});

test('User can create new profile with valid phone number', async ({ page, context }) => {
test('User can create new profile with valid phone number', async ({ page }) => {
await page.goto(host);
await page.waitForURL(host);
await page.getByRole('textbox').fill('');
await page.getByRole('textbox').fill(phone);

page.on('dialog', dialog => console.log(`DIALOG: ${dialog.message()}`));
await page.getByRole('button').click();

let token: string;
Expand Down

0 comments on commit ae17876

Please sign in to comment.