Skip to content

Commit

Permalink
Add Fastboot testing
Browse files Browse the repository at this point in the history
  • Loading branch information
nickschot committed Feb 16, 2024
1 parent 39cf393 commit f360a28
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 3 deletions.
12 changes: 9 additions & 3 deletions test-app/app/templates/application.hbs
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
{{page-title "ember-mobile-menu test-app"}}

{{outlet}}
<MobileMenuWrapper as |mmw|>
<mmw.MobileMenu data-test-menu as |mm|>
<LinkTo @route="index" {{on "click" mm.actions.close}}>Home</LinkTo>
</mmw.MobileMenu>
<mmw.Content>
<mmw.Toggle data-test-menu-toggle>Toggle menu</mmw.Toggle>
{{outlet}}
</mmw.Content>
</MobileMenuWrapper>
2 changes: 2 additions & 0 deletions test-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@
"ember-cli-babel": "8.2.0",
"ember-cli-clean-css": "3.0.0",
"ember-cli-dependency-checker": "3.3.2",
"ember-cli-fastboot": "^4.1.2",
"ember-cli-fastboot-testing": "^0.6.1",
"ember-cli-htmlbars": "6.3.0",
"ember-cli-inject-live-reload": "2.1.0",
"ember-cli-sass": "11.0.1",
Expand Down
17 changes: 17 additions & 0 deletions test-app/tests/fastboot/index-test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { module, test } from 'qunit';
import {
setup,
visit /* mockServer */,
} from 'ember-cli-fastboot-testing/test-support';

module('FastBoot | index', function (hooks) {
setup(hooks);

test('it renders a page...', async function (assert) {
await visit('/');

// smoke test
assert.dom('[data-test-menu]').exists();
assert.dom('[data-test-menu-toggle]').exists();
});
});

0 comments on commit f360a28

Please sign in to comment.