diff --git a/tests/acceptance/exercise7-test.js b/tests/acceptance/exercise7-test.js index 9e5f1c0d..a90a0189 100644 --- a/tests/acceptance/exercise7-test.js +++ b/tests/acceptance/exercise7-test.js @@ -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'; @@ -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( @@ -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' @@ -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' @@ -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' );