diff --git a/test-apps/classic-app/tests/helpers/index.js b/test-apps/classic-app/tests/helpers/index.js deleted file mode 100644 index 7f70de80..00000000 --- a/test-apps/classic-app/tests/helpers/index.js +++ /dev/null @@ -1,42 +0,0 @@ -import { - setupApplicationTest as upstreamSetupApplicationTest, - setupRenderingTest as upstreamSetupRenderingTest, - setupTest as upstreamSetupTest, -} from 'ember-qunit'; - -// This file exists to provide wrappers around ember-qunit's / ember-mocha's -// test setup functions. This way, you can easily extend the setup that is -// needed per test type. - -function setupApplicationTest(hooks, options) { - upstreamSetupApplicationTest(hooks, options); - - // Additional setup for application tests can be done here. - // - // For example, if you need an authenticated session for each - // application test, you could do: - // - // hooks.beforeEach(async function () { - // await authenticateSession(); // ember-simple-auth - // }); - // - // This is also a good place to call test setup functions coming - // from other addons: - // - // setupIntl(hooks); // ember-intl - // setupMirage(hooks); // ember-cli-mirage -} - -function setupRenderingTest(hooks, options) { - upstreamSetupRenderingTest(hooks, options); - - // Additional setup for rendering tests can be done here. -} - -function setupTest(hooks, options) { - upstreamSetupTest(hooks, options); - - // Additional setup for unit tests can be done here. -} - -export { setupApplicationTest, setupRenderingTest, setupTest }; diff --git a/test-apps/classic-app/tests/integration/components/from-v2-addon-ts/at-class-test.gjs b/test-apps/classic-app/tests/shared-scenarios/from-v2-addon-ts/at-class-test.gjs similarity index 94% rename from test-apps/classic-app/tests/integration/components/from-v2-addon-ts/at-class-test.gjs rename to test-apps/classic-app/tests/shared-scenarios/from-v2-addon-ts/at-class-test.gjs index a1441148..e0144ff7 100644 --- a/test-apps/classic-app/tests/integration/components/from-v2-addon-ts/at-class-test.gjs +++ b/test-apps/classic-app/tests/shared-scenarios/from-v2-addon-ts/at-class-test.gjs @@ -2,8 +2,8 @@ import { render } from '@ember/test-helpers'; import { hbs } from 'ember-cli-htmlbars'; import { module, test } from 'qunit'; +import { setupRenderingTest } from 'ember-qunit'; -import { setupRenderingTest } from 'classic-app/tests/helpers'; import ComponentAtClass from 'v2-addon-ts/components/at-class-ts/component-at-class'; import { scopedClass } from 'ember-scoped-css/test-support'; diff --git a/test-apps/classic-app/tests/integration/components/from-v2-addon-ts/strict-class-test.gjs b/test-apps/classic-app/tests/shared-scenarios/from-v2-addon-ts/strict-class-test.gjs similarity index 91% rename from test-apps/classic-app/tests/integration/components/from-v2-addon-ts/strict-class-test.gjs rename to test-apps/classic-app/tests/shared-scenarios/from-v2-addon-ts/strict-class-test.gjs index 53de11de..4544d450 100644 --- a/test-apps/classic-app/tests/integration/components/from-v2-addon-ts/strict-class-test.gjs +++ b/test-apps/classic-app/tests/shared-scenarios/from-v2-addon-ts/strict-class-test.gjs @@ -1,7 +1,7 @@ import { render } from '@ember/test-helpers'; import { module, test } from 'qunit'; +import { setupRenderingTest } from 'ember-qunit'; -import { setupRenderingTest } from 'classic-app/tests/helpers'; import { StrictClass } from 'v2-addon-ts/components/strict-class'; import { scopedClass } from 'ember-scoped-css/test-support'; diff --git a/test-apps/classic-app/tests/integration/components/from-v2-addon-ts/strict-test.gjs b/test-apps/classic-app/tests/shared-scenarios/from-v2-addon-ts/strict-test.gjs similarity index 90% rename from test-apps/classic-app/tests/integration/components/from-v2-addon-ts/strict-test.gjs rename to test-apps/classic-app/tests/shared-scenarios/from-v2-addon-ts/strict-test.gjs index 935abede..6e4c9ac0 100644 --- a/test-apps/classic-app/tests/integration/components/from-v2-addon-ts/strict-test.gjs +++ b/test-apps/classic-app/tests/shared-scenarios/from-v2-addon-ts/strict-test.gjs @@ -1,7 +1,7 @@ import { render } from '@ember/test-helpers'; import { module, test } from 'qunit'; +import { setupRenderingTest } from 'ember-qunit'; -import { setupRenderingTest } from 'classic-app/tests/helpers'; import { Strict } from 'v2-addon-ts/components/strict'; import { scopedClass } from 'ember-scoped-css/test-support'; diff --git a/test-apps/classic-app/tests/integration/components/from-v2-addon-ts/v2-addon-ts-with-a-class-test.js b/test-apps/classic-app/tests/shared-scenarios/from-v2-addon-ts/v2-addon-ts-with-a-class-test.js similarity index 91% rename from test-apps/classic-app/tests/integration/components/from-v2-addon-ts/v2-addon-ts-with-a-class-test.js rename to test-apps/classic-app/tests/shared-scenarios/from-v2-addon-ts/v2-addon-ts-with-a-class-test.js index 306832aa..eb88f782 100644 --- a/test-apps/classic-app/tests/integration/components/from-v2-addon-ts/v2-addon-ts-with-a-class-test.js +++ b/test-apps/classic-app/tests/shared-scenarios/from-v2-addon-ts/v2-addon-ts-with-a-class-test.js @@ -1,8 +1,7 @@ import { render } from '@ember/test-helpers'; import { hbs } from 'ember-cli-htmlbars'; import { module, test } from 'qunit'; - -import { setupRenderingTest } from 'classic-app/tests/helpers'; +import { setupRenderingTest } from 'ember-qunit'; import { scopedClass } from 'ember-scoped-css/test-support'; diff --git a/test-apps/classic-app/tests/integration/components/from-v2-addon/alert-from-v2-addon-test.js b/test-apps/classic-app/tests/shared-scenarios/from-v2-addon/alert-from-v2-addon-test.js similarity index 90% rename from test-apps/classic-app/tests/integration/components/from-v2-addon/alert-from-v2-addon-test.js rename to test-apps/classic-app/tests/shared-scenarios/from-v2-addon/alert-from-v2-addon-test.js index b54889f4..7314703b 100644 --- a/test-apps/classic-app/tests/integration/components/from-v2-addon/alert-from-v2-addon-test.js +++ b/test-apps/classic-app/tests/shared-scenarios/from-v2-addon/alert-from-v2-addon-test.js @@ -1,8 +1,7 @@ import { render } from '@ember/test-helpers'; import { hbs } from 'ember-cli-htmlbars'; import { module, test } from 'qunit'; - -import { setupRenderingTest } from 'classic-app/tests/helpers'; +import { setupRenderingTest } from 'ember-qunit'; import { scopedClass } from 'ember-scoped-css/test-support'; diff --git a/test-apps/classic-app/tests/integration/components/from-v2-addon/at-class-test.gjs b/test-apps/classic-app/tests/shared-scenarios/from-v2-addon/at-class-test.gjs similarity index 94% rename from test-apps/classic-app/tests/integration/components/from-v2-addon/at-class-test.gjs rename to test-apps/classic-app/tests/shared-scenarios/from-v2-addon/at-class-test.gjs index cdf19d64..a36435ea 100644 --- a/test-apps/classic-app/tests/integration/components/from-v2-addon/at-class-test.gjs +++ b/test-apps/classic-app/tests/shared-scenarios/from-v2-addon/at-class-test.gjs @@ -2,8 +2,8 @@ import { render } from '@ember/test-helpers'; import { hbs } from 'ember-cli-htmlbars'; import { module, test } from 'qunit'; +import { setupRenderingTest } from 'ember-qunit'; -import { setupRenderingTest } from 'classic-app/tests/helpers'; import ComponentAtClass from 'v2-addon/components/at-class/component-at-class'; import { scopedClass } from 'ember-scoped-css/test-support'; diff --git a/test-apps/classic-app/tests/integration/components/in-app/at-class-test.gts b/test-apps/classic-app/tests/shared-scenarios/in-app/at-class-test.gts similarity index 100% rename from test-apps/classic-app/tests/integration/components/in-app/at-class-test.gts rename to test-apps/classic-app/tests/shared-scenarios/in-app/at-class-test.gts diff --git a/test-apps/classic-app/tests/integration/components/at-class-test.gjs b/test-apps/classic-app/tests/shared-scenarios/in-app/component-at-class-test.gjs similarity index 88% rename from test-apps/classic-app/tests/integration/components/at-class-test.gjs rename to test-apps/classic-app/tests/shared-scenarios/in-app/component-at-class-test.gjs index fa485edf..56c7c715 100644 --- a/test-apps/classic-app/tests/integration/components/at-class-test.gjs +++ b/test-apps/classic-app/tests/shared-scenarios/in-app/component-at-class-test.gjs @@ -1,14 +1,14 @@ import { render } from '@ember/test-helpers'; import { hbs } from 'ember-cli-htmlbars'; import { module, test } from 'qunit'; +import { setupRenderingTest } from 'ember-qunit'; import ComponentAtClass from 'classic-app/components/component-at-class'; -import { setupRenderingTest } from 'classic-app/tests/helpers'; import { scopedClass } from 'ember-scoped-css/test-support'; -module('Integration | Component | @class', function (hooks) { +module('[In App] @class', function (hooks) { setupRenderingTest(hooks); test('strict mode', async function (assert) { diff --git a/test-apps/classic-app/tests/integration/components/dynamic-attribute-test.js b/test-apps/classic-app/tests/shared-scenarios/in-app/dynamic-attribute-test.js similarity index 84% rename from test-apps/classic-app/tests/integration/components/dynamic-attribute-test.js rename to test-apps/classic-app/tests/shared-scenarios/in-app/dynamic-attribute-test.js index a50123db..8f9206d7 100644 --- a/test-apps/classic-app/tests/integration/components/dynamic-attribute-test.js +++ b/test-apps/classic-app/tests/shared-scenarios/in-app/dynamic-attribute-test.js @@ -2,10 +2,9 @@ import { tracked } from '@glimmer/tracking'; import { render, settled } from '@ember/test-helpers'; import { hbs } from 'ember-cli-htmlbars'; import { module, test } from 'qunit'; +import { setupRenderingTest } from 'ember-qunit'; -import { setupRenderingTest } from 'classic-app/tests/helpers'; - -module('Integration | Component | DynamicAttribute', function (hooks) { +module('[In App] DynamicAttribute', function (hooks) { setupRenderingTest(hooks); test('it has scoped class', async function (assert) { diff --git a/test-apps/classic-app/tests/integration/components/header-test.js b/test-apps/classic-app/tests/shared-scenarios/in-app/header-test.js similarity index 81% rename from test-apps/classic-app/tests/integration/components/header-test.js rename to test-apps/classic-app/tests/shared-scenarios/in-app/header-test.js index 326f0e61..63ab4832 100644 --- a/test-apps/classic-app/tests/integration/components/header-test.js +++ b/test-apps/classic-app/tests/shared-scenarios/in-app/header-test.js @@ -1,12 +1,11 @@ import { render } from '@ember/test-helpers'; import { hbs } from 'ember-cli-htmlbars'; import { module, test } from 'qunit'; - -import { setupRenderingTest } from 'classic-app/tests/helpers'; +import { setupRenderingTest } from 'ember-qunit'; import { scopedClass } from 'ember-scoped-css/test-support'; -module('Integration | Component | header', function (hooks) { +module('[In App] header', function (hooks) { setupRenderingTest(hooks); test('it has scoped class', async function (assert) { diff --git a/test-apps/classic-app/tests/integration/components/in-app/misuse-test.js b/test-apps/classic-app/tests/shared-scenarios/in-app/misuse-test.js similarity index 86% rename from test-apps/classic-app/tests/integration/components/in-app/misuse-test.js rename to test-apps/classic-app/tests/shared-scenarios/in-app/misuse-test.js index 2ef4ce8c..1f15527a 100644 --- a/test-apps/classic-app/tests/integration/components/in-app/misuse-test.js +++ b/test-apps/classic-app/tests/shared-scenarios/in-app/misuse-test.js @@ -1,8 +1,7 @@ import { render } from '@ember/test-helpers'; import { hbs } from 'ember-cli-htmlbars'; import { module, skip } from 'qunit'; - -import { setupRenderingTest } from 'classic-app/tests/helpers'; +import { setupRenderingTest } from 'ember-qunit'; module('[In App] Misuse', function (hooks) { setupRenderingTest(hooks); diff --git a/test-apps/classic-app/tests/integration/components/scoped-test.js b/test-apps/classic-app/tests/shared-scenarios/in-app/scoped-test.js similarity index 78% rename from test-apps/classic-app/tests/integration/components/scoped-test.js rename to test-apps/classic-app/tests/shared-scenarios/in-app/scoped-test.js index 49fd10b5..226afb48 100644 --- a/test-apps/classic-app/tests/integration/components/scoped-test.js +++ b/test-apps/classic-app/tests/shared-scenarios/in-app/scoped-test.js @@ -1,10 +1,9 @@ import { render } from '@ember/test-helpers'; import { hbs } from 'ember-cli-htmlbars'; import { module, test } from 'qunit'; +import { setupRenderingTest } from 'ember-qunit'; -import { setupRenderingTest } from 'classic-app/tests/helpers'; - -module('Integration | Component | scoped', function (hooks) { +module('[In App] scoped', function (hooks) { setupRenderingTest(hooks); test('it replaces the scoped-class helper', async function (assert) { diff --git a/test-apps/classic-app/tests/integration/components/show-time-test.js b/test-apps/classic-app/tests/shared-scenarios/in-app/show-time-test.js similarity index 73% rename from test-apps/classic-app/tests/integration/components/show-time-test.js rename to test-apps/classic-app/tests/shared-scenarios/in-app/show-time-test.js index 0f96e84a..979baed4 100644 --- a/test-apps/classic-app/tests/integration/components/show-time-test.js +++ b/test-apps/classic-app/tests/shared-scenarios/in-app/show-time-test.js @@ -1,10 +1,9 @@ import { render } from '@ember/test-helpers'; import { hbs } from 'ember-cli-htmlbars'; import { module, test } from 'qunit'; +import { setupRenderingTest } from 'ember-qunit'; -import { setupRenderingTest } from 'classic-app/tests/helpers'; - -module('Integration | Component | show-time', function (hooks) { +module('[In App] show-time', function (hooks) { setupRenderingTest(hooks); test('it has scoped class', async function (assert) { diff --git a/test-apps/classic-app/tests/integration/components/subexpression-test.gjs b/test-apps/classic-app/tests/shared-scenarios/in-app/subexpression-test.gjs similarity index 85% rename from test-apps/classic-app/tests/integration/components/subexpression-test.gjs rename to test-apps/classic-app/tests/shared-scenarios/in-app/subexpression-test.gjs index 54520a7a..f4fbf563 100644 --- a/test-apps/classic-app/tests/integration/components/subexpression-test.gjs +++ b/test-apps/classic-app/tests/shared-scenarios/in-app/subexpression-test.gjs @@ -1,13 +1,13 @@ import { render, settled } from '@ember/test-helpers'; import { module, test } from 'qunit'; +import { setupRenderingTest } from 'ember-qunit'; import SubExpression from 'classic-app/components/subexpression'; -import { setupRenderingTest } from 'classic-app/tests/helpers'; import { cell } from 'ember-resources'; import { scopedClass } from 'ember-scoped-css/test-support'; -module('Integration | Component | subexpression', function (hooks) { +module('[In App] subexpression', function (hooks) { setupRenderingTest(hooks); test('it has scoped class', async function (assert) { diff --git a/test-apps/classic-app/tests/integration/components/template-only-test.js b/test-apps/classic-app/tests/shared-scenarios/in-app/template-only-test.js similarity index 79% rename from test-apps/classic-app/tests/integration/components/template-only-test.js rename to test-apps/classic-app/tests/shared-scenarios/in-app/template-only-test.js index 7032d566..f92016d9 100644 --- a/test-apps/classic-app/tests/integration/components/template-only-test.js +++ b/test-apps/classic-app/tests/shared-scenarios/in-app/template-only-test.js @@ -1,12 +1,11 @@ import { render } from '@ember/test-helpers'; import { hbs } from 'ember-cli-htmlbars'; import { module, test } from 'qunit'; - -import { setupRenderingTest } from 'classic-app/tests/helpers'; +import { setupRenderingTest } from 'ember-qunit'; import { scopedClass } from 'ember-scoped-css/test-support'; -module('Integration | Component | template-only', function (hooks) { +module('[In App] template-only', function (hooks) { setupRenderingTest(hooks); test('it has scoped class', async function (assert) { diff --git a/test-apps/classic-app/tests/unit/.gitkeep b/test-apps/classic-app/tests/unit/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/test-apps/pods-classic-app/tests/application/route-scoped-css-test.js b/test-apps/pods-classic-app/tests/application/route-scoped-css-test.js index 552ea7c9..f6c78e41 100644 --- a/test-apps/pods-classic-app/tests/application/route-scoped-css-test.js +++ b/test-apps/pods-classic-app/tests/application/route-scoped-css-test.js @@ -1,7 +1,7 @@ import { visit } from '@ember/test-helpers'; import { module, test } from 'qunit'; -import { setupApplicationTest } from 'pods-classic-app/tests/helpers'; +import { setupApplicationTest } from 'ember-qunit'; import { scopedClass } from 'ember-scoped-css/test-support';