@ember/app-blueprint 0.8.2 → 6.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. package/.prettierignore +1 -2
  2. package/.release-plan.json +9 -5
  3. package/CHANGELOG.md +17 -0
  4. package/eslint.config.mjs +1 -5
  5. package/files/package.json +43 -43
  6. package/package.json +2 -2
  7. package/tests/arguments.test.mjs +155 -0
  8. package/tests/fixtures/tests-js-10/app/components/.gitkeep +0 -0
  9. package/tests/fixtures/tests-js-10/app/components/sweet.gjs +3 -0
  10. package/tests/{fixture → fixtures/tests-js-10}/app/router.js +2 -3
  11. package/tests/fixtures/tests-js-10/app/routes/.gitkeep +0 -0
  12. package/tests/{fixture/app/routes/styles.js → fixtures/tests-js-10/app/routes/fancy.js} +1 -1
  13. package/tests/fixtures/tests-js-10/app/styles/app.css +3 -0
  14. package/tests/fixtures/tests-js-10/app/templates/application.gjs +15 -0
  15. package/tests/fixtures/tests-js-10/app/templates/fancy.gjs +12 -0
  16. package/tests/fixtures/tests-js-10/tests/acceptance/index-test.js +26 -0
  17. package/tests/fixtures/tests-js-10/tests/integration/components/sweet-test.gjs +28 -0
  18. package/tests/fixtures/tests-js-10/tests/routes/fancy-test.js +11 -0
  19. package/tests/{fixture-ts/testem-proxy.js → fixtures/tests-js-20/testem-dev.js} +26 -2
  20. package/tests/fixtures/tests-ts-10/app/components/.gitkeep +0 -0
  21. package/tests/fixtures/tests-ts-10/app/components/sweet.gts +3 -0
  22. package/tests/{fixture-ts → fixtures/tests-ts-10}/app/router.ts +2 -3
  23. package/tests/fixtures/tests-ts-10/app/routes/.gitkeep +0 -0
  24. package/tests/{fixture-ts/app/routes/styles.ts → fixtures/tests-ts-10/app/routes/fancy.ts} +1 -1
  25. package/tests/fixtures/tests-ts-10/app/styles/app.css +3 -0
  26. package/tests/fixtures/tests-ts-10/app/templates/application.gts +15 -0
  27. package/tests/fixtures/tests-ts-10/app/templates/fancy.gts +12 -0
  28. package/tests/fixtures/tests-ts-10/tests/acceptance/index-test.ts +26 -0
  29. package/tests/fixtures/tests-ts-10/tests/integration/components/sweet-test.gjs +28 -0
  30. package/tests/fixtures/tests-ts-10/tests/routes/fancy-test.js +11 -0
  31. package/tests/generators.test.mjs +60 -0
  32. package/tests/helpers.mjs +26 -91
  33. package/tests/lint.test.mjs +27 -10
  34. package/tests/tests.test.mjs +218 -0
  35. package/vitest.config.ts +2 -2
  36. package/tests/default.test.mjs +0 -155
  37. package/tests/fixture/app/components/custom-component.hbs +0 -3
  38. package/tests/fixture/app/styles/app.css +0 -5
  39. package/tests/fixture/app/templates/application.hbs +0 -3
  40. package/tests/fixture/app/templates/custom-component.hbs +0 -1
  41. package/tests/fixture/app/templates/index.hbs +0 -1
  42. package/tests/fixture/app/templates/styles.hbs +0 -5
  43. package/tests/fixture/testem-proxy.js +0 -35
  44. package/tests/fixture/tests/acceptance/custom-component-test.js +0 -14
  45. package/tests/fixture/tests/acceptance/styles-test.js +0 -18
  46. package/tests/fixture-ts/app/styles/app.css +0 -5
  47. package/tests/fixture-ts/app/templates/components/custom.gts +0 -5
  48. package/tests/fixture-ts/app/templates/custom-component.gts +0 -5
  49. package/tests/fixture-ts/app/templates/index.gts +0 -5
  50. package/tests/fixture-ts/app/templates/styles.gts +0 -7
  51. package/tests/fixture-ts/tests/acceptance/custom-component-test.ts +0 -14
  52. package/tests/fixture-ts/tests/acceptance/styles-test.ts +0 -18
  53. package/tests/typescript.test.mjs +0 -24
  54. /package/tests/{fixture → fixtures/tests-js-10}/app/initializers/test-init.js +0 -0
  55. /package/tests/{fixture → fixtures/tests-js-10}/app/instance-initializers/test-instance-init.js +0 -0
  56. /package/tests/{fixture → fixtures/tests-js-10}/tests/acceptance/app-init-test.js +0 -0
  57. /package/tests/{fixture → fixtures/tests-js-10}/tests/acceptance/welcome-page-test.js +0 -0
  58. /package/tests/{fixture-ts → fixtures/tests-ts-10}/app/initializers/test-init.ts +0 -0
  59. /package/tests/{fixture-ts → fixtures/tests-ts-10}/app/instance-initializers/test-instance-init.ts +0 -0
  60. /package/tests/{fixture-ts → fixtures/tests-ts-10}/tests/acceptance/app-init-test.ts +0 -0
  61. /package/tests/{fixture-ts → fixtures/tests-ts-10}/tests/acceptance/welcome-page-test.ts +0 -0
