Skip to content

Commit

Permalink
fix: tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rap2hpoutre committed Jan 25, 2024
1 parent 9d91904 commit b2e1753
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions e2e/custom-fields_edit-choice.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ test("test", async ({ page }) => {
await test.step("create fields", async () => {
await page.getByRole("link", { name: "Organisation" }).click();

await page.getByRole("button", { name: "Personnes suivies" }).click();
await page.getByRole("button", { name: "Personnes suivies", exact: true }).click();
/* personnes infos sociales */
await page.getByRole("button", { name: "Ajouter un champ" }).nth(0).click();
await addCustomField(page, "Contrat de travail", "Choix dans une liste", ["CDI merde je me suis trompé", "CDD", "Interim"]);
Expand Down Expand Up @@ -142,7 +142,7 @@ test("test", async ({ page }) => {
await test.step("change choices value", async () => {
await page.getByRole("link", { name: "Organisation" }).click();

await page.getByRole("button", { name: "Personnes suivies" }).click();
await page.getByRole("button", { name: "Personnes suivies", exact: true }).click();

await page.locator('[data-test-id="Motif\\(s\\) de sortie de file active"]').getByRole("button", { name: "Modifier le champ" }).click();
await page.getByRole("button", { name: "Modifier le choix Relai vers autre structure" }).click();
Expand Down
4 changes: 2 additions & 2 deletions e2e/custom-fields_edit.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ test("test", async ({ page }) => {
await loginWith(page, "admin1@example.org");

await page.getByRole("link", { name: "Organisation" }).click();
await page.getByRole("button", { name: "Personnes suivies" }).click();
await page.getByRole("button", { name: "Personnes suivies", exact: true }).click();
await page.getByRole("button", { name: "Ajouter un champ" }).nth(1).click();
await page.getByLabel("Nom").fill("Champ non utilisé");
await page.getByRole("button", { name: "Enregistrer" }).click();
Expand Down Expand Up @@ -48,7 +48,7 @@ test("test", async ({ page }) => {
await page.getByRole("link", { name: "Organisation" }).click();
await expect(page).toHaveURL(/http:\/\/localhost:8090\/organisation\/[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}/);

await page.getByRole("button", { name: "Personnes suivies" }).click();
await page.getByRole("button", { name: "Personnes suivies", exact: true }).click();

await page.hover('[data-test-id="Champ utilisé"]');
await page
Expand Down
4 changes: 2 additions & 2 deletions e2e/custom-fields_toggle-by-team.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ test("Create custom fields filtered by team", async ({ page }) => {

await page.getByRole("link", { name: "Organisation" }).click();

await page.getByRole("button", { name: "Personnes suivies" }).click();
await page.getByRole("button", { name: "Personnes suivies", exact: true }).click();

await page.getByRole("button", { name: "Ajouter un champ" }).first().click();
await page.getByRole("dialog").getByLabel("Nom").fill(testPersonSocialField);
Expand Down Expand Up @@ -136,7 +136,7 @@ test("Create custom fields filtered by team", async ({ page }) => {
*/

await page.getByRole("link", { name: "Organisation" }).click();
await page.getByRole("button", { name: "Personnes suivies" }).click();
await page.getByRole("button", { name: "Personnes suivies", exact: true }).click();

await page.hover(`[data-test-id='${testPersonSocialField}']`);
await page
Expand Down
2 changes: 1 addition & 1 deletion e2e/documents_organizer.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ test("Documents organizer", async ({ page }) => {
await loginWith(page, "admin1@example.org");

await page.getByRole("link", { name: "Organisation" }).click();
await page.getByRole("button", { name: "Personnes suivies" }).click();
await page.getByRole("button", { name: "Personnes suivies", exact: true }).click();
await page
.getByLabel(
/Activer\s+la\s+possibilité\s+d'ajouter\s+des\s+liens\s+familiaux\s+entre\s+personnes\.\s+Un\s+onglet\s+"Famille"\s+sera\s+rajouté\s+dans\s+les\s+personnes,\s+et\s+vous\s+pourrez\s+créer\s+des\s+actions,\s+des\s+commentaires\s+et\s+des\s+documents\s+visibles\s+pour\s+toute\s+la\s+famille\./
Expand Down
2 changes: 1 addition & 1 deletion e2e/global_encryption-check-all-data-type.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ test("test", async ({ page }) => {
await page.getByRole("button", { name: "Sauvegarder" }).click();
await page.getByText("Création réussie !").click();
await page.getByRole("link", { name: "Organisation" }).click();
await page.getByRole("button", { name: "Personnes suivies" }).click();
await page.getByRole("button", { name: "Personnes suivies", exact: true }).click();
await page
.getByLabel(
'Activer la possibilité d\'ajouter des liens familiaux entre personnes. Un onglet "Famille" sera rajouté dans les personnes, et vous pourrez créer des actions, des commentaires et des documents visibles pour toute la famille.'
Expand Down
2 changes: 1 addition & 1 deletion e2e/persons_familles.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ test("Familles", async ({ page }) => {

await test.step("Enable familles", async () => {
await page.getByRole("link", { name: "Organisation" }).click();
await page.getByRole("button", { name: "Personnes suivies" }).click();
await page.getByRole("button", { name: "Personnes suivies", exact: true }).click();
await page
.getByLabel(
/Activer\s+la\s+possibilité\s+d'ajouter\s+des\s+liens\s+familiaux\s+entre\s+personnes\.\s+Un\s+onglet\s+"Famille"\s+sera\s+rajouté\s+dans\s+les\s+personnes,\s+et\s+vous\s+pourrez\s+créer\s+des\s+actions,\s+des\s+commentaires\s+et\s+des\s+documents\s+visibles\s+pour\s+toute\s+la\s+famille\./
Expand Down

0 comments on commit b2e1753

Please sign in to comment.