@@ -320,8 +320,8 @@ In the first test, we just want to verify the output of the component, so we jus
320
320
``` javascript {data-filename="tests/integration/components/rental-listing-test.js" data-diff="+3,+4"}
321
321
test (' should display rental details' , function (assert ) {
322
322
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' );
325
325
});
326
326
```
327
327
@@ -374,7 +374,7 @@ module('Integration | Component | rental listing', function (hooks) {
374
374
375
375
test (' should display rental details' , async function (assert ) {
376
376
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' );
378
378
assert .equal (this .element .querySelector (' .listing .owner' ).textContent .trim (), ' Owner: test-owner' , ' Owner: test-owner' );
379
379
});
380
380
0 commit comments