UX: Display wiki icon on post edits indicator.

This commit is contained in:
Guo Xiang Tan
2017-01-16 15:54:51 +08:00
parent ed5fa20b0c
commit 17da0bd11f
8 changed files with 25 additions and 47 deletions

View File

@ -17,15 +17,15 @@ widgetTest('basic elements', {
});
widgetTest('wiki', {
template: '{{mount-widget widget="post" args=args editPost="editPost"}}',
template: '{{mount-widget widget="post" args=args showHistory="showHistory"}}',
setup() {
this.set('args', { wiki: true });
this.on('editPost', () => this.editPostCalled = true);
this.set('args', { wiki: true, version: 2, canViewEditHistory: true });
this.on('showHistory', () => this.historyShown = true);
},
test(assert) {
click('.post-info.wiki');
click('.post-info .wiki');
andThen(() => {
assert.ok(this.editPostCalled, 'clicking the wiki icon edits the post');
assert.ok(this.historyShown, 'clicking the wiki icon displays the post history');
});
}
});