-
-
Notifications
You must be signed in to change notification settings - Fork 115
/
Copy pathfunction-test.js
29 lines (24 loc) · 958 Bytes
/
function-test.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import { module, test } from 'qunit';
import { setupApplicationTest } from 'ember-qunit';
import { visit, find } from '@ember/test-helpers';
module('Acceptance | Function', function (hooks) {
setupApplicationTest(hooks);
test.skip('shows function when loaded from url', async function (assert) {
await visit('ember/2.18/functions/@ember%2Fapplication/getOwner');
assert.dom('.method').exists({ count: 1 }, 'Single function per page');
assert.equal(
find('.method .method-name').innerText,
'getOwner',
'Correct function is shown'
);
});
test('shows function when loaded from url in a more modern version', async function (assert) {
await visit('ember/3.28/functions/@ember%2Fapplication/getOwner');
assert.dom('.method').exists({ count: 1 }, 'Single function per page');
assert.equal(
find('.method .method-name').innerText,
'getOwner',
'Correct function is shown'
);
});
});