Skip to content

Commit 5bec342

Browse files
committed
Switch to ember-cli-fastboot-testing
Closes #74
1 parent 7add29c commit 5bec342

7 files changed

Lines changed: 157 additions & 718 deletions

File tree

.github/workflows/build.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ jobs:
2222
- default
2323
- default-with-lockfile
2424
- default-with-jquery
25-
- default-with-fastboot
2625
- release
2726
- beta
2827
- canary
@@ -52,13 +51,8 @@ jobs:
5251
- name: Lint (js)
5352
run: yarn lint:js
5453
- name: Build
55-
if: matrix.scenario != 'default-with-fastboot'
5654
run: yarn ember build --environment test
5755
- name: Run test
58-
if: matrix.scenario == 'default-with-fastboot'
59-
run: yarn test:fastboot
60-
- name: Run test
61-
if: matrix.scenario != 'default-with-fastboot'
6256
# Due to a bug in ember-cli, running `ember test` with `--path` doesn't set `EMBER_ENV=test`
6357
# See https://github.com/ember-cli/ember-cli/issues/8922
6458
run: EMBER_ENV=test yarn test --path dist

config/ember-try.js

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -99,13 +99,6 @@ module.exports = async function() {
9999
}
100100
}
101101
},
102-
{
103-
name: 'ember-default-with-fastboot',
104-
command: 'ember fastboot:test',
105-
npm: {
106-
devDependencies: {}
107-
}
108-
},
109102
{
110103
name: 'ember-classic',
111104
env: {

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
"lint:js": "eslint .",
2020
"start": "ember serve",
2121
"test": "ember test",
22-
"test:fastboot": "ember fastboot:test",
2322
"test:all": "ember try:each"
2423
},
2524
"keywords": [
@@ -43,13 +42,13 @@
4342
"ember-cli-dependency-checker": "^3.2.0",
4443
"ember-cli-eslint": "^5.1.0",
4544
"ember-cli-fastboot": "^2.0.0",
45+
"ember-cli-fastboot-testing": "^0.3.0",
4646
"ember-cli-inject-live-reload": "^2.0.2",
4747
"ember-cli-sri": "^2.1.1",
4848
"ember-cli-template-lint": "^1.0.0-beta.3",
4949
"ember-cli-uglify": "^3.0.0",
5050
"ember-disable-prototype-extensions": "^1.1.3",
5151
"ember-export-application-global": "^2.0.1",
52-
"ember-fastboot-addon-tests": "^0.4.0",
5352
"ember-load-initializers": "^2.1.1",
5453
"ember-maybe-import-regenerator": "^0.1.6",
5554
"ember-qunit": "^4.6.0",

fastboot-tests/fixtures/fastboot/app/templates/index.hbs renamed to tests/dummy/app/templates/index.hbs

File renamed without changes.

fastboot-tests/fixtures/fastboot/app/templates/other-page.hbs renamed to tests/dummy/app/templates/other-page.hbs

File renamed without changes.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import { module, test } from 'qunit';
2+
import { setup, visit, /* mockServer */ } from 'ember-cli-fastboot-testing/test-support';
3+
4+
module('FastBoot | head component', function(hooks) {
5+
setup(hooks);
6+
7+
test('has head-data service content', async function(assert) {
8+
let res = await visit('/');
9+
10+
assert.dom('h1').hasText('Hello page');
11+
assert.dom('head meta[property="og:title"]', res.htmlDocument).hasAttribute('content', 'Hello page');
12+
13+
res = await visit('/other-page');
14+
15+
assert.dom('h1').hasText('Other page');
16+
assert.dom('head meta[property="og:title"]', res.htmlDocument).hasAttribute('content', 'Other page');
17+
});
18+
});

0 commit comments

Comments
 (0)