From 6852d6ce2717241c98a1b192e21aa611da9b2398 Mon Sep 17 00:00:00 2001 From: jelhan Date: Fri, 26 Aug 2016 18:29:02 +0200 Subject: [PATCH] more suitable page object action for save --- tests/acceptance/create-a-poll-test.js | 16 ++++++++-------- tests/integration/create-a-poll-test.js | 2 +- tests/pages/create/settings.js | 1 + 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/tests/acceptance/create-a-poll-test.js b/tests/acceptance/create-a-poll-test.js index 6f5a86e..e029029 100644 --- a/tests/acceptance/create-a-poll-test.js +++ b/tests/acceptance/create-a-poll-test.js @@ -178,7 +178,7 @@ test('create a default poll', function(assert) { ); pageCreateSettings - .next(); + .save(); andThen(function() { assert.equal(currentPath(), 'poll.participation'); @@ -368,7 +368,7 @@ test('create a poll for answering a question', function(assert) { ); pageCreateSettings - .next(); + .save(); andThen(function() { assert.equal(currentPath(), 'poll.participation'); @@ -462,7 +462,7 @@ test('create a poll with times and description', function(assert) { assert.equal(currentPath(), 'create.settings'); pageCreateSettings - .next(); + .save(); andThen(function() { assert.equal(currentPath(), 'poll.participation'); @@ -553,7 +553,7 @@ test('create a poll with only one day and multiple times', function(assert) { assert.equal(currentPath(), 'create.settings'); pageCreateSettings - .next(); + .save(); andThen(function() { assert.equal(currentPath(), 'poll.participation'); @@ -633,7 +633,7 @@ test('create a poll with only one day (without time)', function(assert) { assert.equal(currentPath(), 'create.settings'); pageCreateSettings - .next(); + .save(); andThen(function() { assert.equal(currentPath(), 'poll.participation'); @@ -714,7 +714,7 @@ test('create a poll with only one day (with time)', function(assert) { assert.equal(currentPath(), 'create.settings'); pageCreateSettings - .next(); + .save(); andThen(function() { assert.equal(currentPath(), 'poll.participation'); @@ -792,7 +792,7 @@ test('create a poll for answering a question with only one option', function(ass assert.equal(currentPath(), 'create.settings'); pageCreateSettings - .next(); + .save(); andThen(function() { assert.equal(currentPath(), 'poll.participation'); @@ -891,7 +891,7 @@ test('create a poll and using back button (find a date)', function(assert) { assert.equal(currentPath(), 'create.settings'); pageCreateSettings - .next(); + .save(); andThen(function() { assert.equal(currentPath(), 'poll.participation'); assert.ok( diff --git a/tests/integration/create-a-poll-test.js b/tests/integration/create-a-poll-test.js index 725f4e8..29a1627 100644 --- a/tests/integration/create-a-poll-test.js +++ b/tests/integration/create-a-poll-test.js @@ -96,7 +96,7 @@ test('create a default poll and participate', function(assert) { assert.equal(currentPath(), 'create.settings'); pageCreateSettings - .next(); + .save(); andThen(function() { assert.equal(currentPath(), 'poll.participation'); diff --git a/tests/pages/create/settings.js b/tests/pages/create/settings.js index ca4ed0c..f3e0204 100644 --- a/tests/pages/create/settings.js +++ b/tests/pages/create/settings.js @@ -14,5 +14,6 @@ const { export default PageObject.create(assign({}, defaultsForCreate, { availableAnswers: fillable('.answer-type select'), availableAnswersHasFocus: hasFocus('.answer-type select'), + save: defaultsForCreate.next, visit: visitable('/create/settings') }));