Skip to content

Commit

Permalink
Merge branch 'master' into feature/use-es5-getters
Browse files Browse the repository at this point in the history
  • Loading branch information
kennethlarsen authored Aug 24, 2018
2 parents b8dcb5e + ca6e056 commit 6f16a4f
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
2 changes: 2 additions & 0 deletions app/services/maps.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import MapUtil from '../utils/google-maps';

export default Service.extend({
init() {
this._super(...arguments);

if (!this.cachedMaps) {
this.set('cachedMaps', EmberObject.create());
}
Expand Down
8 changes: 4 additions & 4 deletions app/templates/contact.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
<h2>Contact Us</h2>
<p>Super Rentals Representatives would love to help you<br>choose a destination or answer
any questions you may have.</p>
<p>
<address>
Super Rentals HQ
<address>
<p>
1212 Test Address Avenue<br>
Testington, OR 97233
</address>
</p>
<a href="tel:503.555.1212">+1 (503) 555-1212</a><br>
<a href="mailto:[email protected]">[email protected]</a>
</p>
</address>
{{#link-to 'about' class="button"}}
About
{{/link-to}}
Expand Down
7 changes: 3 additions & 4 deletions tests/acceptance/list-rentals-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,13 @@ module('Acceptance | list rentals', function(hooks) {
assert.equal(currentURL(), '/rentals', 'should redirect automatically');
});


test('should link to about page', async function(assert) {
test('should link to information about the company', async function(assert) {
await visit('/');
await click(".menu-about");
assert.equal(currentURL(), '/about', 'should navigate to about');
});

test('should link to contacts page', async function(assert) {
test('should link to contact information', async function(assert) {
await visit('/');
await click(".menu-contact");
assert.equal(currentURL(), '/contact', 'should navigate to contact');
Expand All @@ -51,7 +50,7 @@ module('Acceptance | list rentals', function(hooks) {
await visit('/');
await fillIn('.list-filter input', 'seattle');
await triggerKeyEvent('.list-filter input', 'keyup', 69);
assert.ok(this.element.querySelector('.results .listing'), 'should display 1 listing');
assert.ok(this.element.querySelectorAll('.results .listing').length, 1, 'should display 1 listing');
assert.ok(this.element.querySelector('.listing .location').textContent.includes('Seattle'), 'should contain 1 listing with location Seattle');
});

Expand Down
2 changes: 1 addition & 1 deletion tests/integration/components/rental-listing-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ module('Integration | Component | rental listing', function(hooks) {

test('should display rental details', async function(assert) {
await render(hbs`{{rental-listing rental=rental}}`);
assert.equal(this.element.querySelector('.listing h3').textContent, 'test-title', 'Title: test-title');
assert.equal(this.element.querySelector('.listing h3').textContent.trim(), 'test-title', 'Title: test-title');
assert.equal(this.element.querySelector('.listing .owner').textContent.trim(), 'Owner: test-owner', 'Owner: test-owner');
});

Expand Down

0 comments on commit 6f16a4f

Please sign in to comment.