Skip to content

Commit

Permalink
[TECH] N'utiliser que le render provenant de @1024pix/ember-testing-l…
Browse files Browse the repository at this point in the history
…ibrary dans les tests (PIX-9521)
  • Loading branch information
pix-service-auto-merge authored Oct 5, 2023
2 parents 32f0589 + 120a5b4 commit 76d1f29
Show file tree
Hide file tree
Showing 22 changed files with 28 additions and 32 deletions.
Original file line number Diff line number Diff line change
@@ -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) {
Expand Down
Original file line number Diff line number Diff line change
@@ -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';

Expand Down
Original file line number Diff line number Diff line change
@@ -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) {
Expand Down
Original file line number Diff line number Diff line change
@@ -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) {
Expand Down
Original file line number Diff line number Diff line change
@@ -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) {
Expand Down
Original file line number Diff line number Diff line change
@@ -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';

Expand Down
Original file line number Diff line number Diff line change
@@ -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) {
Expand Down
Original file line number Diff line number Diff line change
@@ -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) {
Expand Down
Original file line number Diff line number Diff line change
@@ -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';

Expand Down
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
Original file line number Diff line number Diff line change
@@ -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) {
Expand Down
Original file line number Diff line number Diff line change
@@ -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) {
Expand Down
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
Original file line number Diff line number Diff line change
@@ -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';

Expand All @@ -14,7 +13,7 @@ module('Integration | Component | SupOrganizationParticipant::HeaderActions', fu
this.set('participantCount', 0);

// when
const screen = await renderScreen(
const screen = await render(
hbs`<SupOrganizationParticipant::HeaderActions @participantCount={{this.participantCount}} />`,
);

Expand All @@ -27,7 +26,7 @@ module('Integration | Component | SupOrganizationParticipant::HeaderActions', fu
this.set('participantCount', 5);

// when
const screen = await renderScreen(
const screen = await render(
hbs`<SupOrganizationParticipant::HeaderActions @participantCount={{this.participantCount}} />`,
);

Expand Down
3 changes: 2 additions & 1 deletion orga/tests/integration/components/tables/header-sort_test.js
Original file line number Diff line number Diff line change
@@ -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) {
Expand Down
3 changes: 1 addition & 2 deletions orga/tests/integration/components/team/invite-form_test.js
Original file line number Diff line number Diff line change
@@ -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) {
Expand Down
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
3 changes: 2 additions & 1 deletion orga/tests/integration/components/ui/chevron_test.js
Original file line number Diff line number Diff line change
@@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion orga/tests/integration/components/ui/empty-state_test.js
Original file line number Diff line number Diff line change
@@ -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';

Expand Down
2 changes: 1 addition & 1 deletion orga/tests/integration/components/ui/pix-loader_test.js
Original file line number Diff line number Diff line change
@@ -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) {
Expand Down
Original file line number Diff line number Diff line change
@@ -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);
Expand Down
3 changes: 1 addition & 2 deletions orga/tests/integration/components/ui/search-input_test.js
Original file line number Diff line number Diff line change
@@ -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);
Expand Down

0 comments on commit 76d1f29

Please sign in to comment.