diff --git a/high-level-tests/e2e/cypress/integration/pix-app/page-title.feature b/high-level-tests/e2e/cypress/integration/pix-app/page-title.feature index 475da2e51fa..bf3f98aa1e7 100644 --- a/high-level-tests/e2e/cypress/integration/pix-app/page-title.feature +++ b/high-level-tests/e2e/cypress/integration/pix-app/page-title.feature @@ -10,7 +10,7 @@ Fonctionnalité: Titre des pages Et je vais sur Pix Et je suis connecté à Pix en tant que "Daenerys Targaryen" Lorsque je clique sur "Compétences" - Alors je vois le titre de la page "Compétences | Pix" + Alors je vois le titre de la page "Compétences Pix | Pix" Scénario: j'accède à la page compétence Étant donné que tous les comptes sont créés diff --git a/high-level-tests/e2e/cypress/support/step_definitions/login-logout.js b/high-level-tests/e2e/cypress/support/step_definitions/login-logout.js index 3c2d80d987c..af7025d9ba6 100644 --- a/high-level-tests/e2e/cypress/support/step_definitions/login-logout.js +++ b/high-level-tests/e2e/cypress/support/step_definitions/login-logout.js @@ -63,8 +63,8 @@ Then(`je suis redirigé vers le profil de {string}`, (firstName) => { cy.get(".logged-user-name").should((userName) => { expect(userName.text()).to.contains(firstName); }); - cy.get(".rounded-panel-title").should((title) => { - expect(title.text()).to.contains("Vous avez 16 compétences à tester."); + cy.get(".global-page-header__title").should((title) => { + expect(title.text()).to.contains("Compétences Pix"); }); }); diff --git a/mon-pix/tests/acceptance/competence-profile-test.js b/mon-pix/tests/acceptance/competence-profile-test.js index b0d15c5bdc0..c62ad3e8c19 100644 --- a/mon-pix/tests/acceptance/competence-profile-test.js +++ b/mon-pix/tests/acceptance/competence-profile-test.js @@ -32,11 +32,14 @@ module('Acceptance | Profile | Start competence', function (hooks) { server.create('competence-evaluation', { user, competenceId, assessment }); // when - await visit('/competences'); + const screen = await visit('/competences'); + // await this.pauseTest(); await setBreakpoint('tablet'); - await click( - `.rounded-panel-body__areas:nth-of-type(${firstScorecard.area.code}) .rounded-panel-body__competence-card:nth-of-type(${competenceNumber}) .competence-card__button`, + + const cardName = new RegExp( + `Reprendre la compétence Area_${firstScorecard.area.code}_Competence_${competenceNumber}`, ); + await click(screen.getByRole('link', { name: cardName })); // then assert.ok(currentURL().includes('/assessments/')); diff --git a/mon-pix/tests/acceptance/user-certifications-test.js b/mon-pix/tests/acceptance/user-certifications-test.js index c395cc3b87b..473230b1772 100644 --- a/mon-pix/tests/acceptance/user-certifications-test.js +++ b/mon-pix/tests/acceptance/user-certifications-test.js @@ -1,6 +1,7 @@ import { visit } from '@1024pix/ember-testing-library'; import { currentURL, findAll } from '@ember/test-helpers'; import { setupMirage } from 'ember-cli-mirage/test-support'; +import { t } from 'ember-intl/test-support'; import { setupApplicationTest } from 'ember-qunit'; import { module, test } from 'qunit'; @@ -49,10 +50,10 @@ module('Acceptance | User certifications page', function (hooks) { test('should render a title for the page', async function (assert) { // when await authenticate(userWithNoCertificates); - await visit('/mes-certifications'); + const screen = await visit('/mes-certifications'); // then - assert.dom('.user-certifications-page__title').exists(); + assert.dom(screen.getByRole('heading', { name: t('pages.certifications-list.title') })).exists(); }); test('should render the panel which contains informations about certifications of the connected user', async function (assert) { diff --git a/mon-pix/tests/acceptance/user-dashboard-test.js b/mon-pix/tests/acceptance/user-dashboard-test.js index 38a7af6d501..220c584b75e 100644 --- a/mon-pix/tests/acceptance/user-dashboard-test.js +++ b/mon-pix/tests/acceptance/user-dashboard-test.js @@ -228,14 +228,14 @@ module('Acceptance | User dashboard page', function (hooks) { await authenticate(user); const screen = await visit('/accueil'); - assert.dom(screen.getByRole('heading', { name: 'Bonjour Henri, découvrez votre tableau de bord.' })).exists(); + assert.dom(screen.getByRole('heading', { name: 'Bonjour, découvrez votre tableau de bord.' })).exists(); // when await click(screen.getByRole('button', { name: 'Fermer la bannière' })); // then assert - .dom(screen.queryByRole('heading', { name: 'Bonjour Henri, découvrez votre tableau de bord.' })) + .dom(screen.queryByRole('heading', { name: 'Bonjour, découvrez votre tableau de bord.' })) .doesNotExist(); }); }); diff --git a/mon-pix/tests/integration/components/dashboard/content-test.js b/mon-pix/tests/integration/components/dashboard/content-test.js index 02751d390ed..d027cb507f1 100644 --- a/mon-pix/tests/integration/components/dashboard/content-test.js +++ b/mon-pix/tests/integration/components/dashboard/content-test.js @@ -383,7 +383,7 @@ module('Integration | Component | Dashboard | Content', function (hooks) { const screen = await render(hbs``); // then - assert.dom(screen.getByRole('heading', { name: 'Bonjour Banana, découvrez votre tableau de bord.' })).exists(); + assert.dom(screen.getByRole('heading', { name: 'Bonjour, découvrez votre tableau de bord.' })).exists(); }); test('should not display NewInformation on dashboard if user has close it before', async function (assert) { @@ -484,7 +484,7 @@ module('Integration | Component | Dashboard | Content', function (hooks) { const screen = await render(hbs``); // then - assert.dom(screen.getByRole('heading', { name: 'Bonjour Banana, découvrez votre tableau de bord.' })).exists(); + assert.dom(screen.getByRole('heading', { name: 'Bonjour, découvrez votre tableau de bord.' })).exists(); assert.dom(screen.queryByRole('link', { name: t('pages.dashboard.presentation.link.text') })).doesNotExist(); }); });