Skip to content

Commit

Permalink
fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelchadwick committed Oct 8, 2024
1 parent 07f4a39 commit 7d15561
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/frontend/app/components/layout/footer.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
<div class="links">
{{#each this.links as |link|}}
{{#if link.route}}
<LinkTo @route={{link.route}} target={{link.target}}>
<LinkTo @route={{link.route}} class="menu-{{link.class}}" target={{link.target}}>
<FaIcon @icon={{link.icon}} @prefix={{link.iconType}} />{{link.title}}
</LinkTo>
{{else}}
<a href={{link.url}} class="menu-{{link.title}}" target={{link.target}}>
<a href={{link.url}} class="menu-{{link.class}}" target={{link.target}}>
<FaIcon @icon={{link.icon}} @prefix={{link.iconType}} />{{link.title}}
</a>
{{/if}}
Expand Down
6 changes: 6 additions & 0 deletions packages/frontend/app/components/layout/footer.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export default class FooterComponent extends Component {
url: 'https://michaelchadwick.info',
icon: 'at',
title: this.intl.t('layout.footAuthor'),
class: this.intl.t('layout.footAuthor').toLowerCase(),
});

links.push({
Expand All @@ -26,13 +27,15 @@ export default class FooterComponent extends Component {
icon: 'github',
iconType: 'fab',
title: this.intl.t('layout.footSource'),
class: this.intl.t('layout.footSource').toLowerCase(),
});

links.push({
...this.defaultLink,
url: 'https://guides.emberjs.com/release/components/',
icon: 'book',
title: this.intl.t('layout.footDocs'),
class: this.intl.t('layout.footDocs').toLowerCase(),
});

if (ENV.environment != 'production') {
Expand All @@ -42,6 +45,7 @@ export default class FooterComponent extends Component {
icon: 'bug',
target: '_self',
title: `{${this.intl.t('layout.footDebuggery')}}`,
class: this.intl.t('layout.footDebuggery').toLowerCase(),
});

links.push({
Expand All @@ -50,13 +54,15 @@ export default class FooterComponent extends Component {
route: 'tests',
icon: 'flask',
title: `[${this.intl.t('layout.footTests')}]`,
class: this.intl.t('layout.footTests').toLowerCase(),
});

links.push({
...this.defaultLink,
url: 'https://mc-emberjs-remember-stuff.netlify.app',
icon: 'square-up-right',
title: `[${this.intl.t('layout.footProd')}]`,
class: this.intl.t('layout.footProd').toLowerCase(),
});
}

Expand Down
3 changes: 2 additions & 1 deletion packages/frontend/tests/acceptance/remember-stuff-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,10 @@ module('Acceptance | remember stuff', function (hooks) {
assert.dom('footer').exists();
assert.dom('footer a.menu-author').hasText('Author');
assert.dom('footer a.menu-source').hasText('Source');
assert.dom('footer a.menu-tutorial').hasText('Docs');
assert.dom('footer a.menu-docs').hasText('Docs');

if (ENV.environment != 'production') {
assert.dom('footer a.menu-debuggery').hasText('{Debuggery}');
assert.dom('footer a.menu-tests').hasText('[Tests]');
assert.dom('footer a.menu-prod').hasText('[Prod]');
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module('Integration | Component | random-text', function (hooks) {
await render(hbs`<RandomText />`);

assert.dom('.random-text').exists();
assert.dom('.random-text h2').exists();
assert.dom('.random-text h3').exists();

// TODO
// assert.dom('.random-text > p').exists({ count: 3 });
Expand Down

0 comments on commit 7d15561

Please sign in to comment.