From 727238ac0dff56544e5699de7cb58e7aea0b893a Mon Sep 17 00:00:00 2001 From: Jonathan Johnson Date: Mon, 13 Jun 2016 18:56:10 -0700 Subject: [PATCH] Update tests for new specific action classes --- .../course/learningmaterials-test.js | 20 +++++++++---------- .../acceptance/course/objectivecreate-test.js | 4 ++-- .../course/session/learningmaterials-test.js | 20 +++++++++---------- .../course/session/objectivecreate-test.js | 4 ++-- 4 files changed, 24 insertions(+), 24 deletions(-) diff --git a/tests/acceptance/course/learningmaterials-test.js b/tests/acceptance/course/learningmaterials-test.js index e7103e153d..85dda022ed 100644 --- a/tests/acceptance/course/learningmaterials-test.js +++ b/tests/acceptance/course/learningmaterials-test.js @@ -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(){ @@ -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(){ @@ -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(){ @@ -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'; @@ -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'); diff --git a/tests/acceptance/course/objectivecreate-test.js b/tests/acceptance/course/objectivecreate-test.js index f3645e1007..c2f4a86ebd 100644 --- a/tests/acceptance/course/objectivecreate-test.js +++ b/tests/acceptance/course/objectivecreate-test.js @@ -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); @@ -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(){ diff --git a/tests/acceptance/course/session/learningmaterials-test.js b/tests/acceptance/course/session/learningmaterials-test.js index 37024285d6..7422a14314 100644 --- a/tests/acceptance/course/session/learningmaterials-test.js +++ b/tests/acceptance/course/session/learningmaterials-test.js @@ -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(){ @@ -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(){ @@ -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(){ @@ -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'; @@ -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'); diff --git a/tests/acceptance/course/session/objectivecreate-test.js b/tests/acceptance/course/session/objectivecreate-test.js index 5418e073c7..0eb2d69ac7 100644 --- a/tests/acceptance/course/session/objectivecreate-test.js +++ b/tests/acceptance/course/session/objectivecreate-test.js @@ -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); @@ -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(){