-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
there is a custom build flow to make the addon-test-support importable from the root of the package. This seems to be a bit more complicated to maintain then it could have been. Maybe exploring the Emberoider land could help us to simplify here.
- Loading branch information
Showing
3 changed files
with
76 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import { module, test } from 'qunit'; | ||
import require from 'require'; | ||
import Rfc268Adapter from 'ember-cli-page-object/adapters/rfc268'; | ||
import { setAdapter } from 'ember-cli-page-object/adapters'; | ||
import { create, value, visitable } from 'ember-cli-page-object'; | ||
|
||
if (require.has('@ember/test-helpers')) { | ||
// intentionally not using our local extension in order to make | ||
// sure, RFC268 works by default, w/o Adapter being set. | ||
const { setupApplicationTest } = require('ember-qunit'); | ||
|
||
module('Acceptance | rfc268', function(hooks) { | ||
setupApplicationTest(hooks); | ||
|
||
hooks.beforeEach(function() { | ||
setAdapter(new Rfc268Adapter); | ||
}) | ||
|
||
hooks.afterEach(function() { | ||
setAdapter(null); | ||
}) | ||
|
||
let page = create({ | ||
visit: visitable('/calculator'), | ||
screen: value('.screen input'), | ||
}); | ||
|
||
test('it works', async function(assert) { | ||
await page.visit(); | ||
|
||
assert.equal(page.screen, ''); | ||
}); | ||
}); | ||
} |