Skip to content

Commit

Permalink
[BUMP] Update dependency @1024pix/pix-ui to ^48.7.0 (certif)
Browse files Browse the repository at this point in the history
  • Loading branch information
pix-service-auto-merge authored Nov 20, 2024
2 parents 7791cc9 + 01e783d commit cdb1ead
Show file tree
Hide file tree
Showing 13 changed files with 128 additions and 156 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import PixLabel from '@1024pix/pix-ui/components/pix-label';
import PixRadioButton from '@1024pix/pix-ui/components/pix-radio-button';
import { fn } from '@ember/helper';
import { on } from '@ember/modifier';
Expand Down Expand Up @@ -41,8 +42,9 @@ export default class CandidateCreationModalComplementaryList extends Component {
<div class='new-candidate-modal-form__field'>
<fieldset id='complementary-certifications'>
<legend class='label'>
<abbr title={{t 'common.forms.required'}} class='mandatory-mark' aria-hidden='true'>*</abbr>
{{this.fieldsetLegend}}
<PixLabel @requiredLabel={{t 'common.forms.required'}}>
{{this.fieldsetLegend}}
</PixLabel>
</legend>
<PixRadioButton required name='subscriptions' {{on 'change' (fn @updateComplementaryCertification null)}}>
<:label>{{this.firstInputLabel}}</:label>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import PixButton from '@1024pix/pix-ui/components/pix-button';
import PixIcon from '@1024pix/pix-ui/components/pix-icon';
import PixInput from '@1024pix/pix-ui/components/pix-input';
import PixLabel from '@1024pix/pix-ui/components/pix-label';
import PixMessage from '@1024pix/pix-ui/components/pix-message';
import PixModal from '@1024pix/pix-ui/components/pix-modal';
import PixRadioButton from '@1024pix/pix-ui/components/pix-radio-button';
Expand Down Expand Up @@ -265,8 +266,9 @@ export default class CandidateCreationModal extends Component {
<div class='new-candidate-modal-form__field'>
<fieldset>
<legend class='label'>
<abbr title={{t 'common.forms.required'}} class='mandatory-mark' aria-hidden='true'>*</abbr>
{{t 'common.labels.candidate.gender.title'}}
<PixLabel @requiredLabel={{t 'common.forms.required'}}>
{{t 'common.labels.candidate.gender.title'}}
</PixLabel>
</legend>
<div class='radio-button-container'>
<PixRadioButton
Expand Down Expand Up @@ -329,8 +331,9 @@ export default class CandidateCreationModal extends Component {
<div class='new-candidate-modal-form__field'>
<fieldset>
<legend class='label'>
<abbr title={{t 'common.forms.required'}} class='mandatory-mark' aria-hidden='true'>*</abbr>
{{t 'common.labels.candidate.birth-geographical-code'}}
<PixLabel @requiredLabel={{t 'common.forms.required'}}>
{{t 'common.labels.candidate.birth-geographical-code'}}
</PixLabel>
</legend>
<div class='radio-button-container'>
<PixRadioButton
Expand Down
23 changes: 0 additions & 23 deletions certif/app/styles/app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -84,26 +84,3 @@ input:invalid {
* {
box-sizing: border-box;
}

.pix-toast__icon .pix-icon {
fill: var(--pix-neutral-0);
}

.pix-icon-button {
&:active:enabled,
&:focus:enabled {
.pix-icon {
fill: var(--pix-neutral-0);
}
}
}

.pix-toast__close-button-container button {
&:hover:enabled,
&:active:enabled,
&:focus:enabled {
.pix-icon {
fill: var(--pix-neutral-0);
}
}
}
6 changes: 0 additions & 6 deletions certif/app/styles/pages/authenticated/sessions/details.scss
Original file line number Diff line number Diff line change
Expand Up @@ -124,12 +124,6 @@

&__clipboard-button {
margin-left: 4px;

.pix-icon-button {
&:hover {
background-color: var(--pix-neutral-100);
}
}
}
}

Expand Down
10 changes: 4 additions & 6 deletions certif/app/templates/authenticated/sessions/new.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,9 @@
</PixInput>

<div class="session-form__field {{if this.isSessionDateMissing 'session-form__field--error'}}">
<label for="session-date" class="label">
<abbr title={{t "common.forms.required"}} class="mandatory-mark" aria-hidden="true">*</abbr>
<PixLabel @requiredLabel={{t "common.forms.required"}} for="session-date">
{{t "common.forms.session-labels.date-start"}}
</label>
</PixLabel>
<EmberFlatpickr
id="session-date"
@altFormat="d/m/Y"
Expand All @@ -59,10 +58,9 @@
</div>

<div class="session-form__field {{if this.isSessionTimeMissing 'session-form__field--error'}}">
<label for="session-time" class="label">
<abbr title={{t "common.forms.required"}} class="mandatory-mark" aria-hidden="true">*</abbr>
<PixLabel @requiredLabel={{t "common.forms.required"}} for="session-time">
{{t "common.forms.session-labels.time-start"}}
</label>
</PixLabel>
<EmberFlatpickr
id="session-time"
@onChange={{this.onTimePicked}}
Expand Down
10 changes: 4 additions & 6 deletions certif/app/templates/authenticated/sessions/update.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,9 @@
</PixInput>

<div class="session-form__field {{if this.isSessionDateMissing 'session-form__field--error'}}">
<label for="session-date" class="label">
<abbr title={{t "common.forms.required"}} class="mandatory-mark" aria-hidden="true">*</abbr>
<PixLabel @requiredLabel={{t "common.forms.required"}} for="session-date">
{{t "common.forms.session-labels.date-start"}}
</label>
</PixLabel>
<EmberFlatpickr
id="session-date"
@altFormat="d/m/Y"
Expand All @@ -59,10 +58,9 @@
</div>

<div class="session-form__field {{if this.isSessionTimeMissing 'session-form__field--error'}}">
<label for="session-time" class="label">
<abbr title={{t "common.forms.required"}} class="mandatory-mark" aria-hidden="true">*</abbr>
<PixLabel @requiredLabel={{t "common.forms.required"}} for="session-time">
{{t "common.forms.session-labels.time-start"}}
</label>
</PixLabel>
<EmberFlatpickr
id="session-time"
@onChange={{this.onTimePicked}}
Expand Down
8 changes: 4 additions & 4 deletions certif/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion certif/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"@1024pix/ember-api-actions": "^1.1.0",
"@1024pix/ember-testing-library": "^3.0.6",
"@1024pix/eslint-config": "^1.3.8",
"@1024pix/pix-ui": "^48.6.0",
"@1024pix/pix-ui": "^48.7.0",
"@1024pix/stylelint-config": "^5.1.22",
"@babel/eslint-parser": "^7.22.15",
"@babel/plugin-proposal-decorators": "^7.22.15",
Expand Down
60 changes: 30 additions & 30 deletions certif/tests/acceptance/session-add-candidate-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,13 @@ module('Acceptance | Session Add Candidate', function (hooks) {

// when
await click(screen.getByRole('button', { name: 'Inscrire un candidat' }));
await fillIn(screen.getByLabelText('* Nom de naissance'), 'Quatorze');
await fillIn(screen.getByLabelText('* Prénom'), 'Louis');
await fillIn(screen.getByLabelText('Nom de naissance *'), 'Quatorze');
await fillIn(screen.getByLabelText('Prénom *'), 'Louis');
await click(screen.getByLabelText('Homme'));
await fillIn(screen.getByLabelText('* Date de naissance'), '01/01/2000');
await click(screen.getByLabelText('* Pays de naissance'));
await fillIn(screen.getByLabelText('Date de naissance *'), '01/01/2000');
await click(screen.getByLabelText('Pays de naissance *'));
await click(screen.getByText('Portugal'));
await fillIn(screen.getByLabelText('* Commune de naissance'), 'Paris');
await fillIn(screen.getByLabelText('Commune de naissance *'), 'Paris');
await click(screen.getByLabelText('Certif complémentaire 2'));
await click(screen.getByLabelText('Aucune'));
await click(screen.getByRole('button', { name: 'Inscrire le candidat' }));
Expand All @@ -73,13 +73,13 @@ module('Acceptance | Session Add Candidate', function (hooks) {

// when
await click(screen.getByRole('button', { name: 'Inscrire un candidat' }));
await fillIn(screen.getByLabelText('* Nom de naissance'), 'Quatorze');
await fillIn(screen.getByLabelText('* Prénom'), 'Louis');
await fillIn(screen.getByLabelText('Nom de naissance *'), 'Quatorze');
await fillIn(screen.getByLabelText('Prénom *'), 'Louis');
await click(screen.getByLabelText('Homme'));
await fillIn(screen.getByLabelText('* Date de naissance'), '01/01/2000');
await click(screen.getByLabelText('* Pays de naissance'));
await fillIn(screen.getByLabelText('Date de naissance *'), '01/01/2000');
await click(screen.getByLabelText('Pays de naissance *'));
await click(screen.getByText('Portugal'));
await fillIn(screen.getByLabelText('* Commune de naissance'), 'Paris');
await fillIn(screen.getByLabelText('Commune de naissance *'), 'Paris');
await click(screen.getByLabelText('Certif complémentaire 2'));
await click(screen.getByRole('button', { name: 'Inscrire le candidat' }));

Expand All @@ -105,13 +105,13 @@ module('Acceptance | Session Add Candidate', function (hooks) {

// when
await click(screen.getByRole('button', { name: 'Inscrire un candidat' }));
await fillIn(screen.getByLabelText('* Nom de naissance'), 'Quatorze');
await fillIn(screen.getByLabelText('* Prénom'), 'Louis');
await fillIn(screen.getByLabelText('Nom de naissance *'), 'Quatorze');
await fillIn(screen.getByLabelText('Prénom *'), 'Louis');
await click(screen.getByLabelText('Homme'));
await fillIn(screen.getByLabelText('* Date de naissance'), '01/01/2000');
await click(screen.getByLabelText('* Pays de naissance'));
await fillIn(screen.getByLabelText('Date de naissance *'), '01/01/2000');
await click(screen.getByLabelText('Pays de naissance *'));
await click(screen.getByText('Portugal'));
await fillIn(screen.getByLabelText('* Commune de naissance'), 'Paris');
await fillIn(screen.getByLabelText('Commune de naissance *'), 'Paris');
await click(screen.getByLabelText('Certification Pix'));
await click(screen.getByRole('button', { name: 'Inscrire le candidat' }));

Expand All @@ -129,13 +129,13 @@ module('Acceptance | Session Add Candidate', function (hooks) {

// when
await click(screen.getByRole('button', { name: 'Inscrire un candidat' }));
await fillIn(screen.getByLabelText('* Nom de naissance'), 'Quatorze');
await fillIn(screen.getByLabelText('* Prénom'), 'Louis');
await fillIn(screen.getByLabelText('Nom de naissance *'), 'Quatorze');
await fillIn(screen.getByLabelText('Prénom *'), 'Louis');
await click(screen.getByLabelText('Homme'));
await fillIn(screen.getByLabelText('* Date de naissance'), '01/01/2000');
await click(screen.getByLabelText('* Pays de naissance'));
await fillIn(screen.getByLabelText('Date de naissance *'), '01/01/2000');
await click(screen.getByLabelText('Pays de naissance *'));
await click(screen.getByText('Portugal'));
await fillIn(screen.getByLabelText('* Commune de naissance'), 'Paris');
await fillIn(screen.getByLabelText('Commune de naissance *'), 'Paris');
await click(screen.getByRole('button', { name: 'Inscrire le candidat' }));

// then
Expand All @@ -151,13 +151,13 @@ module('Acceptance | Session Add Candidate', function (hooks) {

// when
await click(screen.getByRole('button', { name: 'Inscrire un candidat' }));
await fillIn(screen.getByLabelText('* Nom de naissance'), 'Quatorze');
await fillIn(screen.getByLabelText('* Prénom'), 'Louis');
await fillIn(screen.getByLabelText('Nom de naissance *'), 'Quatorze');
await fillIn(screen.getByLabelText('Prénom *'), 'Louis');
await click(screen.getByLabelText('Homme'));
await fillIn(screen.getByLabelText('* Date de naissance'), '01/01/2000');
await click(screen.getByLabelText('* Pays de naissance'));
await fillIn(screen.getByLabelText('Date de naissance *'), '01/01/2000');
await click(screen.getByLabelText('Pays de naissance *'));
await click(screen.getByText('Portugal'));
await fillIn(screen.getByLabelText('* Commune de naissance'), 'Paris');
await fillIn(screen.getByLabelText('Commune de naissance *'), 'Paris');
await click(screen.getByLabelText('Double Certification Pix-CléA Numérique'));
await click(screen.getByRole('button', { name: 'Inscrire le candidat' }));

Expand All @@ -174,13 +174,13 @@ module('Acceptance | Session Add Candidate', function (hooks) {

// when
await click(screen.getByRole('button', { name: 'Inscrire un candidat' }));
await fillIn(screen.getByLabelText('* Nom de naissance'), 'Quatorze');
await fillIn(screen.getByLabelText('* Prénom'), 'Louis');
await fillIn(screen.getByLabelText('Nom de naissance *'), 'Quatorze');
await fillIn(screen.getByLabelText('Prénom *'), 'Louis');
await click(screen.getByLabelText('Homme'));
await fillIn(screen.getByLabelText('* Date de naissance'), '01/01/2000');
await click(screen.getByLabelText('* Pays de naissance'));
await fillIn(screen.getByLabelText('Date de naissance *'), '01/01/2000');
await click(screen.getByLabelText('Pays de naissance *'));
await click(screen.getByText('Portugal'));
await fillIn(screen.getByLabelText('* Commune de naissance'), 'Paris');
await fillIn(screen.getByLabelText('Commune de naissance *'), 'Paris');
await click(screen.getByLabelText('Certif complémentaire 2'));
await click(screen.getByRole('button', { name: 'Inscrire le candidat' }));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -454,16 +454,16 @@ module('Acceptance | Session Details Certification Candidates', function (hooks)

await click(screen.getByRole('button', { name: 'Inscrire un candidat' }));
const modal = await screen.findByRole('dialog');
await fillIn(screen.getByLabelText('* Nom de naissance'), 'BackStreet');
await fillIn(screen.getByLabelText('* Prénom'), 'Boys');
await fillIn(screen.getByLabelText('Nom de naissance *'), 'BackStreet');
await fillIn(screen.getByLabelText('Prénom *'), 'Boys');
await click(screen.getByLabelText('Homme'));
await fillIn(screen.getByLabelText('* Date de naissance'), '01/01/2000');
await fillIn(screen.getByLabelText('* Pays de naissance'), '99100');
await fillIn(screen.getByLabelText('Date de naissance *'), '01/01/2000');
await fillIn(screen.getByLabelText('Pays de naissance *'), '99100');
await click(screen.getByLabelText('Code INSEE'));
await fillIn(screen.getByLabelText('Identifiant externe'), '44AA3355');
await fillIn(screen.getByLabelText('* Code INSEE de naissance'), '75100');
await fillIn(screen.getByLabelText('Code INSEE de naissance *'), '75100');
await fillIn(screen.getByLabelText('Temps majoré (%)'), '20');
await click(screen.getByLabelText('* Tarification part Pix'));
await click(screen.getByLabelText('Tarification part Pix *'));
await click(
await screen.findByRole('option', {
name: 'Prépayée',
Expand All @@ -482,14 +482,14 @@ module('Acceptance | Session Details Certification Candidates', function (hooks)
await click(screen.getByRole('button', { name: 'Inscrire un candidat' }));
// then

assert.strictEqual(screen.getByLabelText('* Nom de naissance').value, '');
assert.strictEqual(screen.getByLabelText('* Prénom').value, '');
assert.strictEqual(screen.getByLabelText('Nom de naissance *').value, '');
assert.strictEqual(screen.getByLabelText('Prénom *').value, '');
assert.false(screen.getByLabelText('Homme').checked);
assert.strictEqual(screen.getByLabelText('* Date de naissance').value, '');
assert.strictEqual(screen.getByLabelText('Date de naissance *').value, '');
assert.strictEqual(screen.getByLabelText('Identifiant externe').value, '');
assert.strictEqual(screen.getByLabelText('* Code INSEE de naissance').value, '');
assert.strictEqual(screen.getByLabelText('Code INSEE de naissance *').value, '');
assert.strictEqual(screen.getByLabelText('Temps majoré (%)').value, '');
assert.strictEqual(screen.getByLabelText('* Tarification part Pix').value, '');
assert.strictEqual(screen.getByLabelText('Tarification part Pix *').value, '');
assert.dom(screen.queryByLabelText('Code de prépaiement')).doesNotExist();
assert.strictEqual(
screen.getByLabelText('E-mail du destinataire des résultats (formateur, enseignant...)').value,
Expand Down Expand Up @@ -639,15 +639,15 @@ module('Acceptance | Session Details Certification Candidates', function (hooks)

const screen = await visit(`/sessions/${session.id}/candidats`);
await click(screen.getByRole('button', { name: 'Inscrire un candidat' }));
await fillIn(screen.getByLabelText('* Prénom'), 'Guybrush');
await fillIn(screen.getByLabelText('* Nom de naissance'), 'Threepwood');
await fillIn(screen.getByLabelText('* Date de naissance'), '28/04/2019');
await fillIn(screen.getByLabelText('Prénom *'), 'Guybrush');
await fillIn(screen.getByLabelText('Nom de naissance *'), 'Threepwood');
await fillIn(screen.getByLabelText('Date de naissance *'), '28/04/2019');
await click(screen.getByLabelText('Homme'));
await fillIn(screen.getByLabelText('* Pays de naissance'), '99100');
await fillIn(screen.getByLabelText('Pays de naissance *'), '99100');
await click(screen.getByLabelText('Code INSEE'));
await fillIn(screen.getByLabelText('Identifiant externe'), '44AA3355');
await fillIn(screen.getByLabelText('* Code INSEE de naissance'), '75100');
await click(screen.getByLabelText('* Tarification part Pix'));
await fillIn(screen.getByLabelText('Code INSEE de naissance *'), '75100');
await click(screen.getByLabelText('Tarification part Pix *'));
await click(
await screen.findByRole('option', {
name: 'Prépayée',
Expand All @@ -673,16 +673,16 @@ module('Acceptance | Session Details Certification Candidates', function (hooks)
});
});
async function _fillFormWithCorrectData(screen) {
await fillIn(screen.getByRole('textbox', { name: '* Prénom' }), 'Guybrush');
await fillIn(screen.getByRole('textbox', { name: '* Nom de naissance' }), 'Threepwood');
await fillIn(screen.getByRole('textbox', { name: '* Date de naissance' }), '28/04/2019');
await fillIn(screen.getByRole('textbox', { name: 'Prénom *' }), 'Guybrush');
await fillIn(screen.getByRole('textbox', { name: 'Nom de naissance *' }), 'Threepwood');
await fillIn(screen.getByRole('textbox', { name: 'Date de naissance *' }), '28/04/2019');
await click(screen.getByRole('radio', { name: 'Homme' }));
await fillIn(screen.getByRole('button', { name: '* Pays de naissance' }), '99100');
await fillIn(screen.getByRole('button', { name: 'Pays de naissance *' }), '99100');
await click(screen.getByRole('radio', { name: 'Code INSEE' }));
await fillIn(screen.getByRole('textbox', { name: 'Identifiant externe' }), '44AA3355');
await fillIn(screen.getByRole('textbox', { name: '* Code INSEE de naissance' }), '75100');
await fillIn(screen.getByRole('textbox', { name: 'Code INSEE de naissance *' }), '75100');
await fillIn(screen.getByRole('textbox', { name: 'Temps majoré (%)' }), '20');
await click(screen.getByRole('button', { name: '* Tarification part Pix' }));
await click(screen.getByRole('button', { name: 'Tarification part Pix *' }));
await click(
await screen.findByRole('option', {
name: 'Gratuite',
Expand Down
Loading

0 comments on commit cdb1ead

Please sign in to comment.