@@ -320,8 +320,8 @@ In the first test, we just want to verify the output of the component, so we jus
320320``` javascript {data-filename="tests/integration/components/rental-listing-test.js" data-diff="+3,+4"}
321321test (' should display rental details' , function (assert ) {
322322 await render (hbs` {{rental-listing rental=rental}}` );
323- assert .equal (this .$ (' .listing h3' ).text (), ' test-title' , ' Title: test-title' );
324- assert .equal (this .$ (' .listing .owner' ).text () .trim (), ' Owner: test-owner' , ' Owner: test-owner' );
323+ assert .equal (this .element . querySelector (' .listing h3' ).textContent . trim (), ' test-title' , ' Title: test-title' );
324+ assert .equal (this .element . querySelector (' .listing .owner' ).textContent .trim (), ' Owner: test-owner' , ' Owner: test-owner' );
325325});
326326```
327327
@@ -374,7 +374,7 @@ module('Integration | Component | rental listing', function (hooks) {
374374
375375 test (' should display rental details' , async function (assert ) {
376376 await render (hbs` {{rental-listing rental=rental}}` );
377- assert .equal (this .element .querySelector (' .listing h3' ).textContent , ' test-title' , ' Title: test-title' );
377+ assert .equal (this .element .querySelector (' .listing h3' ).textContent . trim () , ' test-title' , ' Title: test-title' );
378378 assert .equal (this .element .querySelector (' .listing .owner' ).textContent .trim (), ' Owner: test-owner' , ' Owner: test-owner' );
379379 });
380380
0 commit comments