mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-10 23:36:14 -05:00
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:
parent
feb59fa714
commit
f075221598
2 changed files with 18 additions and 2 deletions
|
@ -1,7 +1,6 @@
|
||||||
{{gh-tag-settings-form tag=tag
|
{{gh-tag-settings-form tag=tag
|
||||||
setProperty=(action "setProperty")
|
setProperty=(action "setProperty")
|
||||||
showDeleteTagModal=(action "toggleDeleteTagModal")
|
showDeleteTagModal=(action "toggleDeleteTagModal")}}
|
||||||
isMobile=isMobile}}
|
|
||||||
|
|
||||||
{{#if showDeleteTagModal}}
|
{{#if showDeleteTagModal}}
|
||||||
{{gh-fullscreen-modal "delete-tag"
|
{{gh-fullscreen-modal "delete-tag"
|
||||||
|
|
|
@ -15,6 +15,10 @@ let configStub = Ember.Service.extend({
|
||||||
blogUrl: 'http://localhost:2368'
|
blogUrl: 'http://localhost:2368'
|
||||||
});
|
});
|
||||||
|
|
||||||
|
let mediaQueriesStub = Ember.Service.extend({
|
||||||
|
maxWidth600: false
|
||||||
|
});
|
||||||
|
|
||||||
describeComponent(
|
describeComponent(
|
||||||
'gh-tag-settings-form',
|
'gh-tag-settings-form',
|
||||||
'Integration: Component: gh-tag-settings-form',
|
'Integration: Component: gh-tag-settings-form',
|
||||||
|
@ -44,6 +48,9 @@ describeComponent(
|
||||||
|
|
||||||
this.register('service:config', configStub);
|
this.register('service:config', configStub);
|
||||||
this.inject.service('config', {as: 'config'});
|
this.inject.service('config', {as: 'config'});
|
||||||
|
|
||||||
|
this.register('service:media-queries', mediaQueriesStub);
|
||||||
|
this.inject.service('media-queries', {as: 'mediaQueries'});
|
||||||
});
|
});
|
||||||
|
|
||||||
it('renders', function () {
|
it('renders', function () {
|
||||||
|
@ -301,5 +308,15 @@ describeComponent(
|
||||||
this.$('.tag-delete-button').click();
|
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);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
Loading…
Add table
Reference in a new issue