@@ -108,7 +108,7 @@ export default class PlacesLotCreationForm extends Component {
type="date"
@value={{this.expirationDate}}
{{on "input" (pick "target.value" (set this "expirationDate"))}}
- ><:label>Date d'expiration :
+ ><:label>Date d'expiration
{{#if @errors.expirationDate}}
@@ -125,7 +125,7 @@ export default class PlacesLotCreationForm extends Component {
@errorMessage={{get @errors.category "0.message"}}
@requiredLabel="Champs obligatoire"
>
- <:label>Catégorie :
+ <:label>Catégorie
@@ -135,7 +135,7 @@ export default class PlacesLotCreationForm extends Component {
maxlength="255"
@requiredLabel={{true}}
{{on "input" (pick "target.value" (set this "reference"))}}
- ><:label>Référence :
+ ><:label>Référence
{{#if @errors.reference}}
diff --git a/admin/app/components/target-profiles/badge-form.gjs b/admin/app/components/target-profiles/badge-form.gjs
index b4592992c41..2ed89d6f774 100644
--- a/admin/app/components/target-profiles/badge-form.gjs
+++ b/admin/app/components/target-profiles/badge-form.gjs
@@ -127,7 +127,7 @@ export default class BadgeForm extends Component {
placeholder="exemple: clea_num.svg"
{{on "change" (fn this.updateFormValue "imageName")}}
>
- <:label>Nom de l'image (svg) :
+ <:label>Nom de l'image (svg)
diff --git a/admin/app/components/target-profiles/badge-form/campaign-criterion.gjs b/admin/app/components/target-profiles/badge-form/campaign-criterion.gjs
index 3557bae8150..9851d46884c 100644
--- a/admin/app/components/target-profiles/badge-form/campaign-criterion.gjs
+++ b/admin/app/components/target-profiles/badge-form/campaign-criterion.gjs
@@ -16,7 +16,7 @@ import { t } from 'ember-intl';
@requiredLabel={{t "common.forms.mandatory"}}
{{on "change" @onThresholdChange}}
>
- <:label>Taux de réussite requis :
+ <:label>Taux de réussite requis
diff --git a/admin/app/components/target-profiles/badge-form/capped-tubes-criterion.gjs b/admin/app/components/target-profiles/badge-form/capped-tubes-criterion.gjs
index 23b5c4c71f3..bfe9a80f918 100644
--- a/admin/app/components/target-profiles/badge-form/capped-tubes-criterion.gjs
+++ b/admin/app/components/target-profiles/badge-form/capped-tubes-criterion.gjs
@@ -103,7 +103,7 @@ export default class CappedTubesCriterion extends Component {
@requiredLabel={{t "common.forms.mandatory"}}
{{on "change" @onThresholdChange}}
>
- <:label>Taux de réussite requis :
+ <:label>Taux de réussite requis
{{#if this.canModifyEmail}}
{{/if}}
{{#if @user.username}}
{{/if}}
@@ -251,7 +251,7 @@ export default class UserOverview extends Component {
@onChange={{this.onChangeLanguage}}
@hideDefaultOption={{true}}
>
- <:label>Langue :
+ <:label>Langue
@@ -262,7 +262,7 @@ export default class UserOverview extends Component {
@onChange={{this.onLocaleChange}}
@hideDefaultOption={{true}}
>
- <:label>Locale :
+ <:label>Locale
diff --git a/admin/tests/acceptance/authenticated/organizations/information-management-test.js b/admin/tests/acceptance/authenticated/organizations/information-management-test.js
index b11bdc01bc7..edbae02fcc7 100644
--- a/admin/tests/acceptance/authenticated/organizations/information-management-test.js
+++ b/admin/tests/acceptance/authenticated/organizations/information-management-test.js
@@ -1,5 +1,5 @@
import { clickByName, fillByLabel, visit } from '@1024pix/ember-testing-library';
-import { click, currentURL } from '@ember/test-helpers';
+import { click, currentURL, fillIn } from '@ember/test-helpers';
import { setupMirage } from 'ember-cli-mirage/test-support';
import { setupApplicationTest } from 'ember-qunit';
import { authenticateAdminMemberWithRole } from 'pix-admin/tests/helpers/test-init';
@@ -32,7 +32,7 @@ module('Acceptance | Organizations | Information management', function (hooks) {
await clickByName('Modifier');
// when
- await fillByLabel('* Nom', 'newOrganizationName');
+ await fillIn(screen.getByLabelText(/Nom \*/), 'newOrganizationName');
await fillByLabel('Prénom du DPO', 'Bru');
await fillByLabel('Nom du DPO', 'No');
await fillByLabel('Adresse e-mail du DPO', 'bru.no@example.net');
diff --git a/admin/tests/acceptance/authenticated/target-profiles/target-profile/insights-test.js b/admin/tests/acceptance/authenticated/target-profiles/target-profile/insights-test.js
index 63adb43e652..81afb826160 100644
--- a/admin/tests/acceptance/authenticated/target-profiles/target-profile/insights-test.js
+++ b/admin/tests/acceptance/authenticated/target-profiles/target-profile/insights-test.js
@@ -218,7 +218,6 @@ module('Acceptance | Target Profile Insights', function (hooks) {
await click(secondStageLevelButton);
await screen.findByRole('listbox');
await click(screen.getByRole('option', { name: '3' }));
- await waitForElementToBeRemoved(() => screen.queryByRole('listbox'));
await fillIn(firstStageLevelMessage, 'mon message un');
await fillIn(secondStageLevelMessage, 'mon message deux');
@@ -496,11 +495,11 @@ module('Acceptance | Target Profile Insights', function (hooks) {
await clickByName('Clés de lecture');
await clickByName('Voir le détail du résultat thématique ancien titre');
await clickByName('Modifier');
- await fillByLabel('* Titre :', 'nouveau titre');
- await fillByLabel('* Clé :', 'NEW_KEY');
- await fillByLabel('Message :', 'nouveau message');
- await fillByLabel("* Nom de l'image (svg) :", 'new_image.svg');
- await fillByLabel('* Message Alternatif :', 'nouveau alt');
+ await fillIn(screen.getByLabelText('Titre *', { exact: false }), 'nouveau titre');
+ await fillIn(screen.getByLabelText('Clé *', { exact: false }), 'NEW_KEY');
+ await fillByLabel('Message', 'nouveau message');
+ await fillIn(screen.getByLabelText("Nom de l'image (svg) *", { exact: false }), 'new_image.svg');
+ await fillIn(screen.getByLabelText('Message Alternatif *', { exact: false }), 'nouveau alt');
await clickByName('Certifiable');
await clickByName('Lacunes');
await clickByName('Enregistrer');
@@ -528,7 +527,7 @@ module('Acceptance | Target Profile Insights', function (hooks) {
await clickByName('Clés de lecture');
await clickByName('Voir le détail du résultat thématique tagada');
await clickByName('Modifier');
- await fillByLabel('* Titre :', 'tsouintsouin');
+ await fillIn(screen.getByLabelText('Titre *', { exact: false }), 'tsouintsouin');
await clickByName('Annuler');
// then
@@ -589,7 +588,7 @@ module('Acceptance | Target Profile Insights', function (hooks) {
await clickByName('Clés de lecture');
await clickByName('Nouveau résultat thématique');
await fillByLabel(/Nom du résultat thématique :/, 'Mon nouveau RT');
- await fillByLabel("* Nom de l'image (svg) :", 'troll.png');
+ await fillIn(screen.getByLabelText("Nom de l'image (svg) *", { exact: false }), 'troll.png');
await fillByLabel(/Texte alternatif pour l'image :/, 'Je mets du png je fais ce que je veux');
await fillByLabel('Message :', 'message de mon RT');
await fillByLabel(/Clé/, 'MY_BADGE');
@@ -602,7 +601,7 @@ module('Acceptance | Target Profile Insights', function (hooks) {
const [tubeGroupNameInput] = screen.getAllByLabelText('Nom du critère :');
await fillIn(tubeGroupNameInput, "Le tube de l'année");
- const thresholdInputs = screen.getAllByLabelText('* Taux de réussite requis :');
+ const thresholdInputs = screen.getAllByLabelText('Taux de réussite requis *', { exact: false });
await fillIn(thresholdInputs[0], 50);
await fillIn(thresholdInputs[1], 60);
await fillIn(thresholdInputs[2], 70);
diff --git a/admin/tests/acceptance/authenticated/users/get-test.js b/admin/tests/acceptance/authenticated/users/get-test.js
index 5f5ea25e730..9fc61b6e4a4 100644
--- a/admin/tests/acceptance/authenticated/users/get-test.js
+++ b/admin/tests/acceptance/authenticated/users/get-test.js
@@ -1,5 +1,5 @@
-import { clickByName, fillByLabel, visit, within } from '@1024pix/ember-testing-library';
-import { click, currentURL } from '@ember/test-helpers';
+import { clickByName, visit, within } from '@1024pix/ember-testing-library';
+import { click, currentURL, fillIn } from '@ember/test-helpers';
import { setupMirage } from 'ember-cli-mirage/test-support';
import { setupApplicationTest } from 'ember-qunit';
import { createAuthenticateSession } from 'pix-admin/tests/helpers/test-init';
@@ -69,11 +69,11 @@ module('Acceptance | authenticated/users/get', function (hooks) {
await clickByName('Modifier');
// when
- await fillByLabel('* Prénom :', 'john');
- await fillByLabel('* Nom :', 'doe');
- await fillByLabel('* Adresse e-mail :', 'john.doe@example.net');
- await fillByLabel('* Identifiant :', 'john.doe0101');
- await click(screen.getByRole('button', { name: 'Langue :' }));
+ await fillIn(screen.getByLabelText('Prénom *', { exact: false }), 'john');
+ await fillIn(screen.getByLabelText(/Nom */), 'doe');
+ await fillIn(screen.getByLabelText('Adresse e-mail *', { exact: false }), 'john.doe@example.net');
+ await fillIn(screen.getByLabelText('Identifiant *', { exact: false }), 'john.doe0101');
+ await click(screen.getByRole('button', { name: 'Langue' }));
await screen.findByRole('listbox');
await click(screen.getByRole('option', { name: 'Anglais' }));
diff --git a/admin/tests/integration/components/campaigns/update-test.gjs b/admin/tests/integration/components/campaigns/update-test.gjs
index f0bce6bf018..f05c979356d 100644
--- a/admin/tests/integration/components/campaigns/update-test.gjs
+++ b/admin/tests/integration/components/campaigns/update-test.gjs
@@ -1,6 +1,7 @@
import { clickByName, fillByLabel, render } from '@1024pix/ember-testing-library';
import EmberObject from '@ember/object';
import Service from '@ember/service';
+import { fillIn } from '@ember/test-helpers';
import Update from 'pix-admin/components/campaigns/update';
import { module, test } from 'qunit';
import sinon from 'sinon';
@@ -111,7 +112,7 @@ module('Integration | Component | Campaigns | Update', function (hooks) {
test('it should display an error text when the name is empty', async function (assert) {
// when
const screen = await render();
- await fillByLabel('* Nom de la campagne', '');
+ await fillIn(screen.getByLabelText('Nom de la campagne *', { exact: false }), '');
// then
assert.dom(screen.getByText('Le nom ne peut pas être vide')).exists();
@@ -120,7 +121,7 @@ module('Integration | Component | Campaigns | Update', function (hooks) {
test('it should display an error text when the name has more than 255 characters', async function (assert) {
// when
const screen = await render();
- await fillByLabel('* Nom de la campagne', 'a'.repeat(256));
+ await fillIn(screen.getByLabelText('Nom de la campagne *', { exact: false }), 'a'.repeat(256));
// then
assert.dom(screen.getByText('La longueur du nom ne doit pas excéder 255 caractères')).exists();
@@ -128,8 +129,8 @@ module('Integration | Component | Campaigns | Update', function (hooks) {
test('it should call Update when form is valid', async function (assert) {
//when
- await render();
- await fillByLabel('* Nom de la campagne', 'Nouveau nom');
+ const screen = await render();
+ await fillIn(screen.getByLabelText('Nom de la campagne *', { exact: false }), 'Nouveau nom');
await clickByName('Enregistrer');
//then
diff --git a/admin/tests/integration/components/organizations/information-section-edit-test.gjs b/admin/tests/integration/components/organizations/information-section-edit-test.gjs
index 23cf77466cd..7f449e73aab 100644
--- a/admin/tests/integration/components/organizations/information-section-edit-test.gjs
+++ b/admin/tests/integration/components/organizations/information-section-edit-test.gjs
@@ -1,6 +1,7 @@
import { fillByLabel, render } from '@1024pix/ember-testing-library';
import EmberObject from '@ember/object';
import Service from '@ember/service';
+import { fillIn } from '@ember/test-helpers';
import InformationSectionEdit from 'pix-admin/components/organizations/information-section-edit';
import { module, test } from 'qunit';
@@ -35,7 +36,7 @@ module('Integration | Component | organizations/information-section-edit', funct
const screen = await render();
// when
- await fillByLabel('* Nom', '');
+ await fillIn(screen.getByLabelText('Nom *', { exact: false }), '');
// then
assert.dom(screen.getByText('Le nom ne peut pas être vide')).exists();
@@ -46,7 +47,7 @@ module('Integration | Component | organizations/information-section-edit', funct
const screen = await render();
// when
- await fillByLabel('* Nom', 'a'.repeat(256));
+ await fillIn(screen.getByLabelText('Nom *', { exact: false }), 'a'.repeat(256));
// then
assert.dom(screen.getByText('La longueur du nom ne doit pas excéder 255 caractères')).exists();
diff --git a/admin/tests/integration/components/organizations/information-section-test.gjs b/admin/tests/integration/components/organizations/information-section-test.gjs
index eda47108ad1..ad5268db2b0 100644
--- a/admin/tests/integration/components/organizations/information-section-test.gjs
+++ b/admin/tests/integration/components/organizations/information-section-test.gjs
@@ -1,7 +1,7 @@
import { clickByName, fillByLabel, render } from '@1024pix/ember-testing-library';
import EmberObject from '@ember/object';
import Service from '@ember/service';
-import { click } from '@ember/test-helpers';
+import { click, fillIn } from '@ember/test-helpers';
import InformationSection from 'pix-admin/components/organizations/information-section';
import { module, test } from 'qunit';
@@ -39,7 +39,7 @@ module('Integration | Component | organizations/information-section', function (
await clickByName('Modifier');
// then
- assert.dom(screen.getByRole('textbox', { name: 'Nom' })).exists();
+ assert.dom(screen.getByRole('textbox', { name: 'Nom *' })).exists();
assert.dom(screen.getByRole('textbox', { name: 'Identifiant externe' })).exists();
assert.dom(screen.getByRole('button', { name: 'Annuler' })).exists();
assert.dom(screen.getByRole('button', { name: 'Enregistrer' })).exists();
@@ -65,7 +65,7 @@ module('Integration | Component | organizations/information-section', function (
await clickByName('Modifier');
- await fillByLabel('* Nom', 'new name');
+ await fillIn(screen.getByLabelText('Nom *', { exact: false }), 'new name');
await fillByLabel('Identifiant externe', 'new externalId');
await fillByLabel('Département (en 3 chiffres)', 'new provinceCode');
await clickByName('Gestion d’élèves/étudiants');
@@ -112,7 +112,7 @@ module('Integration | Component | organizations/information-section', function (
);
await clickByName('Modifier');
- await fillByLabel('* Nom', 'new name');
+ await fillIn(screen.getByLabelText('Nom *', { exact: false }), 'new name');
await fillByLabel('Identifiant externe', 'new externalId');
await fillByLabel('Département (en 3 chiffres)', ' ');
await fillByLabel('Crédits', 50);
diff --git a/admin/tests/integration/components/organizations/places-lot-creation-form-test.gjs b/admin/tests/integration/components/organizations/places-lot-creation-form-test.gjs
index 0bfae83d930..5bb6d703fdb 100644
--- a/admin/tests/integration/components/organizations/places-lot-creation-form-test.gjs
+++ b/admin/tests/integration/components/organizations/places-lot-creation-form-test.gjs
@@ -1,5 +1,5 @@
import { fillByLabel, render } from '@1024pix/ember-testing-library';
-import { click } from '@ember/test-helpers';
+import { click, fillIn } from '@ember/test-helpers';
import PlacesLotCreationForm from 'pix-admin/components/organizations/places-lot-creation-form';
import { module, test } from 'qunit';
import sinon from 'sinon';
@@ -17,8 +17,8 @@ module('Integration | Component | organizations/places-lot-creation-form', funct
// when
await fillByLabel('Nombre :', '10');
- await fillByLabel("* Date d'activation :", '2022-10-20');
- await fillByLabel("Date d'expiration :", '2022-12-20');
+ await fillIn(screen.getByLabelText("Date d'activation *", { exact: false }), '2022-10-20');
+ await fillByLabel("Date d'expiration", '2022-12-20');
const select = screen.getByRole('button', { name: /Catégorie/ });
@@ -26,7 +26,7 @@ module('Integration | Component | organizations/places-lot-creation-form', funct
await click(await screen.findByRole('option', { name: 'Tarif gratuit' }));
- await fillByLabel('* Référence :', '123ABC');
+ await fillIn(screen.getByLabelText('Référence *', { exact: false }), '123ABC');
await click(screen.getByRole('button', { name: 'Ajouter' }));
// then
sinon.assert.calledOnce(create);
@@ -41,8 +41,8 @@ module('Integration | Component | organizations/places-lot-creation-form', funct
// when
await fillByLabel('Nombre :', '10');
- await fillByLabel("* Date d'activation :", '2022-10-20');
- await fillByLabel("Date d'expiration :", '2022-12-20');
+ await fillIn(screen.getByLabelText("Date d'activation *", { exact: false }), '2022-10-20');
+ await fillByLabel("Date d'expiration", '2022-12-20');
const select = screen.getByRole('button', { name: /Catégorie/ });
@@ -52,7 +52,7 @@ module('Integration | Component | organizations/places-lot-creation-form', funct
await click(await screen.findByRole('option', { name: 'Tarif gratuit' }));
- await fillByLabel('* Référence :', '123ABC');
+ await fillIn(screen.getByLabelText('Référence *', { exact: false }), '123ABC');
await click(screen.getByRole('button', { name: 'Ajouter' }));
assert.throws(function () {
diff --git a/admin/tests/integration/components/target-profiles/badge-form-test.gjs b/admin/tests/integration/components/target-profiles/badge-form-test.gjs
index 9b864c974e1..4946ac26f54 100644
--- a/admin/tests/integration/components/target-profiles/badge-form-test.gjs
+++ b/admin/tests/integration/components/target-profiles/badge-form-test.gjs
@@ -90,7 +90,7 @@ module('Integration | Component | BadgeForm', function (hooks) {
// then
assert.dom(screen.getByRole('heading', { name: 'Critère d’obtention sur l’ensemble du profil cible' })).exists();
- assert.dom(screen.getByLabelText('* Taux de réussite requis :')).exists();
+ assert.dom(screen.getByLabelText('Taux de réussite requis *', { exact: false })).exists();
});
});
@@ -105,7 +105,7 @@ module('Integration | Component | BadgeForm', function (hooks) {
.dom(screen.getByRole('heading', { name: 'Critère d’obtention sur une sélection de sujets du profil cible' }))
.exists();
assert.dom(screen.getByLabelText('Nom du critère :')).exists();
- assert.dom(screen.getByLabelText('* Taux de réussite requis :')).exists();
+ assert.dom(screen.getByLabelText('Taux de réussite requis *', { exact: false })).exists();
assert.dom(screen.getByRole('button', { name: 'Supprimer' })).exists();
assert.dom(screen.getByRole('button', { name: 'Ajouter une nouvelle sélection de sujets' })).exists();
});
diff --git a/admin/tests/integration/components/users/user-overview-test.gjs b/admin/tests/integration/components/users/user-overview-test.gjs
index 80c4f34418c..e037c3654cd 100644
--- a/admin/tests/integration/components/users/user-overview-test.gjs
+++ b/admin/tests/integration/components/users/user-overview-test.gjs
@@ -442,16 +442,16 @@ module('Integration | Component | users | user-overview', function (hooks) {
await clickByName('Modifier');
// then
- assert.dom(screen.getByRole('textbox', { name: 'Prénom :' })).hasValue(user.firstName);
- assert.dom(screen.getByRole('textbox', { name: 'Nom :' })).hasValue(user.lastName);
+ assert.dom(screen.getByRole('textbox', { name: 'Prénom *' })).hasValue(user.firstName);
+ assert.dom(screen.getByRole('textbox', { name: 'Nom *' })).hasValue(user.lastName);
- await clickByName('Langue :');
+ await clickByName('Langue');
await screen.findByRole('listbox');
assert.dom(screen.getByRole('option', { name: 'Français' })).exists();
assert.dom(screen.getByRole('option', { name: 'Anglais' })).exists();
assert.dom(screen.getByRole('option', { name: 'Néerlandais' })).exists();
- await clickByName('Locale :');
+ await clickByName('Locale');
await waitFor(async () => {
await screen.findByRole('listbox');
assert.dom(screen.getByRole('option', { name: 'en' })).exists();
@@ -495,7 +495,7 @@ module('Integration | Component | users | user-overview', function (hooks) {
await clickByName('Modifier');
// then
- assert.dom(screen.getByRole('textbox', { name: 'Adresse e-mail :' })).hasValue(user.email);
+ assert.dom(screen.getByRole('textbox', { name: 'Adresse e-mail *' })).hasValue(user.email);
});
test('does not display username in edit mode', async function (assert) {
@@ -512,7 +512,7 @@ module('Integration | Component | users | user-overview', function (hooks) {
await clickByName('Modifier');
// then
- assert.dom(screen.queryByRole('textbox', { name: 'Identifiant :' })).doesNotExist();
+ assert.dom(screen.queryByRole('textbox', { name: 'Identifiant *' })).doesNotExist();
});
});
@@ -531,7 +531,7 @@ module('Integration | Component | users | user-overview', function (hooks) {
await clickByName('Modifier');
// then
- assert.dom(screen.getByRole('textbox', { name: 'Identifiant :' })).hasValue(user.username);
+ assert.dom(screen.getByRole('textbox', { name: 'Identifiant *' })).hasValue(user.username);
});
test('displays email', async function (assert) {
@@ -548,7 +548,7 @@ module('Integration | Component | users | user-overview', function (hooks) {
await clickByName('Modifier');
// then
- assert.dom(screen.getByRole('textbox', { name: 'Adresse e-mail :' })).exists();
+ assert.dom(screen.getByRole('textbox', { name: 'Adresse e-mail *' })).exists();
});
});
@@ -567,7 +567,7 @@ module('Integration | Component | users | user-overview', function (hooks) {
await clickByName('Modifier');
// then
- assert.dom(screen.queryByRole('textbox', { name: 'Adresse e-mail :' })).doesNotExist();
+ assert.dom(screen.queryByRole('textbox', { name: 'Adresse e-mail *' })).doesNotExist();
});
});
});