more suitable page object action for save
This commit is contained in:
parent
0e446c19fe
commit
6852d6ce27
3 changed files with 10 additions and 9 deletions
|
@ -178,7 +178,7 @@ test('create a default poll', function(assert) {
|
||||||
);
|
);
|
||||||
|
|
||||||
pageCreateSettings
|
pageCreateSettings
|
||||||
.next();
|
.save();
|
||||||
|
|
||||||
andThen(function() {
|
andThen(function() {
|
||||||
assert.equal(currentPath(), 'poll.participation');
|
assert.equal(currentPath(), 'poll.participation');
|
||||||
|
@ -368,7 +368,7 @@ test('create a poll for answering a question', function(assert) {
|
||||||
);
|
);
|
||||||
|
|
||||||
pageCreateSettings
|
pageCreateSettings
|
||||||
.next();
|
.save();
|
||||||
|
|
||||||
andThen(function() {
|
andThen(function() {
|
||||||
assert.equal(currentPath(), 'poll.participation');
|
assert.equal(currentPath(), 'poll.participation');
|
||||||
|
@ -462,7 +462,7 @@ test('create a poll with times and description', function(assert) {
|
||||||
assert.equal(currentPath(), 'create.settings');
|
assert.equal(currentPath(), 'create.settings');
|
||||||
|
|
||||||
pageCreateSettings
|
pageCreateSettings
|
||||||
.next();
|
.save();
|
||||||
|
|
||||||
andThen(function() {
|
andThen(function() {
|
||||||
assert.equal(currentPath(), 'poll.participation');
|
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');
|
assert.equal(currentPath(), 'create.settings');
|
||||||
|
|
||||||
pageCreateSettings
|
pageCreateSettings
|
||||||
.next();
|
.save();
|
||||||
|
|
||||||
andThen(function() {
|
andThen(function() {
|
||||||
assert.equal(currentPath(), 'poll.participation');
|
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');
|
assert.equal(currentPath(), 'create.settings');
|
||||||
|
|
||||||
pageCreateSettings
|
pageCreateSettings
|
||||||
.next();
|
.save();
|
||||||
|
|
||||||
andThen(function() {
|
andThen(function() {
|
||||||
assert.equal(currentPath(), 'poll.participation');
|
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');
|
assert.equal(currentPath(), 'create.settings');
|
||||||
|
|
||||||
pageCreateSettings
|
pageCreateSettings
|
||||||
.next();
|
.save();
|
||||||
|
|
||||||
andThen(function() {
|
andThen(function() {
|
||||||
assert.equal(currentPath(), 'poll.participation');
|
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');
|
assert.equal(currentPath(), 'create.settings');
|
||||||
|
|
||||||
pageCreateSettings
|
pageCreateSettings
|
||||||
.next();
|
.save();
|
||||||
|
|
||||||
andThen(function() {
|
andThen(function() {
|
||||||
assert.equal(currentPath(), 'poll.participation');
|
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');
|
assert.equal(currentPath(), 'create.settings');
|
||||||
|
|
||||||
pageCreateSettings
|
pageCreateSettings
|
||||||
.next();
|
.save();
|
||||||
andThen(function() {
|
andThen(function() {
|
||||||
assert.equal(currentPath(), 'poll.participation');
|
assert.equal(currentPath(), 'poll.participation');
|
||||||
assert.ok(
|
assert.ok(
|
||||||
|
|
|
@ -96,7 +96,7 @@ test('create a default poll and participate', function(assert) {
|
||||||
assert.equal(currentPath(), 'create.settings');
|
assert.equal(currentPath(), 'create.settings');
|
||||||
|
|
||||||
pageCreateSettings
|
pageCreateSettings
|
||||||
.next();
|
.save();
|
||||||
|
|
||||||
andThen(function() {
|
andThen(function() {
|
||||||
assert.equal(currentPath(), 'poll.participation');
|
assert.equal(currentPath(), 'poll.participation');
|
||||||
|
|
|
@ -14,5 +14,6 @@ const {
|
||||||
export default PageObject.create(assign({}, defaultsForCreate, {
|
export default PageObject.create(assign({}, defaultsForCreate, {
|
||||||
availableAnswers: fillable('.answer-type select'),
|
availableAnswers: fillable('.answer-type select'),
|
||||||
availableAnswersHasFocus: hasFocus('.answer-type select'),
|
availableAnswersHasFocus: hasFocus('.answer-type select'),
|
||||||
|
save: defaultsForCreate.next,
|
||||||
visit: visitable('/create/settings')
|
visit: visitable('/create/settings')
|
||||||
}));
|
}));
|
||||||
|
|
Loading…
Reference in a new issue