Skip to content

Commit

Permalink
add playright test to test agency registration from profil page
Browse files Browse the repository at this point in the history
  • Loading branch information
clement-duport committed Jan 30, 2025
1 parent 69ac164 commit a29003d
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions playwright/tests/user/myProfileWorkflow.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,46 @@ test.describe("User workflow", () => {
).toHaveCount(0);
});

test("can request to register on agencies from MyProfile page", async ({
page,
}) => {
await page.goto("/");
await goToMyProfilePage(page);

await expect(
page.locator(`#${domElementIds.profile.registerAgenciesSearchLink}`),
).toBeVisible();
await page
.locator(`#${domElementIds.profile.registerAgenciesSearchLink}`)
.click();

await expect(
page.locator(
`#${domElementIds.agencyDashboard.registerAgencies.search}`,
),
).toBeVisible();
await page
.locator(`#${domElementIds.agencyDashboard.registerAgencies.search}`)
.fill("Cap emploi");

await page
.locator(
`#${domElementIds.agencyDashboard.registerAgencies.table} table tbody tr .fr-checkbox-group`,
)
.first()
.click();

await page
.locator(
`#${domElementIds.agencyDashboard.registerAgencies.submitButton}`,
)
.click();

await expect(
await page.locator(".fr-alert--success").first(),
).toBeVisible();
});

test("has access to his notification preferences", async ({ page }) => {
await page.goto("/");
await goToMyProfilePage(page);
Expand Down

0 comments on commit a29003d

Please sign in to comment.