From f4184ec1a4a1d065e74f878627b3d61d684ab971 Mon Sep 17 00:00:00 2001 From: AndreiaPena Date: Fri, 7 Mar 2025 19:20:46 +0100 Subject: [PATCH 1/5] =?UTF-8?q?=F0=9F=94=A5=20admin:=20remove=20unused=20c?= =?UTF-8?q?ss?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/components/to-be-published-sessions/list-items.gjs | 1 - admin/app/styles/app.scss | 2 -- admin/app/styles/components/publish-session-button.scss | 6 ------ admin/app/styles/globals/table-admin.scss | 4 ---- admin/app/styles/globals/toggle.scss | 5 ----- 5 files changed, 18 deletions(-) delete mode 100644 admin/app/styles/components/publish-session-button.scss delete mode 100644 admin/app/styles/globals/toggle.scss diff --git a/admin/app/components/to-be-published-sessions/list-items.gjs b/admin/app/components/to-be-published-sessions/list-items.gjs index 304e6a3f575..a9873287aeb 100644 --- a/admin/app/components/to-be-published-sessions/list-items.gjs +++ b/admin/app/components/to-be-published-sessions/list-items.gjs @@ -84,7 +84,6 @@ export default class ToBePublishedSessionsList extends Component { <:cell> :not(.x-toggle-container-checked) { - .x-toggle-btn { - background: var(--pix-neutral-100) !important; - } -} From ddaf6b0ceaf762641aff16ab4afb78b76a6d5280 Mon Sep 17 00:00:00 2001 From: AndreiaPena Date: Fri, 7 Mar 2025 19:45:03 +0100 Subject: [PATCH 2/5] =?UTF-8?q?=E2=9C=A8=20certif:=20use=20PixTable=20on?= =?UTF-8?q?=20details=20list?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../certification/details-v3.gjs | 237 +++++++++--------- .../certification/details-v3.scss | 48 +--- 2 files changed, 131 insertions(+), 154 deletions(-) diff --git a/admin/app/components/certifications/certification/details-v3.gjs b/admin/app/components/certifications/certification/details-v3.gjs index 325dab7d2bb..95f0e75ef55 100644 --- a/admin/app/components/certifications/certification/details-v3.gjs +++ b/admin/app/components/certifications/certification/details-v3.gjs @@ -1,10 +1,12 @@ import PixButton from '@1024pix/pix-ui/components/pix-button'; import PixIcon from '@1024pix/pix-ui/components/pix-icon'; +import PixIconButton from '@1024pix/pix-ui/components/pix-icon-button'; import PixModal from '@1024pix/pix-ui/components/pix-modal'; +import PixTable from '@1024pix/pix-ui/components/pix-table'; +import PixTableColumn from '@1024pix/pix-ui/components/pix-table-column'; import PixTag from '@1024pix/pix-ui/components/pix-tag'; import PixTooltip from '@1024pix/pix-ui/components/pix-tooltip'; import { fn } from '@ember/helper'; -import { on } from '@ember/modifier'; import { action } from '@ember/object'; import Component from '@glimmer/component'; import { tracked } from '@glimmer/tracking'; @@ -306,120 +308,125 @@ export default class DetailsV3 extends Component {

{{t "pages.certifications.certification.details.v3.questions-list.title"}}

-
-
- - - - - - - - - - - - - - {{#each @details.certificationChallengesForAdministration as |certificationChallenge|}} - - - - - - - - - - {{/each}} - -
- {{t "pages.certifications.certification.details.v3.questions-list.labels.number"}} - - {{t "pages.certifications.certification.details.v3.questions-list.labels.answered-at"}} - - {{t "pages.certifications.certification.details.v3.questions-list.labels.answer-status"}} - - {{t "pages.certifications.certification.details.v3.questions-list.labels.competence"}} - - {{t "pages.certifications.certification.details.v3.questions-list.labels.skill"}} - - {{t "pages.certifications.certification.details.v3.questions-list.labels.challenge-id"}} - {{t "pages.certifications.certification.details.v3.questions-list.labels.actions"}}
{{certificationChallenge.questionNumber}} - {{#if certificationChallenge.answeredAt}} - - {{else}} - - - {{/if}} - - {{#if (this.shouldDisplayAnswerStatus certificationChallenge)}} - - {{t (this.answerStatusLabel certificationChallenge.answerStatus)}} - - {{else}} - - - {{/if}} - {{certificationChallenge.competenceIndex}} {{certificationChallenge.competenceName}}{{certificationChallenge.skillName}} - - {{certificationChallenge.id}} - - - - - - - - {{#if certificationChallenge.validatedLiveAlert}} - - {{/if}} - - {{#if (this.shouldDisplayAnswerValueIcon certificationChallenge)}} - - {{/if}} -
-
-
+ + <:columns as |certificationChallenge context|> + + <:header> + {{t "pages.certifications.certification.details.v3.questions-list.labels.number"}} + + <:cell> + {{certificationChallenge.questionNumber}} + + + + <:header> + {{t "pages.certifications.certification.details.v3.questions-list.labels.answered-at"}} + + <:cell> + {{#if certificationChallenge.answeredAt}} + + {{else}} + - + {{/if}} + + + + <:header> + {{t "pages.certifications.certification.details.v3.questions-list.labels.answer-status"}} + + <:cell> + {{#if (this.shouldDisplayAnswerStatus certificationChallenge)}} + + {{t (this.answerStatusLabel certificationChallenge.answerStatus)}} + + {{else}} + - + {{/if}} + + + + <:header> + {{t "pages.certifications.certification.details.v3.questions-list.labels.competence"}} + + <:cell> + {{certificationChallenge.competenceIndex}} + {{certificationChallenge.competenceName}} + + + + <:header> + {{t "pages.certifications.certification.details.v3.questions-list.labels.skill"}} + + <:cell> + {{certificationChallenge.skillName}} + + + + <:header> + {{t "pages.certifications.certification.details.v3.questions-list.labels.challenge-id"}} + + <:cell> + + {{certificationChallenge.id}} + + + + + + <:header> + {{t "pages.certifications.certification.details.v3.questions-list.labels.actions"}} + + <:cell> + + + + {{#if certificationChallenge.validatedLiveAlert}} + + {{/if}} + + {{#if (this.shouldDisplayAnswerValueIcon certificationChallenge)}} + + {{/if}} + + + + Date: Mon, 10 Mar 2025 09:26:00 +0100 Subject: [PATCH 3/5] =?UTF-8?q?=E2=9C=A8=20certif:=20use=20PixTable=20on?= =?UTF-8?q?=20scoring=20simulator=20list?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../certification/scoring-simulator.gjs | 49 ++++++++++--------- admin/tests/acceptance/administration-test.js | 4 +- 2 files changed, 29 insertions(+), 24 deletions(-) diff --git a/admin/app/components/administration/certification/scoring-simulator.gjs b/admin/app/components/administration/certification/scoring-simulator.gjs index f2c6b09f6d8..d01b0d7965e 100644 --- a/admin/app/components/administration/certification/scoring-simulator.gjs +++ b/admin/app/components/administration/certification/scoring-simulator.gjs @@ -1,7 +1,8 @@ -import PixBlock from '@1024pix/pix-ui/components/pix-block'; import PixButton from '@1024pix/pix-ui/components/pix-button'; import PixInput from '@1024pix/pix-ui/components/pix-input'; import PixNotificationAlert from '@1024pix/pix-ui/components/pix-notification-alert'; +import PixTable from '@1024pix/pix-ui/components/pix-table'; +import PixTableColumn from '@1024pix/pix-ui/components/pix-table-column'; import { on } from '@ember/modifier'; import { action } from '@ember/object'; import { service } from '@ember/service'; @@ -118,27 +119,31 @@ export default class ScoringSimulator extends Component { {{#if this.simulatorReport.data.attributes.competences}} - - - - - - - - - - {{#each this.simulatorReport.data.attributes.competences as |competence|}} - - - - - {{/each}} - -
{{t "pages.administration.certification.scoring-simulator.table.headers.competence"}}{{t "pages.administration.certification.scoring-simulator.table.headers.level"}}
{{competence.competenceCode}}{{competence.level}}
-
+ + <:columns as |competence context|> + + <:header> + {{t "pages.administration.certification.scoring-simulator.table.headers.competence"}} + + <:cell> + {{competence.competenceCode}} + + + + <:header> + {{t "pages.administration.certification.scoring-simulator.table.headers.level"}} + + <:cell> + {{competence.level}} + + + + {{/if}} } diff --git a/admin/tests/acceptance/administration-test.js b/admin/tests/acceptance/administration-test.js index 5f429065045..d7bb18751b7 100644 --- a/admin/tests/acceptance/administration-test.js +++ b/admin/tests/acceptance/administration-test.js @@ -169,7 +169,7 @@ module('Acceptance | administration | common ', function (hooks) { assert.dom(within(table).getByRole('columnheader', { name: 'Compétence' })).exists(); assert.dom(within(table).getByRole('columnheader', { name: 'Niveau' })).exists(); - assert.dom(within(rows[1]).getByRole('rowheader', { name: '1.1' })).exists(); + assert.dom(within(rows[1]).getByRole('cell', { name: '1.1' })).exists(); assert.dom(within(rows[1]).getByRole('cell', { name: '3' })).exists(); }); }); @@ -195,7 +195,7 @@ module('Acceptance | administration | common ', function (hooks) { assert.dom(within(table).getByRole('columnheader', { name: 'Compétence' })).exists(); assert.dom(within(table).getByRole('columnheader', { name: 'Niveau' })).exists(); - assert.dom(within(rows[1]).getByRole('rowheader', { name: '1.1' })).exists(); + assert.dom(within(rows[1]).getByRole('cell', { name: '1.1' })).exists(); assert.dom(within(rows[1]).getByRole('cell', { name: '3' })).exists(); }); }); From f878b5d3b87c9ef3a5543c14438bbbd02bc33d28 Mon Sep 17 00:00:00 2001 From: AndreiaPena Date: Mon, 10 Mar 2025 09:26:12 +0100 Subject: [PATCH 4/5] =?UTF-8?q?=E2=9C=A8=20certif:=20use=20PixTable=20on?= =?UTF-8?q?=20competences=20list?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../certifications/competence-list.gjs | 59 ++++++++++++------- .../certification/informations-test.js | 2 +- .../certifications/competence-list-test.gjs | 10 ++-- 3 files changed, 43 insertions(+), 28 deletions(-) diff --git a/admin/app/components/certifications/competence-list.gjs b/admin/app/components/certifications/competence-list.gjs index 2b9307cc56e..aaaa9c8cff6 100644 --- a/admin/app/components/certifications/competence-list.gjs +++ b/admin/app/components/certifications/competence-list.gjs @@ -1,3 +1,5 @@ +import PixTable from '@1024pix/pix-ui/components/pix-table'; +import PixTableColumn from '@1024pix/pix-ui/components/pix-table-column'; import { concat, fn, get } from '@ember/helper'; import { on } from '@ember/modifier'; import { action } from '@ember/object'; @@ -82,28 +84,41 @@ export default class CertificationCompetenceList extends Component { {{/each}} {{else}} - - - - - {{#if @shouldDisplayPixScore}} - - {{/if}} - - - - - {{#each @competences as |competence|}} - - - {{#if @shouldDisplayPixScore}} - - {{/if}} - - - {{/each}} - -
{{t "pages.certifications.certification.result.table.headers.competence"}}{{t "pages.certifications.certification.result.table.headers.score"}}{{t "pages.certifications.certification.result.table.headers.level"}}
{{competence.index}}{{competence.score}}{{competence.level}}
+ + <:columns as |competence context|> + + <:header> + {{t "pages.certifications.certification.result.table.headers.competence"}} + + <:cell> + {{competence.index}} + + + {{#if @shouldDisplayPixScore}} + + <:header> + {{t "pages.certifications.certification.result.table.headers.score"}} + + <:cell> + {{competence.score}} + + + {{/if}} + + <:header> + {{t "pages.certifications.certification.result.table.headers.level"}} + + <:cell> + {{competence.level}} + + + + {{/if}} } diff --git a/admin/tests/acceptance/authenticated/certifications/certification/informations-test.js b/admin/tests/acceptance/authenticated/certifications/certification/informations-test.js index 5b653d431c0..eef605d437e 100644 --- a/admin/tests/acceptance/authenticated/certifications/certification/informations-test.js +++ b/admin/tests/acceptance/authenticated/certifications/certification/informations-test.js @@ -101,7 +101,7 @@ module('Acceptance | Route | routes/authenticated/certifications/certification | assert.dom(within(table).getByRole('columnheader', { name: 'Compétence' })).exists(); assert.dom(within(table).getByRole('columnheader', { name: 'Score' })).exists(); assert.dom(within(table).getByRole('columnheader', { name: 'Niveau' })).exists(); - assert.dom(within(rows[1]).getByRole('rowheader', { name: '1.1' })).exists(); + assert.dom(within(rows[1]).getByRole('cell', { name: '1.1' })).exists(); assert.dom(within(rows[1]).getByRole('cell', { name: '10' })).exists(); assert.dom(within(rows[1]).getByRole('cell', { name: '4' })).exists(); }); diff --git a/admin/tests/integration/components/certifications/competence-list-test.gjs b/admin/tests/integration/components/certifications/competence-list-test.gjs index 3ba7e4f9f23..8c5be4aaeb7 100644 --- a/admin/tests/integration/components/certifications/competence-list-test.gjs +++ b/admin/tests/integration/components/certifications/competence-list-test.gjs @@ -28,15 +28,15 @@ module('Integration | Component | certifications/competence-list', function (hoo assert.dom(within(rows[0]).getByRole('columnheader', { name: 'Score' })).exists(); assert.dom(within(rows[0]).getByRole('columnheader', { name: 'Niveau' })).exists(); - assert.dom(within(rows[1]).getByRole('rowheader', { name: '1.1' })).exists(); + assert.dom(within(rows[1]).getByRole('cell', { name: '1.1' })).exists(); assert.dom(within(rows[1]).getByRole('cell', { name: '30' })).exists(); assert.dom(within(rows[1]).getByRole('cell', { name: '3' })).exists(); - assert.dom(within(rows[2]).getByRole('rowheader', { name: '2.1' })).exists(); + assert.dom(within(rows[2]).getByRole('cell', { name: '2.1' })).exists(); assert.dom(within(rows[2]).getByRole('cell', { name: '20' })).exists(); assert.dom(within(rows[2]).getByRole('cell', { name: '2' })).exists(); - assert.dom(within(rows[3]).getByRole('rowheader', { name: '5.2' })).exists(); + assert.dom(within(rows[3]).getByRole('cell', { name: '5.2' })).exists(); assert.dom(within(rows[3]).getByRole('cell', { name: '10' })).exists(); assert.dom(within(rows[3]).getByRole('cell', { name: '1' })).exists(); }); @@ -57,7 +57,7 @@ module('Integration | Component | certifications/competence-list', function (hoo assert.dom(within(table).getByRole('columnheader', { name: 'Compétence' })).exists(); assert.dom(within(table).getByRole('columnheader', { name: 'Score' })).exists(); assert.dom(within(table).getByRole('columnheader', { name: 'Niveau' })).exists(); - assert.dom(within(rows[1]).getByRole('rowheader', { name: '1.1' })).exists(); + assert.dom(within(rows[1]).getByRole('cell', { name: '1.1' })).exists(); assert.dom(within(rows[1]).getByRole('cell', { name: '30' })).exists(); assert.dom(within(rows[1]).getByRole('cell', { name: '3' })).exists(); }); @@ -120,7 +120,7 @@ module('Integration | Component | certifications/competence-list', function (hoo assert.dom(within(rows[0]).getByRole('columnheader', { name: 'Compétence' })).exists(); assert.dom(within(rows[0]).getByRole('columnheader', { name: 'Niveau' })).exists(); - assert.dom(within(rows[1]).getByRole('rowheader', { name: '1.1' })).exists(); + assert.dom(within(rows[1]).getByRole('cell', { name: '1.1' })).exists(); assert.dom(within(rows[1]).getByRole('cell', { name: '3' })).exists(); assert.dom(screen.queryByText('Score')).doesNotExist(); From 948f15f31065c4ffc81346141dfc6df399bb7ae4 Mon Sep 17 00:00:00 2001 From: AndreiaPena Date: Tue, 11 Mar 2025 18:01:50 +0100 Subject: [PATCH 5/5] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20admin:=20fix=20skipped?= =?UTF-8?q?=20test?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../deployment/organizations-import-test.gjs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/admin/tests/integration/components/administration/deployment/organizations-import-test.gjs b/admin/tests/integration/components/administration/deployment/organizations-import-test.gjs index c0d2376c7c4..594be879d1f 100644 --- a/admin/tests/integration/components/administration/deployment/organizations-import-test.gjs +++ b/admin/tests/integration/components/administration/deployment/organizations-import-test.gjs @@ -24,7 +24,7 @@ module('Integration | Component | administration/organizations-import', functio }); module('when import succeeds', function () { - test.skip('it displays a success notification', async function (assert) { + test('it displays a success notification', async function (assert) { // given const file = new Blob(['foo'], { type: `valid-file` }); class NotificationsStub extends Service { @@ -40,10 +40,9 @@ module('Integration | Component | administration/organizations-import', functio // then assert.ok(true); - sinon.assert.calledWith( - notificationSuccessStub, - t('components.administration.organizations-import.notifications.success'), - ); + sinon.assert.calledWith(notificationSuccessStub, { + message: t('components.administration.organizations-import.notifications.success'), + }); }); });