diff --git a/tests/acceptance/remember-stuff-test.js b/tests/acceptance/remember-stuff-test.js index 0480eaa..601e929 100644 --- a/tests/acceptance/remember-stuff-test.js +++ b/tests/acceptance/remember-stuff-test.js @@ -25,7 +25,7 @@ module('Acceptance | remember stuff', function (hooks) { assert.strictEqual(currentURL(), '/about'); assert.dom('nav').exists(); assert.dom('h1').hasText('RemEmber Stuff'); - assert.dom('h2').hasText('About'); + assert.dom('h2').hasText('About the Site'); assert.dom('p').hasText('RemEmber Stuff is a web application I built to learn about EmberJS.'); await click('nav a h1'); @@ -33,6 +33,20 @@ module('Acceptance | remember stuff', function (hooks) { assert.strictEqual(currentURL(), '/'); }); + test('visiting /messages', async function (assert) { + await visit('/messages'); + + assert.strictEqual(currentURL(), '/messages'); + assert.dom('nav').exists(); + assert.dom('h1').hasText('RemEmber Stuff'); + assert.dom('h2').hasText('Chat Messages'); + assert.dom('div.messages').exists(); + + await click('nav a h1'); + + assert.strictEqual(currentURL(), '/'); + }); + test('visiting /links', async function (assert) { await visit('/links'); diff --git a/tests/integration/components/contact-form-test.js b/tests/integration/components/contact-form-test.js index 5b44456..12e3192 100644 --- a/tests/integration/components/contact-form-test.js +++ b/tests/integration/components/contact-form-test.js @@ -1,15 +1,23 @@ import { module, test } from 'qunit'; +import { setupIntl, setLocale } from 'ember-intl/test-support'; import { setupRenderingTest } from 'remember-stuff/tests/helpers'; import { render } from '@ember/test-helpers'; import { hbs } from 'ember-cli-htmlbars'; module('Integration | Component | contact-form', function (hooks) { setupRenderingTest(hooks); + setupIntl(hooks); + + hooks.afterEach(() => { + setLocale('en-us'); + }); test('it renders', async function (assert) { await render(hbs``); - assert.dom('p').hasText('Want to say hello? Have a suggestion for this app? Drop me a line.'); assert.dom('.contact-form').exists(); + assert + .dom('.contact-form p') + .hasText('Want to say hello? Have a suggestion for this app? Drop me a line.'); }); }); diff --git a/translations/en-us.yaml b/translations/en-us.yaml index 3b54fa1..21d88cb 100644 --- a/translations/en-us.yaml +++ b/translations/en-us.yaml @@ -102,7 +102,7 @@ layout: navLinks: Links navMessages: Messages navMusic: Music - headAbout: About The Site + headAbout: About the Site headContact: Contact headLinks: Related Links headMessages: Chat Messages