Skip to content

Commit

Permalink
Update tests for new specific action classes
Browse files Browse the repository at this point in the history
  • Loading branch information
jrjohnson committed Jun 14, 2016
1 parent 27c24dd commit 727238a
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 24 deletions.
20 changes: 10 additions & 10 deletions tests/acceptance/course/learningmaterials-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,9 @@ test('list learning materials', function(assert) {
//
// assert.ok(isPresent(find(searchBox)), 'learner-group search box is visible');
// assert.equal(rows.length, fixtures.course.learningMaterials.length);
// click('.actions .button', container).then(function(){
// click('.detail-learningmaterials-actions .button', container).then(function(){
// //pick the file type
// click('.actions ul li:eq(0)');
// click('.detail-learningmaterials-actions ul li:eq(0)');
// });
// });
// andThen(function(){
Expand Down Expand Up @@ -218,9 +218,9 @@ test('create new link learning material', function(assert) {

assert.ok(isPresent(find(searchBox)), 'learner-group search box is visible');
assert.equal(rows.length, fixtures.course.learningMaterials.length);
click('.actions .button', container).then(function(){
click('.detail-learningmaterials-actions .button', container).then(function(){
//pick the link type
click('.actions ul li:eq(1)');
click('.detail-learningmaterials-actions ul li:eq(1)');
});
});
andThen(function(){
Expand Down Expand Up @@ -268,9 +268,9 @@ test('create new citation learning material', function(assert) {

assert.ok(isPresent(find(searchBox)), 'learner-group search box is visible');
assert.equal(rows.length, fixtures.course.learningMaterials.length);
click('.actions .button', container).then(function(){
click('.detail-learningmaterials-actions .button', container).then(function(){
//pick the citation type
click('.actions ul li:eq(2)');
click('.detail-learningmaterials-actions ul li:eq(2)');
});
});
andThen(function(){
Expand Down Expand Up @@ -304,8 +304,8 @@ test('create new citation learning material', function(assert) {
});

test('can only add one learning-material at a time', function(assert) {
const addButton = '.actions .button';
const fileButton = '.actions ul li:eq(0)';
const addButton = '.detail-learningmaterials-actions .button';
const fileButton = '.detail-learningmaterials-actions ul li:eq(0)';
const collapseButton = '.collapse-button';
const component = '.new-learning-material';

Expand All @@ -332,8 +332,8 @@ test('cancel new learning material', function(assert) {
let container = find('.detail-learningmaterials');
let rows = find('.detail-learningmaterials-content tbody tr', container);
assert.equal(rows.length, fixtures.course.learningMaterials.length);
click('.actions .button', container);
click('.actions ul li:eq(0)');
click('.detail-learningmaterials-actions .button', container);
click('.detail-learningmaterials-actions ul li:eq(0)');
});
andThen(function(){
click('.detail-learningmaterials .new-learning-material .cancel');
Expand Down
4 changes: 2 additions & 2 deletions tests/acceptance/course/objectivecreate-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ test('save new objective', function(assert) {
andThen(function() {
let objectiveRows = find('.detail-objectives .course-objective-list tbody tr');
assert.equal(objectiveRows.length, fixtures.course.objectives.length);
click('.detail-objectives .actions button');
click('.detail-objectives .detail-objectives-actions button');
//wait for the editor to load
Ember.run.later(()=>{
find('.detail-objectives .newobjective .froalaEditor').froalaEditor('html.set', newObjectiveTitle);
Expand Down Expand Up @@ -71,7 +71,7 @@ test('cancel new objective', function(assert) {
andThen(function() {
let objectiveRows = find('.detail-objectives .course-objective-list tbody tr');
assert.equal(objectiveRows.length, fixtures.course.objectives.length);
click('.detail-objectives .actions button');
click('.detail-objectives .detail-objectives-actions button');
click('.detail-objectives .newobjective button.cancel');
});
andThen(function(){
Expand Down
20 changes: 10 additions & 10 deletions tests/acceptance/course/session/learningmaterials-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,9 +176,9 @@ test('list learning materials', function(assert) {
//
// assert.ok(isPresent(find(searchBox)), 'learner-group search box is visible');
// assert.equal(rows.length, fixtures.session.learningMaterials.length);
// click('.actions .button', container).then(function(){
// click('.detail-learningmaterials-actions .button', container).then(function(){
// //pick the file type
// click('.actions ul li:eq(0)');
// click('.detail-learningmaterials-actions ul li:eq(0)');
// });
// });
// andThen(function(){
Expand Down Expand Up @@ -225,9 +225,9 @@ test('create new link learning material', function(assert) {

assert.ok(isPresent(find(searchBox)), 'learner-group search box is visible');
assert.equal(rows.length, fixtures.session.learningMaterials.length);
click('.actions .button', container).then(function(){
click('.detail-learningmaterials-actions .button', container).then(function(){
//pick the link type
click('.actions ul li:eq(1)');
click('.detail-learningmaterials-actions ul li:eq(1)');
});
});
andThen(function(){
Expand Down Expand Up @@ -274,9 +274,9 @@ test('create new citation learning material', function(assert) {

assert.ok(isPresent(find(searchBox)), 'learner-group search box is visible');
assert.equal(rows.length, fixtures.session.learningMaterials.length);
click('.actions .button', container).then(function(){
click('.detail-learningmaterials-actions .button', container).then(function(){
//pick the citation type
click('.actions ul li:eq(2)');
click('.detail-learningmaterials-actions ul li:eq(2)');
});
});
andThen(function(){
Expand Down Expand Up @@ -310,8 +310,8 @@ test('create new citation learning material', function(assert) {
});

test('can only add one learning-material at a time', function(assert) {
const addButton = '.actions .button';
const fileButton = '.actions ul li:eq(0)';
const addButton = '.detail-learningmaterials-actions .button';
const fileButton = '.detail-learningmaterials-actions ul li:eq(0)';
const collapseButton = '.collapse-button';
const component = '.new-learning-material';

Expand All @@ -338,8 +338,8 @@ test('cancel new learning material', function(assert) {
let container = find('.detail-learningmaterials');
let rows = find('.detail-learningmaterials-content tbody tr', container);
assert.equal(rows.length, fixtures.session.learningMaterials.length);
click('.actions .button', container);
click('.actions ul li:eq(0)');
click('.detail-learningmaterials-actions .button', container);
click('.detail-learningmaterials-actions ul li:eq(0)');
});
andThen(function(){
click('.detail-learningmaterials .new-learning-material .cancel');
Expand Down
4 changes: 2 additions & 2 deletions tests/acceptance/course/session/objectivecreate-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ test('save new objective', function(assert) {
andThen(function() {
let objectiveRows = find('.detail-objectives .session-objective-list tbody tr');
assert.equal(objectiveRows.length, fixtures.session.objectives.length);
click('.detail-objectives .actions button');
click('.detail-objectives .detail-objectives-actions button');
//wait for the editor to load
Ember.run.later(()=>{
find('.detail-objectives .newobjective .froalaEditor').froalaEditor('html.set', newObjectiveTitle);
Expand Down Expand Up @@ -68,7 +68,7 @@ test('cancel new objective', function(assert) {
andThen(function() {
let objectiveRows = find('.detail-objectives .session-objective-list tbody tr');
assert.equal(objectiveRows.length, fixtures.session.objectives.length);
click('.detail-objectives .actions button');
click('.detail-objectives .detail-objectives-actions button');
click('.detail-objectives .newobjective button.cancel');
});
andThen(function(){
Expand Down

0 comments on commit 727238a

Please sign in to comment.