From 8dfeae070d6322a8fa12c37594e2407abeb1b48a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marie-H=C3=A9l=C3=A8ne?= Date: Thu, 5 Oct 2023 16:09:38 +0200 Subject: [PATCH 1/5] tech(orga): use render from @1024pix in UI integration tests --- orga/tests/integration/components/ui/chevron_test.js | 3 ++- orga/tests/integration/components/ui/empty-state_test.js | 2 +- orga/tests/integration/components/ui/pix-loader_test.js | 2 +- .../integration/components/ui/previous-page-button_test.js | 3 +-- orga/tests/integration/components/ui/search-input_test.js | 3 +-- 5 files changed, 6 insertions(+), 7 deletions(-) diff --git a/orga/tests/integration/components/ui/chevron_test.js b/orga/tests/integration/components/ui/chevron_test.js index c388bf41124..d6d7be314d2 100644 --- a/orga/tests/integration/components/ui/chevron_test.js +++ b/orga/tests/integration/components/ui/chevron_test.js @@ -1,7 +1,8 @@ import { module, test } from 'qunit'; import { setupRenderingTest } from 'ember-qunit'; import sinon from 'sinon'; -import { render, click } from '@ember/test-helpers'; +import { click } from '@ember/test-helpers'; +import { render } from '@1024pix/ember-testing-library'; import { hbs } from 'ember-cli-htmlbars'; module('Integration | Component | Ui::Chevron', function (hooks) { diff --git a/orga/tests/integration/components/ui/empty-state_test.js b/orga/tests/integration/components/ui/empty-state_test.js index 8ff99706abb..9e3f2c61235 100644 --- a/orga/tests/integration/components/ui/empty-state_test.js +++ b/orga/tests/integration/components/ui/empty-state_test.js @@ -1,5 +1,5 @@ import { module, test } from 'qunit'; -import { render } from '@ember/test-helpers'; +import { render } from '@1024pix/ember-testing-library'; import { hbs } from 'ember-cli-htmlbars'; import setupIntlRenderingTest from '../../../helpers/setup-intl-rendering'; diff --git a/orga/tests/integration/components/ui/pix-loader_test.js b/orga/tests/integration/components/ui/pix-loader_test.js index 439687fa190..6fc4e324eef 100644 --- a/orga/tests/integration/components/ui/pix-loader_test.js +++ b/orga/tests/integration/components/ui/pix-loader_test.js @@ -1,6 +1,6 @@ import { module, test } from 'qunit'; import setupIntlRenderingTest from '../../../helpers/setup-intl-rendering'; -import { render } from '@ember/test-helpers'; +import { render } from '@1024pix/ember-testing-library'; import { hbs } from 'ember-cli-htmlbars'; module('Integration | Component | Ui::PixLoader', function (hooks) { diff --git a/orga/tests/integration/components/ui/previous-page-button_test.js b/orga/tests/integration/components/ui/previous-page-button_test.js index 0e2bd8e4cd5..c9b1f2cdbc9 100644 --- a/orga/tests/integration/components/ui/previous-page-button_test.js +++ b/orga/tests/integration/components/ui/previous-page-button_test.js @@ -1,9 +1,8 @@ import { module, test } from 'qunit'; import { setupRenderingTest } from 'ember-qunit'; -import { render } from '@ember/test-helpers'; import { hbs } from 'ember-cli-htmlbars'; import sinon from 'sinon'; -import { clickByName } from '@1024pix/ember-testing-library'; +import { render, clickByName } from '@1024pix/ember-testing-library'; module('Integration | Component | Ui::PreviousPageButton', function (hooks) { setupRenderingTest(hooks); diff --git a/orga/tests/integration/components/ui/search-input_test.js b/orga/tests/integration/components/ui/search-input_test.js index 510c3e8fed1..04a16e34575 100644 --- a/orga/tests/integration/components/ui/search-input_test.js +++ b/orga/tests/integration/components/ui/search-input_test.js @@ -1,9 +1,8 @@ import { module, test } from 'qunit'; import sinon from 'sinon'; import { setupRenderingTest } from 'ember-qunit'; -import { render } from '@ember/test-helpers'; import { hbs } from 'ember-cli-htmlbars'; -import { fillByLabel } from '@1024pix/ember-testing-library'; +import { render, fillByLabel } from '@1024pix/ember-testing-library'; module('Integration | Component | Ui::SearchInput', function (hooks) { setupRenderingTest(hooks); From d11b87b651a438cfc8aacf0359580d5b7c8bb445 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marie-H=C3=A9l=C3=A8ne?= Date: Thu, 5 Oct 2023 16:11:19 +0200 Subject: [PATCH 2/5] tech(orga): use render from @1024pix in campaign integration tests --- .../components/campaign/analysis/competences_test.js | 2 +- .../campaign/analysis/tube-recommendation-row_test.js | 3 ++- .../components/campaign/charts/participants-by-day_test.js | 2 +- orga/tests/integration/components/campaign/header/tabs_test.js | 2 +- .../tests/integration/components/campaign/header/title_test.js | 2 +- 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/orga/tests/integration/components/campaign/analysis/competences_test.js b/orga/tests/integration/components/campaign/analysis/competences_test.js index 06537336742..2ccb5b0cd27 100644 --- a/orga/tests/integration/components/campaign/analysis/competences_test.js +++ b/orga/tests/integration/components/campaign/analysis/competences_test.js @@ -1,6 +1,6 @@ import { module, test } from 'qunit'; import setupIntlRenderingTest from '../../../../helpers/setup-intl-rendering'; -import { render } from '@ember/test-helpers'; +import { render } from '@1024pix/ember-testing-library'; import { hbs } from 'ember-cli-htmlbars'; module('Integration | Component | Campaign::Analysis::Competences', function (hooks) { diff --git a/orga/tests/integration/components/campaign/analysis/tube-recommendation-row_test.js b/orga/tests/integration/components/campaign/analysis/tube-recommendation-row_test.js index 61bb1be0238..2cd631642f3 100644 --- a/orga/tests/integration/components/campaign/analysis/tube-recommendation-row_test.js +++ b/orga/tests/integration/components/campaign/analysis/tube-recommendation-row_test.js @@ -1,6 +1,7 @@ import { module, test } from 'qunit'; import setupIntlRenderingTest from '../../../../helpers/setup-intl-rendering'; -import { render, click } from '@ember/test-helpers'; +import { render } from '@1024pix/ember-testing-library'; +import { click } from '@ember/test-helpers'; import { hbs } from 'ember-cli-htmlbars'; module('Integration | Component | Campaign::Analysis::TubeRecommendationRow', function (hooks) { diff --git a/orga/tests/integration/components/campaign/charts/participants-by-day_test.js b/orga/tests/integration/components/campaign/charts/participants-by-day_test.js index 470a300037d..7aa5c3ada6c 100644 --- a/orga/tests/integration/components/campaign/charts/participants-by-day_test.js +++ b/orga/tests/integration/components/campaign/charts/participants-by-day_test.js @@ -1,7 +1,7 @@ import { module, test } from 'qunit'; import setupIntlRenderingTest from '../../../../helpers/setup-intl-rendering'; import sinon from 'sinon'; -import { render } from '@ember/test-helpers'; +import { render } from '@1024pix/ember-testing-library'; import { hbs } from 'ember-cli-htmlbars'; module('Integration | Component | Campaign::Charts::ParticipantsByDay', function (hooks) { diff --git a/orga/tests/integration/components/campaign/header/tabs_test.js b/orga/tests/integration/components/campaign/header/tabs_test.js index ab25dad9f5d..c2388e53ab8 100644 --- a/orga/tests/integration/components/campaign/header/tabs_test.js +++ b/orga/tests/integration/components/campaign/header/tabs_test.js @@ -1,6 +1,6 @@ import { module, test } from 'qunit'; import setupIntlRenderingTest from '../../../../helpers/setup-intl-rendering'; -import { render } from '@ember/test-helpers'; +import { render } from '@1024pix/ember-testing-library'; import { hbs } from 'ember-cli-htmlbars'; import Service from '@ember/service'; diff --git a/orga/tests/integration/components/campaign/header/title_test.js b/orga/tests/integration/components/campaign/header/title_test.js index 851307ebc2c..3b873e1f56f 100644 --- a/orga/tests/integration/components/campaign/header/title_test.js +++ b/orga/tests/integration/components/campaign/header/title_test.js @@ -1,6 +1,6 @@ import { module, test } from 'qunit'; import setupIntlRenderingTest from '../../../../helpers/setup-intl-rendering'; -import { render } from '@ember/test-helpers'; +import { render } from '@1024pix/ember-testing-library'; import { hbs } from 'ember-cli-htmlbars'; module('Integration | Component | Campaign::Header::Title', function (hooks) { From 3c8c76e49204750a59917c15e06dfdae573e0c75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marie-H=C3=A9l=C3=A8ne?= Date: Thu, 5 Oct 2023 16:13:00 +0200 Subject: [PATCH 3/5] tech(orga): use render from @1024pix in participant integration tests --- .../components/participant/profile/header_test.js | 2 +- .../components/participant/profile/table_test.js | 2 +- .../manage-authentication-method-modal_test.js | 3 +-- .../sup-organization-participant/header-actions_test.js | 7 +++---- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/orga/tests/integration/components/participant/profile/header_test.js b/orga/tests/integration/components/participant/profile/header_test.js index 4e7ea8642af..07f5456f57e 100644 --- a/orga/tests/integration/components/participant/profile/header_test.js +++ b/orga/tests/integration/components/participant/profile/header_test.js @@ -1,6 +1,6 @@ import { module, test } from 'qunit'; import setupIntlRenderingTest from '../../../../helpers/setup-intl-rendering'; -import { render } from '@ember/test-helpers'; +import { render } from '@1024pix/ember-testing-library'; import { hbs } from 'ember-cli-htmlbars'; module('Integration | Component | Participant::Profile::Header', function (hooks) { diff --git a/orga/tests/integration/components/participant/profile/table_test.js b/orga/tests/integration/components/participant/profile/table_test.js index 8877b75fe25..8fe8b50b0a2 100644 --- a/orga/tests/integration/components/participant/profile/table_test.js +++ b/orga/tests/integration/components/participant/profile/table_test.js @@ -1,6 +1,6 @@ import { module, test } from 'qunit'; import setupIntlRenderingTest from '../../../../helpers/setup-intl-rendering'; -import { render } from '@ember/test-helpers'; +import { render } from '@1024pix/ember-testing-library'; import { hbs } from 'ember-cli-htmlbars'; module('Integration | Component | Participant::Profile::Table', function (hooks) { diff --git a/orga/tests/integration/components/sco-organization-participant/manage-authentication-method-modal_test.js b/orga/tests/integration/components/sco-organization-participant/manage-authentication-method-modal_test.js index f62d9758db8..e4409a7c36c 100644 --- a/orga/tests/integration/components/sco-organization-participant/manage-authentication-method-modal_test.js +++ b/orga/tests/integration/components/sco-organization-participant/manage-authentication-method-modal_test.js @@ -1,8 +1,7 @@ import { module, test } from 'qunit'; import setupIntlRenderingTest from '../../../helpers/setup-intl-rendering'; -import { render } from '@ember/test-helpers'; import { resolve } from 'rsvp'; -import { clickByName } from '@1024pix/ember-testing-library'; +import { clickByName, render } from '@1024pix/ember-testing-library'; import { hbs } from 'ember-cli-htmlbars'; import Service from '@ember/service'; import EmberObject from '@ember/object'; diff --git a/orga/tests/integration/components/sup-organization-participant/header-actions_test.js b/orga/tests/integration/components/sup-organization-participant/header-actions_test.js index 7b22d575ed2..3b5a36c1796 100644 --- a/orga/tests/integration/components/sup-organization-participant/header-actions_test.js +++ b/orga/tests/integration/components/sup-organization-participant/header-actions_test.js @@ -1,7 +1,6 @@ import { module, test } from 'qunit'; import setupIntlRenderingTest from '../../../helpers/setup-intl-rendering'; -import { render } from '@ember/test-helpers'; -import { render as renderScreen } from '@1024pix/ember-testing-library'; +import { render } from '@1024pix/ember-testing-library'; import Service from '@ember/service'; import { hbs } from 'ember-cli-htmlbars'; @@ -14,7 +13,7 @@ module('Integration | Component | SupOrganizationParticipant::HeaderActions', fu this.set('participantCount', 0); // when - const screen = await renderScreen( + const screen = await render( hbs``, ); @@ -27,7 +26,7 @@ module('Integration | Component | SupOrganizationParticipant::HeaderActions', fu this.set('participantCount', 5); // when - const screen = await renderScreen( + const screen = await render( hbs``, ); From 3013f23260a3bc190284b5b86b40d4513c1d713d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marie-H=C3=A9l=C3=A8ne?= Date: Thu, 5 Oct 2023 16:14:08 +0200 Subject: [PATCH 4/5] tech(orga): use render from @1024pix in layout integration tests --- .../components/layout/organization-credit-info_test.js | 2 +- .../integration/components/layout/user-logged-menu_test.js | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/orga/tests/integration/components/layout/organization-credit-info_test.js b/orga/tests/integration/components/layout/organization-credit-info_test.js index 1ca613ccb07..6350c523528 100644 --- a/orga/tests/integration/components/layout/organization-credit-info_test.js +++ b/orga/tests/integration/components/layout/organization-credit-info_test.js @@ -1,6 +1,6 @@ import { module, test } from 'qunit'; import setupIntlRenderingTest from '../../../helpers/setup-intl-rendering'; -import { render } from '@ember/test-helpers'; +import { render } from '@1024pix/ember-testing-library'; import { hbs } from 'ember-cli-htmlbars'; import Service from '@ember/service'; diff --git a/orga/tests/integration/components/layout/user-logged-menu_test.js b/orga/tests/integration/components/layout/user-logged-menu_test.js index 95066ab83a2..29a5604980f 100644 --- a/orga/tests/integration/components/layout/user-logged-menu_test.js +++ b/orga/tests/integration/components/layout/user-logged-menu_test.js @@ -1,6 +1,5 @@ import { module, test } from 'qunit'; -import { render } from '@ember/test-helpers'; -import { clickByName } from '@1024pix/ember-testing-library'; +import { clickByName, render } from '@1024pix/ember-testing-library'; import setupIntlRenderingTest from '../../../helpers/setup-intl-rendering'; import { hbs } from 'ember-cli-htmlbars'; import Object from '@ember/object'; From 120a5b41cdb11ba4a2b4a212dc16a30894044ae3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marie-H=C3=A9l=C3=A8ne?= Date: Thu, 5 Oct 2023 16:14:36 +0200 Subject: [PATCH 5/5] tech(orga): use render from @1024pix in other components integration tests --- .../integration/components/auth/join-request-form_test.js | 4 ++-- .../tests/integration/components/banner/communication_test.js | 2 +- .../integration/components/dropdown/icon-trigger_test.js | 3 +-- orga/tests/integration/components/tables/header-sort_test.js | 3 ++- orga/tests/integration/components/team/invite-form_test.js | 3 +-- orga/tests/integration/components/team/members-list_test.js | 2 +- 6 files changed, 8 insertions(+), 9 deletions(-) diff --git a/orga/tests/integration/components/auth/join-request-form_test.js b/orga/tests/integration/components/auth/join-request-form_test.js index d122110308c..c77ee7b6bf2 100644 --- a/orga/tests/integration/components/auth/join-request-form_test.js +++ b/orga/tests/integration/components/auth/join-request-form_test.js @@ -1,7 +1,7 @@ import { module, test } from 'qunit'; import { setupRenderingTest } from 'ember-qunit'; -import { render, triggerEvent } from '@ember/test-helpers'; -import { fillByLabel } from '@1024pix/ember-testing-library'; +import { triggerEvent } from '@ember/test-helpers'; +import { render, fillByLabel } from '@1024pix/ember-testing-library'; import { hbs } from 'ember-cli-htmlbars'; module('Integration | Component | Auth::JoinRequestForm', function (hooks) { diff --git a/orga/tests/integration/components/banner/communication_test.js b/orga/tests/integration/components/banner/communication_test.js index e52b4a13fce..573671bf7a6 100644 --- a/orga/tests/integration/components/banner/communication_test.js +++ b/orga/tests/integration/components/banner/communication_test.js @@ -1,6 +1,6 @@ import { module, test } from 'qunit'; import setupIntlRenderingTest from '../../../helpers/setup-intl-rendering'; -import { render } from '@ember/test-helpers'; +import { render } from '@1024pix/ember-testing-library'; import { hbs } from 'ember-cli-htmlbars'; import ENV from 'pix-orga/config/environment'; diff --git a/orga/tests/integration/components/dropdown/icon-trigger_test.js b/orga/tests/integration/components/dropdown/icon-trigger_test.js index 3b4bd822a86..63151216945 100644 --- a/orga/tests/integration/components/dropdown/icon-trigger_test.js +++ b/orga/tests/integration/components/dropdown/icon-trigger_test.js @@ -1,7 +1,6 @@ import { module, test } from 'qunit'; -import { render } from '@ember/test-helpers'; import { hbs } from 'ember-cli-htmlbars'; -import { clickByName } from '@1024pix/ember-testing-library'; +import { clickByName, render } from '@1024pix/ember-testing-library'; import setupIntlRenderingTest from '../../../helpers/setup-intl-rendering'; module('Integration | Component | Dropdown | icon-trigger', function (hooks) { diff --git a/orga/tests/integration/components/tables/header-sort_test.js b/orga/tests/integration/components/tables/header-sort_test.js index ca15df0d28d..aa53733480d 100644 --- a/orga/tests/integration/components/tables/header-sort_test.js +++ b/orga/tests/integration/components/tables/header-sort_test.js @@ -1,7 +1,8 @@ import { module, test } from 'qunit'; import sinon from 'sinon'; import { setupRenderingTest } from 'ember-qunit'; -import { click, render } from '@ember/test-helpers'; +import { click } from '@ember/test-helpers'; +import { render } from '@1024pix/ember-testing-library'; import { hbs } from 'ember-cli-htmlbars'; module('Integration | Component | Tables | header-sort', function (hooks) { diff --git a/orga/tests/integration/components/team/invite-form_test.js b/orga/tests/integration/components/team/invite-form_test.js index 8631f9407b8..334d0b74cd8 100644 --- a/orga/tests/integration/components/team/invite-form_test.js +++ b/orga/tests/integration/components/team/invite-form_test.js @@ -1,9 +1,8 @@ import { module, test } from 'qunit'; -import { render } from '@ember/test-helpers'; import { hbs } from 'ember-cli-htmlbars'; import sinon from 'sinon'; -import { fillByLabel } from '@1024pix/ember-testing-library'; +import { fillByLabel, render } from '@1024pix/ember-testing-library'; import setupIntlRenderingTest from '../../../helpers/setup-intl-rendering'; module('Integration | Component | Team::InviteForm', function (hooks) { diff --git a/orga/tests/integration/components/team/members-list_test.js b/orga/tests/integration/components/team/members-list_test.js index 1e6e976f6bc..d58147a8ad0 100644 --- a/orga/tests/integration/components/team/members-list_test.js +++ b/orga/tests/integration/components/team/members-list_test.js @@ -1,4 +1,4 @@ -import { render } from '@ember/test-helpers'; +import { render } from '@1024pix/ember-testing-library'; import Service from '@ember/service'; import { hbs } from 'ember-cli-htmlbars'; import { module, test } from 'qunit';