Skip to content

Commit 6852d6c

Browse files
committed
more suitable page object action for save
1 parent 0e446c1 commit 6852d6c

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

tests/acceptance/create-a-poll-test.js

+8-8
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ test('create a default poll', function(assert) {
178178
);
179179

180180
pageCreateSettings
181-
.next();
181+
.save();
182182

183183
andThen(function() {
184184
assert.equal(currentPath(), 'poll.participation');
@@ -368,7 +368,7 @@ test('create a poll for answering a question', function(assert) {
368368
);
369369

370370
pageCreateSettings
371-
.next();
371+
.save();
372372

373373
andThen(function() {
374374
assert.equal(currentPath(), 'poll.participation');
@@ -462,7 +462,7 @@ test('create a poll with times and description', function(assert) {
462462
assert.equal(currentPath(), 'create.settings');
463463

464464
pageCreateSettings
465-
.next();
465+
.save();
466466

467467
andThen(function() {
468468
assert.equal(currentPath(), 'poll.participation');
@@ -553,7 +553,7 @@ test('create a poll with only one day and multiple times', function(assert) {
553553
assert.equal(currentPath(), 'create.settings');
554554

555555
pageCreateSettings
556-
.next();
556+
.save();
557557

558558
andThen(function() {
559559
assert.equal(currentPath(), 'poll.participation');
@@ -633,7 +633,7 @@ test('create a poll with only one day (without time)', function(assert) {
633633
assert.equal(currentPath(), 'create.settings');
634634

635635
pageCreateSettings
636-
.next();
636+
.save();
637637

638638
andThen(function() {
639639
assert.equal(currentPath(), 'poll.participation');
@@ -714,7 +714,7 @@ test('create a poll with only one day (with time)', function(assert) {
714714
assert.equal(currentPath(), 'create.settings');
715715

716716
pageCreateSettings
717-
.next();
717+
.save();
718718

719719
andThen(function() {
720720
assert.equal(currentPath(), 'poll.participation');
@@ -792,7 +792,7 @@ test('create a poll for answering a question with only one option', function(ass
792792
assert.equal(currentPath(), 'create.settings');
793793

794794
pageCreateSettings
795-
.next();
795+
.save();
796796

797797
andThen(function() {
798798
assert.equal(currentPath(), 'poll.participation');
@@ -891,7 +891,7 @@ test('create a poll and using back button (find a date)', function(assert) {
891891
assert.equal(currentPath(), 'create.settings');
892892

893893
pageCreateSettings
894-
.next();
894+
.save();
895895
andThen(function() {
896896
assert.equal(currentPath(), 'poll.participation');
897897
assert.ok(

tests/integration/create-a-poll-test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ test('create a default poll and participate', function(assert) {
9696
assert.equal(currentPath(), 'create.settings');
9797

9898
pageCreateSettings
99-
.next();
99+
.save();
100100

101101
andThen(function() {
102102
assert.equal(currentPath(), 'poll.participation');

tests/pages/create/settings.js

+1
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,6 @@ const {
1414
export default PageObject.create(assign({}, defaultsForCreate, {
1515
availableAnswers: fillable('.answer-type select'),
1616
availableAnswersHasFocus: hasFocus('.answer-type select'),
17+
save: defaultsForCreate.next,
1718
visit: visitable('/create/settings')
1819
}));

0 commit comments

Comments
 (0)