Skip to content

Commit 7c4d335

Browse files
sdahlbaclocks
authored andcommitted
add a test
1 parent 2dfed6f commit 7c4d335

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

tests/integration/components/class-field-description-test.js

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import EmberObject from '@ember/object';
22
import { module, test } from 'qunit';
33
import { setupRenderingTest } from 'ember-qunit';
4-
import { render, click, findAll, triggerEvent } from '@ember/test-helpers';
4+
import { render, click, findAll, find, triggerEvent } from '@ember/test-helpers';
55
import hbs from 'htmlbars-inline-precompile';
66

77
module('Integration | Component | class field description', function (hooks) {
@@ -74,4 +74,23 @@ module('Integration | Component | class field description', function (hooks) {
7474

7575
assert.verifySteps(['updateAnchorAction']);
7676
});
77+
78+
test('parameter props are displayed', async function (assert) {
79+
this.set('type', 'method');
80+
this.set(
81+
'field',
82+
EmberObject.create({
83+
access: 'public',
84+
deprecated: true,
85+
name: 'concat',
86+
description: 'concatenates',
87+
params: [{ name: 'param1' }, { name: 'param2' }, { name: 'options', props: [ { name: 'prop1' }, { name: 'prop2' }] }],
88+
})
89+
);
90+
91+
await render(hbs`{{class-field-description type=type field=field}}`);
92+
93+
assert.dom(find('.prop:nth-child(1) dt')).hasText('prop1');
94+
assert.dom(find('.prop:nth-child(2) dt')).hasText('prop2');
95+
});
7796
});

0 commit comments

Comments
 (0)