Skip to content

Commit a8eebbe

Browse files
committed
add a test to cover addon templates
1 parent d5aa14b commit a8eebbe

File tree

5 files changed

+2345
-251
lines changed

5 files changed

+2345
-251
lines changed

package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@
7979
"ember-resolver": "^8.0.2",
8080
"ember-source": "~3.28.0",
8181
"ember-source-channel-url": "^3.0.0",
82+
"ember-styleguide": "^5.0.0",
8283
"ember-template-lint": "^3.6.0",
8384
"ember-try": "^1.4.0",
8485
"eslint": "^7.32.0",
@@ -109,6 +110,9 @@
109110
"main": "lib/ember-addon-main.js",
110111
"configPath": "tests/dummy/config"
111112
},
113+
"resolutions": {
114+
"ember-cli-htmlbars": "link:."
115+
},
112116
"release-it": {
113117
"plugins": {
114118
"release-it-lerna-changelog": {
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import { module, test } from 'qunit';
2+
import { visit, currentURL } from '@ember/test-helpers';
3+
import { setupApplicationTest } from 'ember-qunit';
4+
5+
module('Acceptance | styleguide', function (hooks) {
6+
setupApplicationTest(hooks);
7+
8+
test('visiting /styleguide', async function (assert) {
9+
await visit('/styleguide');
10+
11+
assert.equal(currentURL(), '/styleguide');
12+
13+
assert.dom('[data-test-es-note-heading]').containsText('says...');
14+
});
15+
});

tests/dummy/app/router.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ const Router = EmberRouter.extend({
66
rootURL: config.rootURL,
77
});
88

9-
Router.map(function () {});
9+
Router.map(function () {
10+
this.route('styleguide');
11+
});
1012

1113
export default Router;
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<EsNote>You should try out this cool note component</EsNote>

0 commit comments

Comments
 (0)