Skip to content

Commit 5e7eeda

Browse files
committed
Add a smoke test so we can test the full e2e
1 parent 427b392 commit 5e7eeda

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

smoke-tests/scenarios/basic-test.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,29 @@ function basicTest(scenarios: Scenarios, appName: string) {
223223
224224
});
225225
`,
226+
'debug-render-tree-test.gjs': `
227+
import { module, test } from 'qunit';
228+
import { setupRenderingTest } from 'ember-qunit';
229+
import { render } from '@ember/test-helpers';
230+
import { captureRenderTree } from '@ember/debug';
231+
import Component from '@glimmer/component';
232+
233+
class HelloWorld extends Component {
234+
<template>{{@arg}}</template>
235+
}
236+
237+
module('Integration | captureRenderTree', function (hooks) {
238+
setupRenderingTest(hooks);
239+
240+
test('scope-based components have correct names in debugRenderTree', async function (assert) {
241+
await render(<template><HelloWorld @arg="first" /></template>);
242+
243+
let tree = captureRenderTree(this.owner);
244+
let names = tree.filter(n => n.type === 'component').map(n => n.name);
245+
assert.true(names.includes('HelloWorld'), 'HelloWorld component name is preserved in the render tree (found: ' + names.join(', ') + ')');
246+
});
247+
});
248+
`,
226249
},
227250
},
228251
});

0 commit comments

Comments
 (0)