Skip to content

Commit

Permalink
fix: title removed in tests
Browse files Browse the repository at this point in the history
Also fixes a deprecation in dummy app
  • Loading branch information
knownasilya committed Jun 6, 2020
1 parent 39571b3 commit b89ba58
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 18 deletions.
15 changes: 0 additions & 15 deletions tests/dummy/app/components/page-title-pane/component.js
Original file line number Diff line number Diff line change
@@ -1,25 +1,10 @@
import { A } from '@ember/array';
import Component from '@ember/component';
import { computed, set, get } from '@ember/object';
import PageTitleList from 'ember-page-title/services/page-title-list';

let TitleList = PageTitleList.extend({
_removeExistingTitleTag() {
return;
}
});


export default Component.extend({

tagName: '',

titleList: computed({
get() {
return TitleList.create();
}
}),

lastIndex: computed('titleList.tokens.length', {
get() {
return get(this, 'titleList.sortedTokens.length') - 1;
Expand Down
6 changes: 6 additions & 0 deletions tests/dummy/app/controllers/application.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import Controller from "@ember/controller";
import { inject as service } from "@ember/service";

export default Controller.extend({
router: service(),
});
7 changes: 7 additions & 0 deletions tests/dummy/app/services/page-title-list.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import PageTitleList from 'ember-page-title/services/page-title-list';

export default PageTitleList.extend({
_removeExistingTitleTag() {
return;
}
});
4 changes: 2 additions & 2 deletions tests/dummy/app/templates/application.hbs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{{! template-lint-disable simple-unless }}
{{head-layout}}
{{#unless (equals currentRouteName "index")}}
{{#unless (equals this.router.currentRouteName "index")}}
{{title "My App"}}
{{/unless}}
{{outlet}}
{{outlet}}
1 change: 0 additions & 1 deletion tests/index.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<!DOCTYPE html>
<html>
<head>
<title>ember-page-title tests</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="description" content="">
Expand Down

0 comments on commit b89ba58

Please sign in to comment.