diff --git a/orga/app/components/banner/certification.gjs b/orga/app/components/banner/certification.gjs
index 44d5c55a697..98dd89d45d3 100644
--- a/orga/app/components/banner/certification.gjs
+++ b/orga/app/components/banner/certification.gjs
@@ -1,4 +1,4 @@
-import PixBannerAlert from '@1024pix/pix-ui/components/pix-banner-alert';
+import PixNotificationAlert from '@1024pix/pix-ui/components/pix-notification-alert';
import { service } from '@ember/service';
import Component from '@glimmer/component';
import { t } from 'ember-intl';
@@ -21,7 +21,7 @@ export default class InformationBanner extends Component {
{{#if this.displayCertificationBanner}}
-
+
{{t
"banners.certification.message"
documentationLink="https://cloud.pix.fr/s/DEarDXyxFxM78ps"
@@ -29,7 +29,7 @@ export default class InformationBanner extends Component {
htmlSafe=true
year=this.year
}}
-
+
{{/if}}
}
diff --git a/orga/app/components/banner/sco-communication.gjs b/orga/app/components/banner/sco-communication.gjs
index d94098c6287..1d0b17a2ff7 100644
--- a/orga/app/components/banner/sco-communication.gjs
+++ b/orga/app/components/banner/sco-communication.gjs
@@ -1,4 +1,4 @@
-import PixBannerAlert from '@1024pix/pix-ui/components/pix-banner-alert';
+import PixNotificationAlert from '@1024pix/pix-ui/components/pix-notification-alert';
import { LinkTo } from '@ember/routing';
import { service } from '@ember/service';
import Component from '@glimmer/component';
@@ -24,7 +24,7 @@ export default class ScommunicationBanner extends Component {
{{#if this.shouldDisplayBanner}}
-
+
{{t "banners.import.message"}}
-
@@ -40,7 +40,7 @@ export default class ScommunicationBanner extends Component {
- {{t "banners.import.step2" htmlSafe=true}}
- {{t "banners.import.step3" htmlSafe=true}}
-
+
{{/if}}
}
diff --git a/orga/app/components/banner/survey.gjs b/orga/app/components/banner/survey.gjs
index 67fbd1ae3ae..85fb6ed4a23 100644
--- a/orga/app/components/banner/survey.gjs
+++ b/orga/app/components/banner/survey.gjs
@@ -1,4 +1,4 @@
-import PixBannerAlert from '@1024pix/pix-ui/components/pix-banner-alert';
+import PixNotificationAlert from '@1024pix/pix-ui/components/pix-notification-alert';
import { service } from '@ember/service';
import Component from '@glimmer/component';
import { t } from 'ember-intl';
@@ -35,14 +35,14 @@ export default class SurveyBanner extends Component {
{{#if this.shouldDisplayBanner}}
-
+
{{t
"banners.survey.message"
documentationLink=ENV.APP.SURVEY_LINK
linkClasses="link link--banner link--bold link--underlined"
htmlSafe=true
}}
-
+
{{/if}}
}
diff --git a/orga/app/components/campaign/filter/campaign-filters.gjs b/orga/app/components/campaign/filter/campaign-filters.gjs
index fdb218c6774..32b5e9f485c 100644
--- a/orga/app/components/campaign/filter/campaign-filters.gjs
+++ b/orga/app/components/campaign/filter/campaign-filters.gjs
@@ -54,8 +54,8 @@ export default class CampaignFilters extends Component {
<:label>{{t "pages.campaigns-list.action.campaign.label"}}
- <:on>{{t "pages.campaigns-list.action.campaign.ongoing"}}
- <:off>{{t "pages.campaigns-list.action.campaign.archived"}}
+ <:viewA>{{t "pages.campaigns-list.action.campaign.ongoing"}}
+ <:viewB>{{t "pages.campaigns-list.action.campaign.archived"}}
diff --git a/orga/app/components/places/capacity-alert.gjs b/orga/app/components/places/capacity-alert.gjs
index 692c1896403..2d50a83debc 100644
--- a/orga/app/components/places/capacity-alert.gjs
+++ b/orga/app/components/places/capacity-alert.gjs
@@ -1,11 +1,11 @@
-import PixBannerAlert from '@1024pix/pix-ui/components/pix-banner-alert';
+import PixNotificationAlert from '@1024pix/pix-ui/components/pix-notification-alert';
import { t } from 'ember-intl';
import { gt } from 'ember-truth-helpers';
{{#if (gt @occupied @total)}}
-
+
{{t "banners.over-capacity.message"}}
-
+
{{/if}}
diff --git a/orga/app/components/places/places-lot-alert.gjs b/orga/app/components/places/places-lot-alert.gjs
index 8fe88c0ea2c..2cf0649a835 100644
--- a/orga/app/components/places/places-lot-alert.gjs
+++ b/orga/app/components/places/places-lot-alert.gjs
@@ -1,4 +1,4 @@
-import PixBannerAlert from '@1024pix/pix-ui/components/pix-banner-alert';
+import PixNotificationAlert from '@1024pix/pix-ui/components/pix-notification-alert';
import dayjs from 'dayjs';
import { t } from 'ember-intl';
import { STATUSES } from 'pix-orga/models/organization-places-lot.js';
@@ -29,8 +29,8 @@ function isAlertVisible(placesLots) {
{{#if (isAlertVisible @placesLots)}}
-
+
{{t "banners.last-places-lot-available.message" days=(getCountdDownDays @placesLots)}}
-
+
{{/if}}
diff --git a/orga/app/templates/authenticated/missions/list.hbs b/orga/app/templates/authenticated/missions/list.hbs
index 7f074cdb94e..2980ab0826c 100644
--- a/orga/app/templates/authenticated/missions/list.hbs
+++ b/orga/app/templates/authenticated/missions/list.hbs
@@ -1,6 +1,6 @@
{{page-title (t "pages.missions.title")}}
-
+
{{t "pages.missions.list.banner.welcome"}}
@@ -58,7 +58,7 @@
{{html-unsafe (t "pages.missions.list.banner.step3")}}
-
+
{{t "pages.missions.title"}}
{{#if @model.missions}}
diff --git a/orga/app/templates/authenticated/team/new.hbs b/orga/app/templates/authenticated/team/new.hbs
index 3046ecdee7e..82779161c2b 100644
--- a/orga/app/templates/authenticated/team/new.hbs
+++ b/orga/app/templates/authenticated/team/new.hbs
@@ -5,7 +5,9 @@
{{t "pages.team-new.title"}}
- {{t "pages.team-new.warning"}}
+ {{t
+ "pages.team-new.warning"
+ }}
{{t "pages.team-new.email-requirement"}}
diff --git a/orga/package-lock.json b/orga/package-lock.json
index 0a70be1d733..e02d69288dd 100644
--- a/orga/package-lock.json
+++ b/orga/package-lock.json
@@ -14,7 +14,7 @@
"@1024pix/ember-matomo-tag-manager": "^2.4.3",
"@1024pix/ember-testing-library": "^3.0.6",
"@1024pix/eslint-config": "^1.3.8",
- "@1024pix/pix-ui": "^49.4.1",
+ "@1024pix/pix-ui": "^51.2.0",
"@1024pix/stylelint-config": "^5.1.24",
"@babel/eslint-parser": "^7.19.1",
"@babel/plugin-proposal-decorators": "^7.20.13",
@@ -922,9 +922,9 @@
}
},
"node_modules/@1024pix/pix-ui": {
- "version": "49.4.1",
- "resolved": "https://registry.npmjs.org/@1024pix/pix-ui/-/pix-ui-49.4.1.tgz",
- "integrity": "sha512-/Nx8SD3KgR6xuw+4G72c/zI9KTSY8q3WG6zXmEP9QGDz+w30KNYfjC+ed0fLcSE9eT4iP54VTZYxrPeyLxJcyw==",
+ "version": "51.2.0",
+ "resolved": "https://registry.npmjs.org/@1024pix/pix-ui/-/pix-ui-51.2.0.tgz",
+ "integrity": "sha512-SYiCwxizS2dgAbQ4w2SrrBFUyIdRxPLAywDCArzFjpG5Dlruz7x0Gehz729wI5gUGObaslUGokHr3bNKU7tPyw==",
"dev": true,
"hasInstallScript": true,
"license": "MIT",
diff --git a/orga/package.json b/orga/package.json
index 7fc1cae2d3d..f0e33ef9264 100644
--- a/orga/package.json
+++ b/orga/package.json
@@ -55,7 +55,7 @@
"@1024pix/ember-matomo-tag-manager": "^2.4.3",
"@1024pix/ember-testing-library": "^3.0.6",
"@1024pix/eslint-config": "^1.3.8",
- "@1024pix/pix-ui": "^49.4.1",
+ "@1024pix/pix-ui": "^51.2.0",
"@1024pix/stylelint-config": "^5.1.24",
"@babel/eslint-parser": "^7.19.1",
"@babel/plugin-proposal-decorators": "^7.20.13",
diff --git a/orga/tests/integration/components/banner/sco-communication-test.gjs b/orga/tests/integration/components/banner/sco-communication-test.gjs
index 4dacd313c5b..940e8cd1763 100644
--- a/orga/tests/integration/components/banner/sco-communication-test.gjs
+++ b/orga/tests/integration/components/banner/sco-communication-test.gjs
@@ -8,6 +8,10 @@ import setupIntlRenderingTest from '../../../helpers/setup-intl-rendering';
module('Integration | Component | Banner::Sco-communication', function (hooks) {
setupIntlRenderingTest(hooks);
+ hooks.beforeEach(function () {
+ this.intl = this.owner.lookup('service:intl');
+ });
+
module('Import Banner', function () {
module('when prescriber’s organization is of type SCO that manages students', function () {
[
@@ -34,7 +38,7 @@ module('Integration | Component | Banner::Sco-communication', function (hooks) {
const screen = await render();
// then
- assert.ok(screen.getByRole('alert'));
+ assert.ok(screen.getByText(this.intl.t('banners.import.message')));
const downloadLink = screen.getByRole('link', { name: 'télécharger les résultats' });
assert.strictEqual(downloadLink.href, 'https://cloud.pix.fr/s/WjTnkSbFs9TDcSC');
diff --git a/orga/tests/integration/components/places/capacity-alert_test.gjs b/orga/tests/integration/components/places/capacity-alert_test.gjs
index c3d55f57175..6be4bdc5866 100644
--- a/orga/tests/integration/components/places/capacity-alert_test.gjs
+++ b/orga/tests/integration/components/places/capacity-alert_test.gjs
@@ -13,20 +13,20 @@ module('Integration | Component | Places | CapacityAlert', function (hooks) {
const screen = await render();
// then
- assert.ok(screen.getByRole('alert', { value: t('banners.over-capacity.message') }));
+ assert.ok(screen.getByText(t('banners.over-capacity.message')));
});
test('it should not show alert if occupied seats is equal to total seats', async function (assert) {
// when
const screen = await render();
// then
- assert.notOk(screen.queryByRole('alert', { value: t('banners.over-capacity.message') }));
+ assert.notOk(screen.queryByText(t('banners.over-capacity.message')));
});
test('it should not show alert if occupied seats is less to total seats', async function (assert) {
// when
const screen = await render();
// then
- assert.notOk(screen.queryByRole('alert', { value: t('banners.over-capacity.message') }));
+ assert.notOk(screen.queryByText(t('banners.over-capacity.message')));
});
});
diff --git a/orga/tests/integration/components/places/places-lot-alert-test.gjs b/orga/tests/integration/components/places/places-lot-alert-test.gjs
index d419d0038b6..8e783d8f767 100644
--- a/orga/tests/integration/components/places/places-lot-alert-test.gjs
+++ b/orga/tests/integration/components/places/places-lot-alert-test.gjs
@@ -33,7 +33,8 @@ module('Integration | Component | Places | PlacesLotsAlert', function (hooks) {
];
// when
const screen = await render();
- const banner = screen.getByRole('alert', { value: t('banners.last-places-lot-available.message') });
+ const banner = screen.getByText(t('banners.last-places-lot-available.message', { days: 27 }));
+
// then
assert.strictEqual(banner.outerText, t('banners.last-places-lot-available.message', { days: 27 }));
});
@@ -57,7 +58,7 @@ module('Integration | Component | Places | PlacesLotsAlert', function (hooks) {
const screen = await render();
// then
- assert.notOk(screen.queryByRole('alert', { value: t('banners.last-places-lot-available.message') }));
+ assert.notOk(screen.queryByText(t('banners.last-places-lot-available.message')));
});
test('it should not show an alert if remaining days before places lot expires in more than 30 days', async function (assert) {
// given
@@ -73,7 +74,7 @@ module('Integration | Component | Places | PlacesLotsAlert', function (hooks) {
const screen = await render();
// then
- assert.notOk(screen.queryByRole('alert', { value: t('banners.last-places-lot-available.message') }));
+ assert.notOk(screen.queryByText(t('banners.last-places-lot-available.message')));
});
test('it should not show alert if there is `PENDING` placesLots', async function (assert) {
// given
@@ -95,7 +96,7 @@ module('Integration | Component | Places | PlacesLotsAlert', function (hooks) {
const screen = await render();
// then
- assert.notOk(screen.queryByRole('alert', { value: t('banners.last-places-lot-available.message') }));
+ assert.notOk(screen.queryByText(t('banners.last-places-lot-available.message')));
});
test('it should not show alert if there is no ACTIVE placesLots', async function (assert) {
// given
@@ -111,7 +112,7 @@ module('Integration | Component | Places | PlacesLotsAlert', function (hooks) {
const screen = await render();
// then
- assert.notOk(screen.queryByRole('alert', { value: t('banners.last-places-lot-available.message') }));
+ assert.notOk(screen.queryByText(t('banners.last-places-lot-available.message')));
});
test('it should not show alert if there is no placesLots', async function (assert) {
// given
@@ -120,6 +121,6 @@ module('Integration | Component | Places | PlacesLotsAlert', function (hooks) {
const screen = await render();
// then
- assert.notOk(screen.queryByRole('alert', { value: t('banners.last-places-lot-available.message') }));
+ assert.notOk(screen.queryByText(t('banners.last-places-lot-available.message')));
});
});