Merge pull request #17719 from edx/ai/EDUCATOR-2520-incorrect-message

Fix incorrect message feedback in discussion feature.
This commit is contained in:
Attiya Ishaque
2018-03-21 17:24:22 +05:00
committed by GitHub
2 changed files with 14 additions and 0 deletions

View File

@@ -414,6 +414,7 @@
DiscussionThreadListView.prototype.chooseFilter = function() {
this.filter = $('.forum-nav-filter-main-control :selected').val();
this.clearSearchAlerts();
return this.retrieveFirstPage();
};

View File

@@ -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();