Fix missing tags list link on mobile

closes #6397
- don't pass isMobile to gh-tag-settings-form
- add gh-tag-settings-form test for mobile settings.tags link
This commit is contained in:
Kevin P. Kucharczyk 2016-01-26 18:42:13 +01:00
parent 22234243df
commit bddc73031e
2 changed files with 18 additions and 2 deletions

View File

@ -1,7 +1,6 @@
{{gh-tag-settings-form tag=tag
setProperty=(action "setProperty")
showDeleteTagModal=(action "toggleDeleteTagModal")
isMobile=isMobile}}
showDeleteTagModal=(action "toggleDeleteTagModal")}}
{{#if showDeleteTagModal}}
{{gh-fullscreen-modal "delete-tag"

View File

@ -15,6 +15,10 @@ let configStub = Ember.Service.extend({
blogUrl: 'http://localhost:2368'
});
let mediaQueriesStub = Ember.Service.extend({
maxWidth600: false
});
describeComponent(
'gh-tag-settings-form',
'Integration: Component: gh-tag-settings-form',
@ -44,6 +48,9 @@ describeComponent(
this.register('service:config', configStub);
this.inject.service('config', {as: 'config'});
this.register('service:media-queries', mediaQueriesStub);
this.inject.service('media-queries', {as: 'mediaQueries'});
});
it('renders', function () {
@ -301,5 +308,15 @@ describeComponent(
this.$('.tag-delete-button').click();
});
});
it('shows settings.tags arrow link on mobile', function () {
this.set('mediaQueries.maxWidth600', true);
this.render(hbs`
{{gh-tag-settings-form tag=tag setProperty=(action 'setProperty')}}
`);
expect(this.$('.tag-settings-pane .settings-menu-header .settings-menu-header-action').length, 'settings.tags link is shown').to.equal(1);
});
}
);