Skip to content

Commit a292168

Browse files
committed
Cleanup
1 parent f57675e commit a292168

2 files changed

Lines changed: 1 addition & 33 deletions

File tree

smoke-tests/scenarios/strict-resolver-substates-test.ts

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,6 @@ import type { PreparedApp } from 'scenario-tester';
33
import * as QUnit from 'qunit';
44
const { module: Qmodule, test } = QUnit;
55

6-
// Companion to `basic-test.ts`: builds a full v2 app wired up with the
7-
// strict resolver (modules: { ...import.meta.glob(...) }) and exercises
8-
// Ember's auto-generated loading/error substates through real route
9-
// transitions. Covers:
10-
//
11-
// - visiting / (plain route + template — sanity)
12-
// - visiting /slow (async model -> loading substate)
13-
// - visiting /broken (rejected model -> error substate)
14-
//
15-
// Nested/dynamic route coverage lives in strict-resolver-test.ts so we
16-
// don't pay to rebuild it here.
176
strictAppScenarios
187
.map('strict-resolver-substates', (project) => {
198
project.mergeFiles({
@@ -47,9 +36,7 @@ strictAppScenarios
4736
});
4837
`,
4938
services: {
50-
// A controllable gate for /slow's model. Tests call hold() to
51-
// receive a promise and release() to resolve it — that lets the
52-
// loading substate observably appear before the main template.
39+
// RSVP.defer-as-a-service
5340
'gate.js': `
5441
import Service from '@ember/service';
5542
@@ -114,14 +101,9 @@ strictAppScenarios
114101
'slow.hbs': `
115102
<div data-test="slow-ready">{{@model.message}}</div>
116103
`,
117-
// Auto-generated loading substate for /slow. Ember will resolve
118-
// template:slow_loading -> slow-loading -> templates/slow-loading.
119104
'slow-loading.hbs': `
120105
<div data-test="slow-loading">Loading slow route...</div>
121106
`,
122-
// Auto-generated error substate for /broken. The error model is
123-
// the thrown value, so we render its .message to prove the
124-
// template received it.
125107
'broken-error.hbs': `
126108
<div data-test="broken-error">Caught error: {{@model.message}}</div>
127109
`,

smoke-tests/scenarios/strict-resolver-test.ts

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ strictAppScenarios
1919
...import.meta.glob('./services/**/*.{js,ts}', { eager: true }),
2020
...import.meta.glob('./controllers/**/*.{js,ts}', { eager: true }),
2121
...import.meta.glob('./routes/**/*.{js,ts}', { eager: true }),
22-
...import.meta.glob('./components/**/*.{gjs,gts,js,ts}', { eager: true }),
23-
...import.meta.glob('./helpers/**/*.{js,ts}', { eager: true }),
2422
...import.meta.glob('./templates/**/*.hbs', { eager: true }),
2523
};
2624
}
@@ -185,11 +183,6 @@ strictAppScenarios
185183
});
186184
187185
test('parent route with auto-generated index renders both templates', async function (assert) {
188-
// Visiting /posts activates posts + posts.index. Both
189-
// templates must resolve: posts.hbs (with {{outlet}}) and
190-
// posts/index.hbs (nested under a folder). Proves the
191-
// strict resolver handles both the parent and the nested
192-
// \`type:name.index\` -> \`type/name/index\` path.
193186
await visit('/posts');
194187
assert.strictEqual(currentURL(), '/posts');
195188
assert.dom('[data-test="posts"]').exists('parent template rendered');
@@ -203,9 +196,6 @@ strictAppScenarios
203196
});
204197
205198
test('dynamic nested child renders alongside its parent template', async function (assert) {
206-
// /posts/42 activates both posts (parent) and posts.show
207-
// (child). The parent template must still be present —
208-
// the child renders into its {{outlet}}.
209199
await visit('/posts/42');
210200
assert.strictEqual(currentURL(), '/posts/42');
211201
assert.dom('[data-test="posts"]').exists('parent template still rendered');
@@ -214,10 +204,6 @@ strictAppScenarios
214204
});
215205
216206
test('three-level nested route resolves every level', async function (assert) {
217-
// /posts/42/comments activates posts -> posts.show ->
218-
// posts.show.comments. Every template in the chain must
219-
// resolve, and the strict resolver must walk
220-
// template:posts.show.comments -> templates/posts/show/comments.
221207
await visit('/posts/42/comments');
222208
assert.strictEqual(currentURL(), '/posts/42/comments');
223209
assert.dom('[data-test="posts"]').exists('level 1: posts.hbs');

0 commit comments

Comments
 (0)