package/.prettierignore CHANGED
@@ -1,7 +1,6 @@
1
1
  files/
2
2
  node_modules/
3
- tests/fixture/
4
- tests/fixture-ts/
3
+ tests/fixtures/
5
4
 
6
5
  *.yml
7
6
  *.yaml
@@ -1,18 +1,22 @@
1
1
  {
2
2
  "solution": {
3
3
  "@ember/app-blueprint": {
4
- "impact": "patch",
5
- "oldVersion": "0.8.1",
6
- "newVersion": "0.8.2",
4
+ "impact": "minor",
5
+ "oldVersion": "6.5.0",
6
+ "newVersion": "6.6.0",
7
7
  "tagName": "latest",
8
8
  "constraints": [
9
+ {
10
+ "impact": "minor",
11
+ "reason": "Appears in changelog section :rocket: Enhancement"
12
+ },
9
13
  {
10
14
  "impact": "patch",
11
- "reason": "Appears in changelog section :bug: Bug Fix"
15
+ "reason": "Appears in changelog section :house: Internal"
12
16
  }
13
17
  ],
14
18
  "pkgJSONPath": "./package.json"
15
19
  }
16
20
  },
17
- "description": "## Release (2025-09-03)\n\n* @ember/app-blueprint 0.8.2 (patch)\n\n#### :bug: Bug Fix\n* `@ember/app-blueprint`\n * [#56](https://github.com/ember-cli/ember-app-blueprint/pull/56) Make sure that `npm run lint` doesn't fail on a newly generated app ([@pichfl](https://github.com/pichfl))\n\n#### Committers: 1\n- Florian Pichler ([@pichfl](https://github.com/pichfl))\n"
21
+ "description": "## Release (2025-09-04)\n\n* @ember/app-blueprint 6.6.0 (minor)\n\n#### :rocket: Enhancement\n* `@ember/app-blueprint`\n * [#63](https://github.com/ember-cli/ember-app-blueprint/pull/63) reset blueprint to match ember-cli app blueprint (in the next release) ([@mansona](https://github.com/mansona))\n * [#57](https://github.com/ember-cli/ember-app-blueprint/pull/57) run update-blueprint-deps to update to Ember 6.6 ([@mansona](https://github.com/mansona))\n\n#### :house: Internal\n* `@ember/app-blueprint`\n * [#60](https://github.com/ember-cli/ember-app-blueprint/pull/60) Split test files ([@pichfl](https://github.com/pichfl))\n\n#### Committers: 2\n- Chris Manson ([@mansona](https://github.com/mansona))\n- Florian Pichler ([@pichfl](https://github.com/pichfl))\n"
18
22
  }
package/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # Changelog
2
2
 
