Bok choy test for editing of content groups on Group Configuration page.

This commit is contained in:
cahrens
2015-01-08 13:58:18 -05:00
committed by Andy Armstrong
parent ebeb9a9948
commit 66375b8541
7 changed files with 238 additions and 59 deletions

View File

@@ -52,7 +52,7 @@ define([
expect(view.$('.ui-loading')).toBeVisible();
view.render();
expect(view.$(groupConfigItemClassName)).toExist();
expect(view.$('.cohort-groups .no-group-configurations-content')).toExist();
expect(view.$('.content-groups .no-group-configurations-content')).toExist();
expect(view.$('.ui-loading')).toHaveClass('is-hidden');
});
});

View File

@@ -25,6 +25,16 @@ define([
this.listenTo(this.model, 'remove', this.remove);
},
className: function () {
var index = this.model.collection.indexOf(this.model);
return [
'group-configuration',
'group-configurations-list-item',
'group-configurations-list-item-' + index
].join(' ');
},
deleteItem: function(event) {
if (event && event.preventDefault) { event.preventDefault(); }
if (!this.canDelete) { return; }

View File

@@ -23,9 +23,9 @@ function ($, _, gettext, BasePage, GroupConfigurationsListView, ContentGroupList
renderPage: function() {
var hash = this.getLocationHash();
if (this.experimentsEnabled) {
this.$('.experiment-groups').append(this.experimentGroupsListView.render().el);
this.$('.wrapper-groups.experiment-groups').append(this.experimentGroupsListView.render().el);
}
this.$('.cohort-groups').append(this.cohortGroupsListView.render().el);
this.$('.wrapper-groups.content-groups').append(this.cohortGroupsListView.render().el);
this.addWindowActions();
if (hash) {
// Strip leading '#' to get id string to match