Skip to content

Commit 19d1837

Browse files
committed
add acceptance test for duplicate methods (#276)
1 parent fcafc8b commit 19d1837

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import moduleForAcceptance from 'ember-api-docs/tests/helpers/module-for-acceptance';
2+
import {test} from 'qunit';
3+
import { visit, click, findAll, findWithAssert } from 'ember-native-dom-helpers';
4+
import testSelector from 'ember-test-selectors';
5+
6+
moduleForAcceptance('Acceptance | method inheritance')
7+
8+
test('no duplicate methods displayed', async function (assert) {
9+
await visit('/ember-data/2.14/classes/DS.JSONAPIAdapter');
10+
assert.equal(findAll("[data-test-item='createRecord']").length, 1);
11+
});
12+
13+
test('most local inherited method is shown', async function (assert) {
14+
await visit('/ember-data/2.14/classes/DS.JSONAPIAdapter');
15+
await click(`${testSelector('item', 'createRecord')} a`)
16+
assert.ok(findWithAssert("[data-test-file='addon/adapters/rest.js']"));
17+
});

0 commit comments

Comments
 (0)