Merge pull request #17719 from edx/ai/EDUCATOR-2520-incorrect-message
Fix incorrect message feedback in discussion feature.
This commit is contained in:
@@ -414,6 +414,7 @@
|
||||
|
||||
DiscussionThreadListView.prototype.chooseFilter = function() {
|
||||
this.filter = $('.forum-nav-filter-main-control :selected').val();
|
||||
this.clearSearchAlerts();
|
||||
return this.retrieveFirstPage();
|
||||
};
|
||||
|
||||
|
||||
@@ -233,6 +233,19 @@
|
||||
});
|
||||
});
|
||||
|
||||
it('filter should clear search alert when alternate term was searched', function() {
|
||||
var filterval = 'unread';
|
||||
expectFilter(filterval);
|
||||
this.view.$('.forum-nav-filter-main-control').val(filterval);
|
||||
expect($('.search-alert .message').text())
|
||||
.toEqual('There are no posts in this topic yet.');
|
||||
|
||||
filterval = 'all';
|
||||
expectFilter(filterval);
|
||||
this.view.$('.forum-nav-filter-main-control').val(filterval).change();
|
||||
expect($('.search-alert .message').text()).toEqual('');
|
||||
});
|
||||
|
||||
describe('group selector', function() {
|
||||
it('should not be visible to students', function() {
|
||||
return expect(this.view.$('.forum-nav-filter-cohort-control:visible')).not.toExist();
|
||||
|
||||
Reference in New Issue
Block a user