mirror of
https://github.com/discourse/discourse.git
synced 2025-05-23 18:01:09 +08:00
UX: Display wiki icon on post edits indicator.
This commit is contained in:
@ -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');
|
||||
});
|
||||
}
|
||||
});
|
||||
|
Reference in New Issue
Block a user