3
+ ## Release (2025-09-04)
4
+
5
+ * @ember/app-blueprint 6.6.0 (minor)
6
+
7
+ #### :rocket: Enhancement
8
+ * `@ember/app-blueprint`
9
+ * [#63](https://github.com/ember-cli/ember-app-blueprint/pull/63) reset blueprint to match ember-cli app blueprint (in the next release) ([@mansona](https://github.com/mansona))
10
+ * [#57](https://github.com/ember-cli/ember-app-blueprint/pull/57) run update-blueprint-deps to update to Ember 6.6 ([@mansona](https://github.com/mansona))
11
+
12
+ #### :house: Internal
13
+ * `@ember/app-blueprint`
14
+ * [#60](https://github.com/ember-cli/ember-app-blueprint/pull/60) Split test files ([@pichfl](https://github.com/pichfl))
15
+
16
+ #### Committers: 2
17
+ - Chris Manson ([@mansona](https://github.com/mansona))
18
+ - Florian Pichler ([@pichfl](https://github.com/pichfl))
19
+
3
20
  ## Release (2025-09-03)
4
21
 
5
22
  * @ember/app-blueprint 0.8.2 (patch)
package/eslint.config.mjs CHANGED
@@ -25,10 +25,6 @@ export default [
25
25
  pluginJs.configs.recommended,
26
26
  eslintConfigPrettier,
27
27
  {
28
- ignores: [
29
- 'tests/fixture/*',
30
- 'tests/fixture-ts/*',
31
- 'files/ember-cli-build.js',
32
- ],
28
+ ignores: ['tests/fixtures/*', 'files/ember-cli-build.js'],
33
29
  },
34
30
  ];
@@ -31,74 +31,74 @@
31
31
  "./*": "./app/*"
32
32
  },
33
33
  "devDependencies": {
34
- "@babel/core": "^7.27.1",
35
- "@babel/runtime": "^7.27.1",
36
- "@babel/plugin-transform-runtime": "^7.27.1<% if (typescript) { %>",
37
- "@babel/plugin-transform-typescript": "^7.27.1<% } %>",
38
- "@babel/eslint-parser": "^7.27.1<% if (typescript && emberData) { %>",
39
- "@ember-data/adapter": "~5.5.0",
40
- "@ember-data/graph": "~5.5.0",
41
- "@ember-data/json-api": "~5.5.0",
42
- "@ember-data/legacy-compat": "~5.5.0",
43
- "@ember-data/model": "~5.5.0",
44
- "@ember-data/request": "~5.5.0",
45
- "@ember-data/request-utils": "~5.5.0",
46
- "@ember-data/serializer": "~5.5.0",
47
- "@ember-data/store": "~5.5.0<% } %><% if (typescript) { %>",
34
+ "@babel/core": "^7.28.3",
35
+ "@babel/runtime": "^7.28.3",
36
+ "@babel/plugin-transform-runtime": "^7.28.3<% if (typescript) { %>",
37
+ "@babel/plugin-transform-typescript": "^7.28.0<% } %>",
38
+ "@babel/eslint-parser": "^7.28.0<% if (typescript && emberData) { %>",
39
+ "@ember-data/adapter": "~5.6.0",
40
+ "@ember-data/graph": "~5.6.0",
41
+ "@ember-data/json-api": "~5.6.0",
42
+ "@ember-data/legacy-compat": "~5.6.0",
43
+ "@ember-data/model": "~5.6.0",
44
+ "@ember-data/request": "~5.6.0",
45
+ "@ember-data/request-utils": "~5.6.0",
46
+ "@ember-data/serializer": "~5.6.0",
47
+ "@ember-data/store": "~5.6.0<% } %><% if (typescript) { %>",
48
48
  "@ember/app-tsconfig": "^1.0.3<% } %>",
49
49
  "@ember/optional-features": "^2.2.0",
50
50
  "@ember/string": "^4.0.1",
51
51
  "@ember/test-helpers": "^5.2.2",
52
- "@ember/test-waiters": "^4.1.0",
53
- "@embroider/macros": "^1.18.0",
54
- "@embroider/core": "^4.1.0",
55
- "@embroider/vite": "^1.1.5",
56
- "@embroider/compat": "^4.1.0",
57
- "@embroider/router": "^3.0.1",
52
+ "@ember/test-waiters": "^4.1.1",
53
+ "@embroider/macros": "^1.18.1",
54
+ "@embroider/core": "^4.1.3",
55
+ "@embroider/vite": "^1.2.0",
56
+ "@embroider/compat": "^4.1.3",
57
+ "@embroider/router": "^3.0.3",
58
58
  "@embroider/config-meta-loader": "^1.0.0",
59
- "@eslint/js": "^9.27.0",
59
+ "@eslint/js": "^9.34.0",
60
60
  "@glimmer/component": "^2.0.0<% if (typescript) { %>",
61
61
  "@glint/core": "^1.5.2",
62
62
  "@glint/environment-ember-loose": "^1.5.2",
63
63
  "@glint/environment-ember-template-imports": "^1.5.2",
64
64
  "@glint/template": "^1.5.2<% } %>",
65
65
  "@rollup/plugin-babel": "^6.0.4<% if (typescript) { %>",
66
- "@types/qunit": "^2.19.12",
66
+ "@types/qunit": "^2.19.13",
67
67
  "@types/rsvp": "^4.0.9<% if (emberData) {%>",
68
- "@warp-drive/core-types": "~5.5.0<% }} %><% if (emberData) { %>",
69
- "@warp-drive/ember": "~5.5.0<% } %>",
68
+ "@warp-drive/core-types": "~5.6.0<% }} %><% if (emberData) { %>",
69
+ "@warp-drive/ember": "~5.6.0<% } %>",
70
70
  "babel-plugin-ember-template-compilation": "^2.4.1",
71
- "concurrently": "^9.1.2",
71
+ "concurrently": "^9.2.1",
72
72
  "decorator-transforms": "^2.3.0",
73
73
  "ember-auto-import": "^2.10.0",
74
- "ember-cli": "~6.5.0-beta.0",
74
+ "ember-cli": "~6.6.0",
75
75
  "ember-cli-babel": "^8.2.0",
76
- "ember-cli-deprecation-workflow": "^3.3.0<% if (emberData) { %>",
77
- "ember-data": "~5.5.0<% } %>",
76
+ "ember-cli-deprecation-workflow": "^3.4.0<% if (emberData) { %>",
77
+ "ember-data": "~5.6.0<% } %>",
78
78
  "ember-load-initializers": "^3.0.1",
79
79
  "ember-modifier": "^4.2.2",
80
- "ember-page-title": "^9.0.2",
80
+ "ember-page-title": "^9.0.3",
81
81
  "ember-qunit": "^9.0.3",
82
82
  "ember-resolver": "^13.1.1",
83
- "ember-source": "~6.5.0-beta.1",
84
- "ember-template-lint": "^7.7.0<% if (welcome) { %>",
83
+ "ember-source": "~6.6.0",
84
+ "ember-template-lint": "^7.9.3<% if (welcome) { %>",
85
85
  "ember-welcome-page": "^7.0.2<% } %>",
86
- "eslint": "^9.27.0",
87
- "eslint-config-prettier": "^10.1.5",
88
- "eslint-plugin-ember": "^12.5.0",
89
- "eslint-plugin-n": "^17.18.0",
90
- "eslint-plugin-qunit": "^8.1.2",
91
- "globals": "^16.1.0",
92
- "prettier": "^3.5.3",
93
- "prettier-plugin-ember-template-tag": "^2.0.5",
86
+ "eslint": "^9.34.0",
87
+ "eslint-config-prettier": "^10.1.8",
88
+ "eslint-plugin-ember": "^12.7.3",
89
+ "eslint-plugin-n": "^17.21.3",
90
+ "eslint-plugin-qunit": "^8.2.5",
91
+ "globals": "^16.3.0",
92
+ "prettier": "^3.6.2",
93
+ "prettier-plugin-ember-template-tag": "^2.1.0",
94
94
  "qunit": "^2.24.1",
95
- "qunit-dom": "^3.4.0",
96
- "stylelint": "^16.19.1",
95
+ "qunit-dom": "^3.5.0",
96
+ "stylelint": "^16.23.1",
97
97
  "stylelint-config-standard": "^38.0.0",
98
98
  "testem": "^3.16.0",
99
99
  "tracked-built-ins": "^4.0.0<% if (typescript) { %>",
100
- "typescript": "^5.8.3",
101
- "typescript-eslint": "^8.32.1<% } %>",
100
+ "typescript": "^5.9.2",
101
+ "typescript-eslint": "^8.41.0<% } %>",
102
102
  "vite": "^6.3.5"
103
103
  },
104
104
  "engines": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ember/app-blueprint",
3
- "version": "0.8.2",
3
+ "version": "6.6.0",
4
4
  "description": "Blueprint for next generation of Ember apps",
5
5
  "keywords": [
6
6
  "ember-blueprint"
@@ -27,10 +27,10 @@
27
27
  "execa": "^9.1.0",
28
28
  "fixturify": "^3.0.0",
29
29
  "globals": "^15.3.0",
30
+ "jsonc-parser": "^3.3.1",
30
31
  "prettier": "^3.2.5",
31
32
  "prettier-plugin-ember-template-tag": "^2.0.2",
32
33
  "release-plan": "^0.16.0",
33
- "resolve-bin": "^1.0.1",
34
34
  "strip-ansi": "^7.1.0",
35
35
  "tmp-promise": "^3.0.3",
36
36
  "vitest": "^3.1.2"
@@ -0,0 +1,155 @@
1
+ import { describe, it, expect } from 'vitest';
2
+
3
+ import { parse } from 'jsonc-parser';
4
+ import { generateApp } from './helpers.mjs';
5
+
6
+ /**
7
+ * These tests are non-functional that are designed to test only the output of the blueprint
8
+ * and should never install packages or run any lints or tests
9
+ */
10
+ describe('Blueprint Arguments', function () {
11
+ describe('--typescript', async function () {
12
+ it('does not generate a tsconfig if you do not pass --typescript', async function () {
13
+ const { files } = await generateApp();
14
+
15
+ expect(files['tsconfig.json']).to.be.undefined;
16
+ expect(Object.keys(files.app.templates)).toMatchInlineSnapshot(`
17
+ [
18
+ "application.gjs",
19
+ ]
20
+ `);
21
+ });
22
+
23
+ it('generates an app with --typescript', async function () {
24
+ const { files } = await generateApp({ flags: ['--typescript'] });
25
+
26
+ expect(parse(files['tsconfig.json']).extends).to.equal(
27
+ '@ember/app-tsconfig',
28
+ );
29
+ expect(parse(files['package.json']).scripts['lint:types']).to.not.be
30
+ .undefined;
31
+ expect(Object.keys(files.app.templates)).toMatchInlineSnapshot(`
32
+ [
33
+ "application.gts",
34
+ ]
35
+ `);
36
+ });
37
+ });
38
+
39
+ describe('--package-manager', async function () {
40
+ it('works with npm by default', async function () {
41
+ const { files } = await generateApp();
42
+
43
+ expect(parse(files['package.json']).scripts.lint).toMatchInlineSnapshot(
44
+ `"concurrently "npm:lint:*(!fix)" --names "lint:" --prefixColors auto"`,
45
+ );
46
+ });
47
+
48
+ it('works with --package-manager=pnpm', async function () {
49
+ const { files } = await generateApp({
50
+ flags: ['--package-manager=pnpm'],
51
+ });
52
+
53
+ expect(parse(files['package.json']).scripts.lint).toMatchInlineSnapshot(
54
+ `"concurrently "pnpm:lint:*(!fix)" --names "lint:" --prefixColors auto"`,
55
+ );
56
+ });
57
+
58
+ it('works with --pnpm in the same way as --package-manager=pnpm', async function () {
59
+ const { files } = await generateApp({ flags: ['--pnpm'] });
60
+
61
+ expect(parse(files['package.json']).scripts.lint).toMatchInlineSnapshot(
62
+ `"concurrently "pnpm:lint:*(!fix)" --names "lint:" --prefixColors auto"`,
63
+ );
64
+ });
65
+
66
+ it('works with --package-manager=yarn', async function () {
67
+ const { files } = await generateApp({
68
+ flags: ['--package-manager=yarn'],
69
+ });
70
+
71
+ expect(parse(files['package.json']).scripts.lint).toMatchInlineSnapshot(
72
+ `"concurrently "yarn:lint:*(!fix)" --names "lint:" --prefixColors auto"`,
73
+ );
74
+ });
75
+
76
+ it('works with --yarn in the same way as --package-manager=yarn', async function () {
77
+ const { files } = await generateApp({ flags: ['--yarn'] });
78
+
79
+ expect(parse(files['package.json']).scripts.lint).toMatchInlineSnapshot(
80
+ `"concurrently "yarn:lint:*(!fix)" --names "lint:" --prefixColors auto"`,
81
+ );
82
+ });
83
+ });
84
+
85
+ describe('--ci-provider', async function () {
86
+ it('uses github by default', async function () {
87
+ const { files } = await generateApp();
88
+
89
+ expect(files['.github'].workflows['ci.yml']).to.not.be.undefined;
90
+ });
91
+
92
+ it('does not generate any workflow files if --ci-provider=none is passed', async function () {
93
+ const { files } = await generateApp({ flags: ['--ci-provider=none'] });
94
+
95
+ expect(files['.github']).to.be.undefined;
96
+ });
97
+ });
98
+
99
+ describe('--lang', async function () {
100
+ it('generates an app --lang=(valid code): no message + set `lang` in index.html', async function () {
101
+ const { files } = await generateApp({ flags: ['--lang=eo'] });
102
+
103
+ expect(files['index.html']).to.contain('<html lang="eo">');
104
+ });
105
+ });
106
+
107
+ describe('--no-ember-data', async function () {
108
+ it('installs ember-data by default', async function () {
109
+ const { files } = await generateApp();
110
+
111
+ expect(parse(files['package.json']).devDependencies['ember-data']).to.not
112
+ .be.undefined;
113
+ });
114
+
115
+ it('does not add ember-data if you pass --no-ember-data', async function () {
116
+ const { files } = await generateApp({ flags: ['--no-ember-data'] });
117
+
118
+ expect(parse(files['package.json']).devDependencies['ember-data']).to.be
119
+ .undefined;
120
+ });
121
+ });
122
+
123
+ describe('--name', async function () {
124
+ it('generates an app with a specified name', async function () {
125
+ const { files } = await generateApp({
126
+ name: 'foo',
127
+ flags: ['--name=foo'],
128
+ });
129
+
130
+ expect(parse(files['package.json']).name).toBe('foo');
131
+ });
132
+ });
133
+
134
+ describe('--no-welcome', async function () {
135
+ it('generates an app with the welcome page component by default', async function () {
136
+ const { files } = await generateApp();
137
+
138
+ expect(parse(files['package.json']).devDependencies['ember-welcome-page'])
139
+ .to.not.be.undefined;
140
+ expect(files.app.templates['application.gjs']).to.contain(
141
+ '<WelcomePage />',
142
+ );
143
+ });
144
+
145
+ it('generates an app without the welcome page component', async function () {
146
+ const { files } = await generateApp({ flags: ['--no-welcome'] });
147
+
148
+ expect(parse(files['package.json']).devDependencies['ember-welcome-page'])
149
+ .to.be.undefined;
150
+ expect(files.app.templates['application.gjs']).not.to.contain(
151
+ '<WelcomePage />',
152
+ );
153
+ });
154
+ });
155
+ });
@@ -0,0 +1,3 @@
1
+ <template>
2
+ {{yield}}
3
+ </template>
@@ -1,4 +1,4 @@
1
- import EmberRouter from '@ember/routing/router';
1
+ import EmberRouter from '@embroider/router';
2
2
  import config from 'test-app/config/environment';
3
3
 
4
4
  export default class Router extends EmberRouter {
@@ -7,6 +7,5 @@ export default class Router extends EmberRouter {
7
7
  }
8
8
 
9
9
  Router.map(function () {
10
- this.route('styles');
11
- this.route('custom-component');
10
+ this.route('fancy');
12
11
  });
File without changes
@@ -1,6 +1,6 @@
1
1
  import Route from '@ember/routing/route';
2
2
  import { service } from '@ember/service';
3
3
 
4
- export default class StylesRoute extends Route {
4
+ export default class FancyRoute extends Route {
5
5
  @service router;
6
6
  }
@@ -0,0 +1,3 @@
1
+ .purple {
2
+ color: rebeccapurple;
3
+ }
@@ -0,0 +1,15 @@
1
+ import { pageTitle } from 'ember-page-title';
2
+ import { WelcomePage } from 'ember-welcome-page';
3
+ import { LinkTo } from '@ember/routing';
4
+
5
+ <template>
6
+ {{pageTitle "TestApp"}}
7
+
8
+ {{outlet}}
9
+
10
+ {{! The following component displays Ember's default welcome message. }}
11
+ <WelcomePage />
12
+ {{! Feel free to remove this! }}
13
+
14
+ <LinkTo @route="fancy" data-test-a>Fancy</LinkTo>
15
+ </template>
@@ -0,0 +1,12 @@
1
+ import { pageTitle } from 'ember-page-title';
2
+ import Sweet from '../components/sweet.gjs';
3
+
4
+ <template>
5
+ {{pageTitle "Fancy"}}
6
+
7
+ <Sweet />
8
+
9
+ <p class="purple">Fancy</p>
10
+
11
+ {{outlet}}
12
+ </template>
@@ -0,0 +1,26 @@
1
+ import { module, test } from 'qunit';
2
+ import { visit, currentURL, click } from '@ember/test-helpers';
3
+ import { setupApplicationTest } from 'test-app/tests/helpers';
4
+
5
+ module('Acceptance | index', function (hooks) {
6
+ setupApplicationTest(hooks);
7
+
8
+ test('visiting /', async function (assert) {
9
+ await visit('/');
10
+
11
+ assert.strictEqual(currentURL(), '/');
12
+
13
+ await click('[data-test-a]');
14
+
15
+ assert.strictEqual(currentURL(), '/fancy');
16
+
17
+ assert.dom('p').hasText('Fancy');
18
+
19
+ assert.dom('p.purple').hasStyle(
20
+ {
21
+ 'color': 'rgb(102, 51, 153)',
22
+ },
23
+ 'The text should be purple if the app styles are working correctly',
24
+ )
25
+ });
26
+ });
@@ -0,0 +1,28 @@
1
+ import { module, test } from 'qunit';
2
+ import { setupRenderingTest } from 'test-app/tests/helpers';
3
+ import { render } from '@ember/test-helpers';
4
+ import Sweet from 'test-app/components/sweet';
5
+
6
+ module('Integration | Component | sweet', function (hooks) {
7
+ setupRenderingTest(hooks);
8
+
9
+ test('it renders', async function (assert) {
10
+ // Updating values is achieved using autotracking, just like in app code. For example:
11
+ // class State { @tracked myProperty = 0; }; const state = new State();
12
+ // and update using state.myProperty = 1; await rerender();
13
+ // Handle any actions with function myAction(val) { ... };
14
+
15
+ await render(<template><Sweet /></template>);
16
+
17
+ assert.dom().hasText('');
18
+
19
+ // Template block usage:
20
+ await render(<template>
21
+ <Sweet>
22
+ template block text
23
+ </Sweet>
24
+ </template>);
25
+
26
+ assert.dom().hasText('template block text');
27
+ });
28
+ });
@@ -0,0 +1,11 @@
1
+ import { module, test } from 'qunit';
2
+ import { setupTest } from 'test-app/tests/helpers';
3
+
4
+ module('Unit | Route | fancy', function (hooks) {
5
+ setupTest(hooks);
6
+
7
+ test('it exists', function (assert) {
8
+ let route = this.owner.lookup('route:fancy');
9
+ assert.ok(route);
10
+ });
11
+ });
@@ -1,4 +1,3 @@
1
- /* eslint-disable */
2
1
  const httpProxy = require('http-proxy');
3
2
 
4
3
  /*
@@ -10,7 +9,7 @@ const httpProxy = require('http-proxy');
10
9
  "/tests/index.html" URL.
11
10
  */
12
11
 
13
- module.exports = function testemProxy(targetURL) {
12
+ function testemProxy(targetURL) {
14
13
  return function testemProxyHandler(app) {
15
14
  const proxy = httpProxy.createProxyServer({
16
15
  changeOrigin: true,
@@ -33,4 +32,29 @@ module.exports = function testemProxy(targetURL) {
33
32
  proxy.web(req, res, { target: targetURL + url });
34
33
  });
35
34
  };
35
+ }
36
+
37
+ module.exports = {
38
+ test_page: 'tests/index.html?hidepassed',
39
+ disable_watching: true,
40
+ launch_in_ci: ['Chrome'],
41
+ launch_in_dev: ['Chrome'],
42
+ browser_start_timeout: 120,
43
+ browser_args: {
44
+ Chrome: {
45
+ ci: [
46
+ // --no-sandbox is needed when running Chrome inside a container
47
+ process.env.CI ? '--no-sandbox' : null,
48
+ '--headless',
49
+ '--disable-dev-shm-usage',
50
+ '--disable-software-rasterizer',
51
+ '--mute-audio',
52
+ '--remote-debugging-port=0',
53
+ '--window-size=1440,900',
54
+ ].filter(Boolean),
55
+ },
56
+ },
57
+ middleware: [
58
+ testemProxy('%APP_URL%')
59
+ ],
36
60
  };
@@ -0,0 +1,3 @@
1
+ <template>
2
+ {{yield}}
3
+ </template>
@@ -1,4 +1,4 @@
1
- import EmberRouter from '@ember/routing/router';
1
+ import EmberRouter from '@embroider/router';
2
2
  import config from 'test-app/config/environment';
3
3
 
4
4
  export default class Router extends EmberRouter {
@@ -7,6 +7,5 @@ export default class Router extends EmberRouter {
7
7
  }
8
8
 
9
9
  Router.map(function () {
10
- this.route('styles');
11
- this.route('custom-component');
10
+ this.route('fancy');
12
11
  });
File without changes
@@ -3,6 +3,6 @@ import { service } from '@ember/service';
3
3
 
4
4
  import type RouterService from '@ember/routing/router-service';
5
5
 
6
- export default class StylesRoute extends Route {
6
+ export default class FancyRoute extends Route {
7
7
  @service declare router: RouterService;
8
8
  }
@@ -0,0 +1,3 @@
1
+ .purple {
2
+ color: rebeccapurple;
3
+ }
@@ -0,0 +1,15 @@
1
+ import { pageTitle } from 'ember-page-title';
2
+ import { WelcomePage } from 'ember-welcome-page';
3
+ import { LinkTo } from '@ember/routing';
4
+
5
+ <template>
6
+ {{pageTitle "TestApp"}}
7
+
8
+ {{outlet}}
9
+
10
+ {{! The following component displays Ember's default welcome message. }}
11
+ <WelcomePage />
12
+ {{! Feel free to remove this! }}
13
+
14
+ <LinkTo @route="fancy" data-test-a>Fancy</LinkTo>
15
+ </template>
@@ -0,0 +1,12 @@
1
+ import { pageTitle } from 'ember-page-title';
2
+ import Sweet from '../components/sweet.gts';
3
+
4
+ <template>
5
+ {{pageTitle "Fancy"}}
6
+
7
+ <Sweet />
8
+
9
+ <p class="purple">Fancy</p>
10
+
11
+ {{outlet}}
12
+ </template>
@@ -0,0 +1,26 @@
1
+ import { module, test } from 'qunit';
2
+ import { visit, currentURL, click } from '@ember/test-helpers';
3
+ import { setupApplicationTest } from 'test-app/tests/helpers';
4
+
5
+ module('Acceptance | index', function (hooks) {
6
+ setupApplicationTest(hooks);
7
+
8
+ test('visiting /', async function (assert) {
9
+ await visit('/');
10
+
11
+ assert.strictEqual(currentURL(), '/');
12
+
13
+ await click('[data-test-a]');
14
+
15
+ assert.strictEqual(currentURL(), '/fancy');
16
+
17
+ assert.dom('p').hasText('Fancy');
18
+
19
+ assert.dom('p.purple').hasStyle(
20
+ {
21
+ 'color': 'rgb(102, 51, 153)',
22
+ },
23
+ 'The text should be purple if the app styles are working correctly',
24
+ )
25
+ });
26
+ });