Skip to content

Commit

Permalink
Everything is a test-app now
Browse files Browse the repository at this point in the history
  • Loading branch information
NullVoxPopuli committed Jul 18, 2024
1 parent bb31e94 commit 6af187d
Show file tree
Hide file tree
Showing 23 changed files with 39 additions and 45 deletions.
2 changes: 1 addition & 1 deletion test-apps/classic-app/ember-cli-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ module.exports = function (defaults) {
enableTypeScriptTransform: true,
},
'ember-scoped-css': {
layerName: 'classic-app-layer',
layerName: 'test-app',
},
});

Expand Down
2 changes: 1 addition & 1 deletion test-apps/embroider-app/app/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions test-apps/embroider-app/app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<link
integrity=""
rel="stylesheet"
href="{{rootURL}}assets/embroider-app.css"
href="{{rootURL}}assets/test-app.css"
/>

{{content-for "head-footer"}}
Expand All @@ -21,7 +21,7 @@
{{content-for "body"}}

<script src="{{rootURL}}assets/vendor.js"></script>
<script src="{{rootURL}}assets/embroider-app.js"></script>
<script src="{{rootURL}}assets/test-app.js"></script>

{{content-for "body-footer"}}
</body>
Expand Down
2 changes: 1 addition & 1 deletion test-apps/embroider-app/app/router.js
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
2 changes: 1 addition & 1 deletion test-apps/embroider-app/config/environment.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module.exports = function (environment) {
const ENV = {
modulePrefix: 'embroider-app',
modulePrefix: 'test-app',
environment,
rootURL: '/',
locationType: 'history',
Expand Down
3 changes: 2 additions & 1 deletion test-apps/embroider-app/ember-cli-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'],
// },
Expand Down Expand Up @@ -31,7 +32,7 @@ module.exports = async function (defaults) {
'ember-scoped-css/build/app-css-loader',
),
options: {
layerName: 'embroider-app',
layerName: 'test-app',
},
},
],
Expand Down
Original file line number Diff line number Diff line change
@@ -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';

Expand All @@ -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)' });
});
});
4 changes: 2 additions & 2 deletions test-apps/embroider-app/tests/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
{{content-for "head"}} {{content-for "test-head"}}

<link rel="stylesheet" href="{{rootURL}}assets/vendor.css" />
<link rel="stylesheet" href="{{rootURL}}assets/embroider-app.css" />
<link rel="stylesheet" href="{{rootURL}}assets/test-app.css" />
<link rel="stylesheet" href="{{rootURL}}assets/test-support.css" />

{{content-for "head-footer"}} {{content-for "test-head-footer"}}
Expand All @@ -27,7 +27,7 @@
<script src="/testem.js" integrity="" data-embroider-ignore></script>
<script src="{{rootURL}}assets/vendor.js"></script>
<script src="{{rootURL}}assets/test-support.js"></script>
<script src="{{rootURL}}assets/embroider-app.js"></script>
<script src="{{rootURL}}assets/test-app.js"></script>
<script src="{{rootURL}}assets/tests.js"></script>

{{content-for "body-footer"}} {{content-for "test-body-footer"}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';

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

Expand All @@ -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'));
});
});
4 changes: 2 additions & 2 deletions test-apps/embroider-app/tests/integration/second-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand All @@ -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'));
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand All @@ -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)' });
});
});
4 changes: 2 additions & 2 deletions test-apps/embroider-app/tests/test-helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -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));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)' });
});
});
4 changes: 2 additions & 2 deletions test-apps/pods-classic-app/tests/test-helper.js
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
2 changes: 1 addition & 1 deletion test-apps/pods-embroider-app/app/app.js
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
4 changes: 2 additions & 2 deletions test-apps/pods-embroider-app/app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@
{{content-for "head"}}

<link integrity="" rel="stylesheet" href="{{rootURL}}assets/vendor.css">
<link integrity="" rel="stylesheet" href="{{rootURL}}assets/pods-embroider-app.css">
<link integrity="" rel="stylesheet" href="{{rootURL}}assets/test-app.css">

{{content-for "head-footer"}}
</head>
<body>
{{content-for "body"}}

<script src="{{rootURL}}assets/vendor.js"></script>
<script src="{{rootURL}}assets/pods-embroider-app.js"></script>
<script src="{{rootURL}}assets/test-app.js"></script>

{{content-for "body-footer"}}
</body>
Expand Down
2 changes: 1 addition & 1 deletion test-apps/pods-embroider-app/app/router.js
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
4 changes: 2 additions & 2 deletions test-apps/pods-embroider-app/config/environment.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
5 changes: 3 additions & 2 deletions test-apps/pods-embroider-app/ember-cli-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
},
});

Expand All @@ -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/'],
},
},
Expand Down
Original file line number Diff line number Diff line change
@@ -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';

Expand All @@ -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)' });
});
});
4 changes: 2 additions & 2 deletions test-apps/pods-embroider-app/tests/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
{{content-for "test-head"}}

<link rel="stylesheet" href="{{rootURL}}assets/vendor.css">
<link rel="stylesheet" href="{{rootURL}}assets/pods-embroider-app.css">
<link rel="stylesheet" href="{{rootURL}}assets/test-app.css">
<link rel="stylesheet" href="{{rootURL}}assets/test-support.css">

{{content-for "head-footer"}}
Expand All @@ -30,7 +30,7 @@
<script src="/testem.js" integrity="" data-embroider-ignore></script>
<script src="{{rootURL}}assets/vendor.js"></script>
<script src="{{rootURL}}assets/test-support.js"></script>
<script src="{{rootURL}}assets/pods-embroider-app.js"></script>
<script src="{{rootURL}}assets/test-app.js"></script>
<script src="{{rootURL}}assets/tests.js"></script>

{{content-for "body-footer"}}
Expand Down
4 changes: 2 additions & 2 deletions test-apps/pods-embroider-app/tests/test-helper.js
Original file line number Diff line number Diff line change
@@ -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';
Expand Down

0 comments on commit 6af187d

Please sign in to comment.