Skip to content

Commit

Permalink
add a test to cover addon templates
Browse files Browse the repository at this point in the history
  • Loading branch information
mansona committed Sep 8, 2022
1 parent d5aa14b commit a8eebbe
Show file tree
Hide file tree
Showing 5 changed files with 2,345 additions and 251 deletions.
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@
"ember-resolver": "^8.0.2",
"ember-source": "~3.28.0",
"ember-source-channel-url": "^3.0.0",
"ember-styleguide": "^5.0.0",
"ember-template-lint": "^3.6.0",
"ember-try": "^1.4.0",
"eslint": "^7.32.0",
Expand Down Expand Up @@ -109,6 +110,9 @@
"main": "lib/ember-addon-main.js",
"configPath": "tests/dummy/config"
},
"resolutions": {
"ember-cli-htmlbars": "link:."
},
"release-it": {
"plugins": {
"release-it-lerna-changelog": {
Expand Down
15 changes: 15 additions & 0 deletions tests/acceptance/styleguide-test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { module, test } from 'qunit';
import { visit, currentURL } from '@ember/test-helpers';
import { setupApplicationTest } from 'ember-qunit';

module('Acceptance | styleguide', function (hooks) {
setupApplicationTest(hooks);

test('visiting /styleguide', async function (assert) {
await visit('/styleguide');

assert.equal(currentURL(), '/styleguide');

assert.dom('[data-test-es-note-heading]').containsText('says...');
});
});
4 changes: 3 additions & 1 deletion tests/dummy/app/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ const Router = EmberRouter.extend({
rootURL: config.rootURL,
});

Router.map(function () {});
Router.map(function () {
this.route('styleguide');
});

export default Router;
1 change: 1 addition & 0 deletions tests/dummy/app/templates/styleguide.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<EsNote>You should try out this cool note component</EsNote>
Loading

0 comments on commit a8eebbe

Please sign in to comment.