-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
44 additions
and
2 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,43 @@ | ||
import { module, test } from 'qunit'; | ||
import { click, visit, currentURL } from '@ember/test-helpers'; | ||
import { setupApplicationTest } from 'super-rentals/tests/helpers'; | ||
|
||
module('Acceptance | super rentals', function (hooks) { | ||
setupApplicationTest(hooks); | ||
|
||
test('visiting /', async function (assert) { | ||
await visit('/'); | ||
|
||
assert.strictEqual(currentURL(), '/'); | ||
assert.dom('h2').hasText('Welcome to Super Rentals!'); | ||
|
||
assert.dom('.jumbo a.button').hasText('About Us'); | ||
await click('.jumbo a.button'); | ||
|
||
assert.strictEqual(currentURL(), '/about'); | ||
}); | ||
|
||
test('visiting /about', async function (assert) { | ||
await visit('/about'); | ||
|
||
assert.strictEqual(currentURL(), '/about'); | ||
assert.dom('h2').hasText('About Super Rentals'); | ||
|
||
assert.dom('.jumbo a.button').hasText('Contact Us'); | ||
await click('.jumbo a.button'); | ||
|
||
assert.strictEqual(currentURL(), '/getting-in-touch'); | ||
}); | ||
|
||
test('visiting /getting-in-touch', async function (assert) { | ||
await visit('/getting-in-touch'); | ||
|
||
assert.strictEqual(currentURL(), '/getting-in-touch'); | ||
assert.dom('h2').hasText('Contact Us'); | ||
|
||
assert.dom('.jumbo a.button').hasText('About'); | ||
await click('.jumbo a.button'); | ||
|
||
assert.strictEqual(currentURL(), '/about'); | ||
}); | ||
}); |