Skip to content

Commit

Permalink
edit test
Browse files Browse the repository at this point in the history
  • Loading branch information
devksingh4 committed Sep 11, 2024
1 parent a1c00a8 commit 31313a9
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions e2e/tests/student/edit.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,13 @@ describe("Test that users can edit their profile", () => {
expect(page.getByText('Skills')).toBeTruthy()
expect(page.getByText('Botting')).toBeTruthy()
await page.getByRole('button', { name: 'Edit' }).click();
await page.getByRole('button', { name: 'Add Degree' }).click();
await page.getByRole('textbox', { name: 'Major' }).click();
await page.getByRole('option', { name: 'Computer Science', exact: true }).click();
try {
await page.getByRole('button', { name: 'Add Degree' }).click();
await page.getByRole('textbox', { name: 'Major' }).click();
await page.getByRole('option', { name: 'Computer Science', exact: true }).click();
} catch (e) {
console.log("user already has a degree, not adding another one.")
}
await page.getByRole('button', { name: 'Save' }).click();
expect(await page.waitForSelector('text="Profile saved!"')).toBeTruthy();
});
Expand Down

0 comments on commit 31313a9

Please sign in to comment.