Skip to content

Commit

Permalink
fix test with import setupIntl
Browse files Browse the repository at this point in the history
  • Loading branch information
remadex committed Oct 27, 2023
1 parent af0a873 commit 187de87
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/acceptance/login-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import { module, test } from 'qunit';

import { setupApplicationTest } from 'ember-boilerplate/tests/helpers';

import { setupIntl } from 'ember-intl/test-support';

import { loginPage } from '../pages/login';
import { setupMock } from '../worker';
import { loginWorker } from './workers/login';
Expand All @@ -12,6 +14,7 @@ import type { ServiceWorkerTestContext } from '../worker';
module('Acceptance | login', function (hooks) {
setupApplicationTest(hooks);
setupMock(hooks);
setupIntl(hooks, ['fr-fr']);

test<ServiceWorkerTestContext>('visiting /login', async function (assert) {
await loginWorker(this.worker);
Expand Down
3 changes: 3 additions & 0 deletions tests/acceptance/register/main-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import { module, test } from 'qunit';
import { setupApplicationTest } from 'ember-boilerplate/tests/helpers';
import indexPage from 'ember-boilerplate/tests/pages/pages/register/index';

import { setupIntl } from 'ember-intl/test-support';

import { setupMock } from '../../worker';
import { registerWorker, registerWorkerWithErrors } from '../workers/register';

Expand All @@ -13,6 +15,7 @@ import type { ServiceWorkerTestContext } from '../../worker';
module('Acceptance | register', function (hooks) {
setupApplicationTest(hooks);
setupMock(hooks);
setupIntl(hooks, ['fr-fr']);

async function completeFormAndSubmit() {
await indexPage.forms
Expand Down
3 changes: 3 additions & 0 deletions tests/integration/components/forms/register/component-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import { setupRenderingTest } from 'ember-boilerplate/tests/helpers';
import { pagesFormsRegister } from 'ember-boilerplate/tests/pages/forms/register';
import validationsRegister from 'ember-boilerplate/validations/register';

import { setupIntl } from 'ember-intl/test-support';

import type { TestContext } from '@ember/test-helpers';

interface RegisterTestContext extends TestContext {
Expand All @@ -16,6 +18,7 @@ interface RegisterTestContext extends TestContext {

module('Integration | Component | forms/register', function (hooks) {
setupRenderingTest(hooks);
setupIntl(hooks, ['fr-fr']);

let changeset: RegisterChangeset;

Expand Down
3 changes: 3 additions & 0 deletions tests/integration/components/login/forms/login-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,11 @@ import { loginPage } from 'ember-boilerplate/tests/pages/login';
import loginSchema from 'ember-boilerplate/validations/login';
import { type Changeset,ImmerChangeset } from 'ember-immer-changeset';

import { setupIntl } from 'ember-intl/test-support';

module('Integration | Component | FormsLogin', function (hooks) {
setupRenderingTest(hooks);
setupIntl(hooks, ['fr-fr']);

test('Create (empty changeset)', async function (assert) {
this.set('changeset', new ImmerChangeset({}));
Expand Down

0 comments on commit 187de87

Please sign in to comment.