From 6af187d6bf2f8c43713a23c2a47001e1d93b7b85 Mon Sep 17 00:00:00 2001 From: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com> Date: Thu, 18 Jul 2024 17:41:22 -0400 Subject: [PATCH] Everything is a test-app now --- test-apps/classic-app/ember-cli-build.js | 2 +- test-apps/embroider-app/app/app.js | 2 +- test-apps/embroider-app/app/index.html | 4 ++-- test-apps/embroider-app/app/router.js | 2 +- test-apps/embroider-app/config/environment.js | 2 +- test-apps/embroider-app/ember-cli-build.js | 3 ++- .../tests/application/route-scoped-css-test.js | 6 ++---- test-apps/embroider-app/tests/index.html | 4 ++-- .../tests/integration/alert-from-v2-addon-test.js | 2 +- .../embroider-app/tests/integration/my-component-test.js | 4 ++-- test-apps/embroider-app/tests/integration/second-test.js | 4 ++-- .../embroider-app/tests/integration/template-only-test.js | 6 ++---- test-apps/embroider-app/tests/test-helper.js | 4 ++-- .../tests/application/route-scoped-css-test.js | 4 +--- test-apps/pods-classic-app/tests/test-helper.js | 4 ++-- test-apps/pods-embroider-app/app/app.js | 2 +- test-apps/pods-embroider-app/app/index.html | 4 ++-- test-apps/pods-embroider-app/app/router.js | 2 +- test-apps/pods-embroider-app/config/environment.js | 4 ++-- test-apps/pods-embroider-app/ember-cli-build.js | 5 +++-- .../tests/application/route-scoped-css-test.js | 6 ++---- test-apps/pods-embroider-app/tests/index.html | 4 ++-- test-apps/pods-embroider-app/tests/test-helper.js | 4 ++-- 23 files changed, 39 insertions(+), 45 deletions(-) diff --git a/test-apps/classic-app/ember-cli-build.js b/test-apps/classic-app/ember-cli-build.js index 59ed3f16..fcc7fff4 100644 --- a/test-apps/classic-app/ember-cli-build.js +++ b/test-apps/classic-app/ember-cli-build.js @@ -19,7 +19,7 @@ module.exports = function (defaults) { enableTypeScriptTransform: true, }, 'ember-scoped-css': { - layerName: 'classic-app-layer', + layerName: 'test-app', }, }); diff --git a/test-apps/embroider-app/app/app.js b/test-apps/embroider-app/app/app.js index a8e9a7ca..83bc0d2b 100644 --- a/test-apps/embroider-app/app/app.js +++ b/test-apps/embroider-app/app/app.js @@ -2,7 +2,7 @@ import Application from '@ember/application'; import loadInitializers from 'ember-load-initializers'; import Resolver from 'ember-resolver'; -import config from 'embroider-app/config/environment'; +import config from 'test-app/config/environment'; export default class App extends Application { modulePrefix = config.modulePrefix; diff --git a/test-apps/embroider-app/app/index.html b/test-apps/embroider-app/app/index.html index 4a1b1ce1..88212466 100644 --- a/test-apps/embroider-app/app/index.html +++ b/test-apps/embroider-app/app/index.html @@ -12,7 +12,7 @@ {{content-for "head-footer"}} @@ -21,7 +21,7 @@ {{content-for "body"}} - + {{content-for "body-footer"}} diff --git a/test-apps/embroider-app/app/router.js b/test-apps/embroider-app/app/router.js index 79e2d003..2d73bafa 100644 --- a/test-apps/embroider-app/app/router.js +++ b/test-apps/embroider-app/app/router.js @@ -1,6 +1,6 @@ import EmberRouter from '@ember/routing/router'; -import config from 'embroider-app/config/environment'; +import config from 'test-app/config/environment'; export default class Router extends EmberRouter { location = config.locationType; diff --git a/test-apps/embroider-app/config/environment.js b/test-apps/embroider-app/config/environment.js index b5363da7..113d30ae 100644 --- a/test-apps/embroider-app/config/environment.js +++ b/test-apps/embroider-app/config/environment.js @@ -2,7 +2,7 @@ module.exports = function (environment) { const ENV = { - modulePrefix: 'embroider-app', + modulePrefix: 'test-app', environment, rootURL: '/', locationType: 'history', diff --git a/test-apps/embroider-app/ember-cli-build.js b/test-apps/embroider-app/ember-cli-build.js index 6895f84d..d1c478dd 100644 --- a/test-apps/embroider-app/ember-cli-build.js +++ b/test-apps/embroider-app/ember-cli-build.js @@ -4,6 +4,7 @@ const EmberApp = require('ember-cli/lib/broccoli/ember-app'); module.exports = async function (defaults) { const app = new EmberApp(defaults, { + name: 'test-app', // autoImport: { // watchDependencies: ['v2-addon'], // }, @@ -31,7 +32,7 @@ module.exports = async function (defaults) { 'ember-scoped-css/build/app-css-loader', ), options: { - layerName: 'embroider-app', + layerName: 'test-app', }, }, ], diff --git a/test-apps/embroider-app/tests/application/route-scoped-css-test.js b/test-apps/embroider-app/tests/application/route-scoped-css-test.js index 3e30c5d4..f143d2c8 100644 --- a/test-apps/embroider-app/tests/application/route-scoped-css-test.js +++ b/test-apps/embroider-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 'embroider-app/tests/helpers'; +import { setupApplicationTest } from 'test-app/tests/helpers'; import { scopedClass } from 'ember-scoped-css/test-support'; @@ -11,9 +11,7 @@ module('Application | visit `/`', function (hooks) { test('it has scoped class', async function (assert) { await visit('/'); - assert - .dom('h3') - .hasClass(scopedClass('embroider-app/templates/application')); + assert.dom('h3').hasClass(scopedClass('test-app/templates/application')); assert.dom('h3').hasStyle({ color: 'rgb(0, 255, 0)' }); }); }); diff --git a/test-apps/embroider-app/tests/index.html b/test-apps/embroider-app/tests/index.html index ed47a151..5ad864df 100644 --- a/test-apps/embroider-app/tests/index.html +++ b/test-apps/embroider-app/tests/index.html @@ -9,7 +9,7 @@ {{content-for "head"}} {{content-for "test-head"}} - + {{content-for "head-footer"}} {{content-for "test-head-footer"}} @@ -27,7 +27,7 @@ - + {{content-for "body-footer"}} {{content-for "test-body-footer"}} diff --git a/test-apps/embroider-app/tests/integration/alert-from-v2-addon-test.js b/test-apps/embroider-app/tests/integration/alert-from-v2-addon-test.js index 654387d2..f7b9b2d2 100644 --- a/test-apps/embroider-app/tests/integration/alert-from-v2-addon-test.js +++ b/test-apps/embroider-app/tests/integration/alert-from-v2-addon-test.js @@ -2,7 +2,7 @@ import { render } from '@ember/test-helpers'; import { hbs } from 'ember-cli-htmlbars'; import { module, test } from 'qunit'; -import { setupRenderingTest } from 'embroider-app/tests/helpers'; +import { setupRenderingTest } from 'test-app/tests/helpers'; import { scopedClass } from 'ember-scoped-css/test-support'; diff --git a/test-apps/embroider-app/tests/integration/my-component-test.js b/test-apps/embroider-app/tests/integration/my-component-test.js index 8988247d..72212654 100644 --- a/test-apps/embroider-app/tests/integration/my-component-test.js +++ b/test-apps/embroider-app/tests/integration/my-component-test.js @@ -2,7 +2,7 @@ import { render } from '@ember/test-helpers'; import { hbs } from 'ember-cli-htmlbars'; import { module, test } from 'qunit'; -import { setupRenderingTest } from 'embroider-app/tests/helpers'; +import { setupRenderingTest } from 'test-app/tests/helpers'; import { scopedClass } from 'ember-scoped-css/test-support'; @@ -16,6 +16,6 @@ module('Integration | Component | my-component', function (hooks) { assert.dom('h3').hasStyle({ color: 'rgb(255, 0, 0)' }); assert .dom('h3') - .hasClass(scopedClass('header', 'embroider-app/components/my-component')); + .hasClass(scopedClass('header', 'test-app/components/my-component')); }); }); diff --git a/test-apps/embroider-app/tests/integration/second-test.js b/test-apps/embroider-app/tests/integration/second-test.js index d671386f..170ca9f8 100644 --- a/test-apps/embroider-app/tests/integration/second-test.js +++ b/test-apps/embroider-app/tests/integration/second-test.js @@ -2,7 +2,7 @@ import { render } from '@ember/test-helpers'; import { hbs } from 'ember-cli-htmlbars'; import { module, test } from 'qunit'; -import { setupRenderingTest } from 'embroider-app/tests/helpers'; +import { setupRenderingTest } from 'test-app/tests/helpers'; import { scopedClass } from 'ember-scoped-css/test-support'; @@ -20,6 +20,6 @@ module('Integration | Component | second', function (hooks) { assert.dom('h3').hasStyle({ margin: '0px -15px' }); assert .dom('h3') - .hasClass(scopedClass('header', 'embroider-app/components/second')); + .hasClass(scopedClass('header', 'test-app/components/second')); }); }); diff --git a/test-apps/embroider-app/tests/integration/template-only-test.js b/test-apps/embroider-app/tests/integration/template-only-test.js index 6d287ae2..1ae850e9 100644 --- a/test-apps/embroider-app/tests/integration/template-only-test.js +++ b/test-apps/embroider-app/tests/integration/template-only-test.js @@ -2,7 +2,7 @@ import { render } from '@ember/test-helpers'; import { hbs } from 'ember-cli-htmlbars'; import { module, test } from 'qunit'; -import { setupRenderingTest } from 'embroider-app/tests/helpers'; +import { setupRenderingTest } from 'test-app/tests/helpers'; import { scopedClass } from 'ember-scoped-css/test-support'; @@ -14,9 +14,7 @@ module('Integration | Component | template-only', function (hooks) { assert .dom('div') - .hasClass( - scopedClass('some-class', 'embroider-app/components/template-only'), - ); + .hasClass(scopedClass('some-class', 'test-app/components/template-only')); assert.dom('div').hasStyle({ color: 'rgb(0, 0, 255)' }); }); }); diff --git a/test-apps/embroider-app/tests/test-helper.js b/test-apps/embroider-app/tests/test-helper.js index 6df20656..5990eca2 100644 --- a/test-apps/embroider-app/tests/test-helper.js +++ b/test-apps/embroider-app/tests/test-helper.js @@ -3,8 +3,8 @@ import * as QUnit from 'qunit'; import { setup } from 'qunit-dom'; import { start } from 'ember-qunit'; -import Application from 'embroider-app/app'; -import config from 'embroider-app/config/environment'; +import Application from 'test-app/app'; +import config from 'test-app/config/environment'; setApplication(Application.create(config.APP)); 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 f6c78e41..9378d3d0 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 @@ -11,9 +11,7 @@ module('Application | visit `/`', function (hooks) { test('it has scoped class', async function (assert) { await visit('/'); - assert - .dom('h3') - .hasClass(scopedClass('pods-classic-app/routes/application')); + assert.dom('h3').hasClass(scopedClass('test-app/routes/application')); assert.dom('h3').hasStyle({ color: 'rgb(0, 255, 0)' }); }); }); diff --git a/test-apps/pods-classic-app/tests/test-helper.js b/test-apps/pods-classic-app/tests/test-helper.js index 0a019993..81843044 100644 --- a/test-apps/pods-classic-app/tests/test-helper.js +++ b/test-apps/pods-classic-app/tests/test-helper.js @@ -1,5 +1,5 @@ -import Application from 'pods-classic-app/app'; -import config from 'pods-classic-app/config/environment'; +import Application from 'test-app/app'; +import config from 'test-app/config/environment'; import * as QUnit from 'qunit'; import { setApplication } from '@ember/test-helpers'; import { setup } from 'qunit-dom'; diff --git a/test-apps/pods-embroider-app/app/app.js b/test-apps/pods-embroider-app/app/app.js index 322aae22..1ba93424 100644 --- a/test-apps/pods-embroider-app/app/app.js +++ b/test-apps/pods-embroider-app/app/app.js @@ -1,7 +1,7 @@ import Application from '@ember/application'; import Resolver from 'ember-resolver'; import loadInitializers from 'ember-load-initializers'; -import config from 'pods-embroider-app/config/environment'; +import config from 'test-app/config/environment'; export default class App extends Application { modulePrefix = config.modulePrefix; diff --git a/test-apps/pods-embroider-app/app/index.html b/test-apps/pods-embroider-app/app/index.html index 58a29bc8..27eb0bc1 100644 --- a/test-apps/pods-embroider-app/app/index.html +++ b/test-apps/pods-embroider-app/app/index.html @@ -9,7 +9,7 @@ {{content-for "head"}} - + {{content-for "head-footer"}} @@ -17,7 +17,7 @@ {{content-for "body"}} - + {{content-for "body-footer"}} diff --git a/test-apps/pods-embroider-app/app/router.js b/test-apps/pods-embroider-app/app/router.js index 9a9738d2..38a0b80a 100644 --- a/test-apps/pods-embroider-app/app/router.js +++ b/test-apps/pods-embroider-app/app/router.js @@ -1,5 +1,5 @@ import EmberRouter from '@ember/routing/router'; -import config from 'pods-embroider-app/config/environment'; +import config from 'test-app/config/environment'; export default class Router extends EmberRouter { location = config.locationType; diff --git a/test-apps/pods-embroider-app/config/environment.js b/test-apps/pods-embroider-app/config/environment.js index 0a500420..9b1ced92 100644 --- a/test-apps/pods-embroider-app/config/environment.js +++ b/test-apps/pods-embroider-app/config/environment.js @@ -2,8 +2,8 @@ module.exports = function (environment) { const ENV = { - modulePrefix: 'pods-embroider-app', - podModulePrefix: 'pods-embroider-app/routes', + modulePrefix: 'test-app', + podModulePrefix: 'test-app/routes', environment, rootURL: '/', locationType: 'history', diff --git a/test-apps/pods-embroider-app/ember-cli-build.js b/test-apps/pods-embroider-app/ember-cli-build.js index f9f4b157..81d7e1be 100644 --- a/test-apps/pods-embroider-app/ember-cli-build.js +++ b/test-apps/pods-embroider-app/ember-cli-build.js @@ -4,12 +4,13 @@ const EmberApp = require('ember-cli/lib/broccoli/ember-app'); module.exports = async function (defaults) { const app = new EmberApp(defaults, { + name: 'test-app', // autoImport: { // watchDependencies: ['v2-addon'], // }, 'ember-scoped-css': { additionalRoots: ['routes/'], - layerName: 'emborider-app', + layerName: 'test-app', }, }); @@ -35,7 +36,7 @@ module.exports = async function (defaults) { 'ember-scoped-css/build/app-css-loader', ), options: { - layerName: 'embroider-app', + layerName: 'test-app', additionalRoots: ['routes/'], }, }, diff --git a/test-apps/pods-embroider-app/tests/application/route-scoped-css-test.js b/test-apps/pods-embroider-app/tests/application/route-scoped-css-test.js index 71ea9747..c227074b 100644 --- a/test-apps/pods-embroider-app/tests/application/route-scoped-css-test.js +++ b/test-apps/pods-embroider-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-embroider-app/tests/helpers'; +import { setupApplicationTest } from 'test-app/tests/helpers'; import { scopedClass } from 'ember-scoped-css/test-support'; @@ -11,9 +11,7 @@ module('Application | visit `/`', function (hooks) { test('it has scoped class', async function (assert) { await visit('/'); - assert - .dom('h3') - .hasClass(scopedClass('pods-embroider-app/routes/application')); + assert.dom('h3').hasClass(scopedClass('test-app/routes/application')); assert.dom('h3').hasStyle({ color: 'rgb(0, 255, 0)' }); }); }); diff --git a/test-apps/pods-embroider-app/tests/index.html b/test-apps/pods-embroider-app/tests/index.html index 2e93c42b..d592226b 100644 --- a/test-apps/pods-embroider-app/tests/index.html +++ b/test-apps/pods-embroider-app/tests/index.html @@ -10,7 +10,7 @@ {{content-for "test-head"}} - + {{content-for "head-footer"}} @@ -30,7 +30,7 @@ - + {{content-for "body-footer"}} diff --git a/test-apps/pods-embroider-app/tests/test-helper.js b/test-apps/pods-embroider-app/tests/test-helper.js index fcf34061..81843044 100644 --- a/test-apps/pods-embroider-app/tests/test-helper.js +++ b/test-apps/pods-embroider-app/tests/test-helper.js @@ -1,5 +1,5 @@ -import Application from 'pods-embroider-app/app'; -import config from 'pods-embroider-app/config/environment'; +import Application from 'test-app/app'; +import config from 'test-app/config/environment'; import * as QUnit from 'qunit'; import { setApplication } from '@ember/test-helpers'; import { setup } from 'qunit-dom';