Skip to content

Commit

Permalink
fix: exercise 7 test fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mike-north committed Aug 29, 2018
1 parent ca48a37 commit caea16b
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions tests/acceptance/exercise7-test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { module, test } from 'qunit';
import { visit, currentURL } from '@ember/test-helpers';
import { visit, currentURL, findAll } from '@ember/test-helpers';
import { setupApplicationTest } from 'ember-qunit';
import require from 'require';

Expand All @@ -14,7 +14,7 @@ if (
await visit('/');

assert.equal(currentURL(), '/');
let $phoenixLink = find(
let $phoenixLink = findAll(
'ul a[href="/course/phoenix-fundamentals-f8c47eb"]'
);
assert.equal(
Expand All @@ -23,8 +23,8 @@ if (
'Link with href="/course/phoenix-fundamentals-f8c47eb" is present on the page'
);
assert.ok(
$phoenixLink
.text()
('' + $phoenixLink[0]
.textContent)
.trim()
.indexOf('Phoenix Fundamentals') >= 0,
'Phoenix Fundamentals is present in a link on the "/" page'
Expand All @@ -37,8 +37,8 @@ if (
'Link with href="/course/ember-basics-cf22ed3" is present on the page'
);
assert.ok(
$emberBasicsLink
.text()
($emberBasicsLink[0]
.textContent + '')
.trim()
.indexOf('Ember Basics') >= 0,
'Ember Basics is present in a link on the "/" page'
Expand All @@ -48,11 +48,11 @@ if (

assert.ok(find('h1').length > 0, 'At least one H1 on the page');
assert.ok(
find('h1.course-title').length > 0,
findAll('h1.course-title').length > 0,
'H1 has a class .course-title'
);
assert.equal(
find('h1.course-title').text(),
findAll('h1.course-title')[0].textContent,
'Ember Basics',
'Course title is rendered inside the h1.course-title'
);
Expand Down

0 comments on commit caea16b

Please sign in to comment.