-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ce938fa
commit 77c675d
Showing
6 changed files
with
74 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,12 +2,12 @@ module.exports = { | |
before: function(browser, done) { | ||
browser | ||
.init() | ||
.waitForElementVisible('input#email-sign-in', 10000) | ||
.setValue('input#email-sign-in',process.env.PROTOTYPO_LOGIN) | ||
.waitForElementVisible('input#email-sign-in', 20000) | ||
.setValue('input#email-sign-in', '[email protected]') | ||
.setValue('input#password-sign-in', process.env.PROTOTYPO_PASS) | ||
.click('input[type=submit]') | ||
.pause(10000) | ||
.waitForElementVisible('#dashboard', 10000, false, done); | ||
.pause(20000) | ||
.waitForElementVisible('#dashboard', 20000, false, done); | ||
}, | ||
after: function(browser) { | ||
browser.end(); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,23 +2,23 @@ module.exports = { | |
'Test login': function(browser) { | ||
browser | ||
.init() | ||
.waitForElementVisible('input#email-sign-in', 10000) | ||
.setValue('input#email-sign-in',process.env.PROTOTYPO_LOGIN) | ||
.waitForElementVisible('input#email-sign-in', 20000) | ||
.setValue('input#email-sign-in','[email protected]') | ||
.setValue('input#password-sign-in', process.env.PROTOTYPO_PASS) | ||
.click('input[type=submit]') | ||
.pause(2000) | ||
.waitForElementVisible('#dashboard', 10000) | ||
.waitForElementVisible('#dashboard', 20000) | ||
.end(); | ||
}, | ||
'Test login fail': function(browser) { | ||
browser | ||
.init() | ||
.waitForElementVisible('input#email-sign-in', 10000) | ||
.waitForElementVisible('input#email-sign-in', 20000) | ||
.setValue('input#email-sign-in', "[email protected]") | ||
.setValue('input#password-sign-in', process.env.PROTOTYPO_PASS) | ||
.click('input[type=submit]') | ||
.pause(2000) | ||
.waitForElementVisible('.warning-message', 10000) | ||
.waitForElementVisible('.warning-message', 20000) | ||
.end(); | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,12 +2,12 @@ module.exports = { | |
before: function(browser, done) { | ||
browser | ||
.init() | ||
.waitForElementVisible('input#email-sign-in', 10000) | ||
.setValue('input#email-sign-in',process.env.PROTOTYPO_LOGIN) | ||
.waitForElementVisible('input#email-sign-in', 20000) | ||
.setValue('input#email-sign-in', '[email protected]') | ||
.setValue('input#password-sign-in', process.env.PROTOTYPO_PASS) | ||
.click('input[type=submit]') | ||
.pause(2000) | ||
.waitForElementVisible('#dashboard', 10000, done); | ||
.waitForElementVisible('#dashboard', 20000, done); | ||
}, | ||
after: function(browser) { | ||
browser.end(); | ||
|
@@ -27,9 +27,22 @@ module.exports = { | |
.click('div[name=help-panel]') | ||
.waitForElementVisible('.help-panel', 2000); | ||
}, | ||
'Should display profile' : function (browser) { | ||
'Should display news feed' : function (browser) { | ||
browser | ||
.click('div[name=news-feed]') | ||
.waitForElementVisible('.news-feed', 2000) | ||
.end() | ||
}, | ||
'Should display profile when kickstarter' : function (browser) { | ||
browser | ||
.init() | ||
.waitForElementVisible('input#email-sign-in', 20000) | ||
.setValue('input#email-sign-in', '[email protected]') | ||
.setValue('input#password-sign-in', process.env.PROTOTYPO_PASS) | ||
.click('input[type=submit]') | ||
.pause(2000) | ||
.waitForElementVisible('#dashboard', 20000) | ||
.click('div[name=subscriptions]') | ||
.waitForElementVisible('.account', 2000); | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,12 +2,12 @@ module.exports = { | |
before: function(browser, done) { | ||
browser | ||
.init() | ||
.waitForElementVisible('input#email-sign-in', 10000) | ||
.setValue('input#email-sign-in',process.env.PROTOTYPO_LOGIN) | ||
.waitForElementVisible('input#email-sign-in', 20000) | ||
.setValue('input#email-sign-in', '[email protected]') | ||
.setValue('input#password-sign-in', process.env.PROTOTYPO_PASS) | ||
.click('input[type=submit]') | ||
.pause(10000) | ||
.waitForElementVisible('#dashboard', 10000, false, done); | ||
.pause(20000) | ||
.waitForElementVisible('#dashboard', 20000, false, done); | ||
}, | ||
after: function(browser) { | ||
browser.end(); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
module.exports = { | ||
'Should have access to all params': function(browser) { | ||
browser | ||
.init() | ||
.waitForElementVisible('input#email-sign-in', 20000) | ||
.setValue('input#email-sign-in', '[email protected]') | ||
.setValue('input#password-sign-in', process.env.PROTOTYPO_PASS) | ||
.click('input[type=submit]') | ||
.pause(2000) | ||
.waitForElementVisible('#dashboard', 20000) | ||
.click('.controls-tabs-icon:nth-child(1)') | ||
.pause(200) | ||
.elements('css selector', '.sliders .slider', function(result) { | ||
browser.assert.equal(result.value.length, 9); | ||
}) | ||
.elements('css selector', '.sliders .slider.is-disabled', function(result) { | ||
browser.assert.equal(result.value.length, 0); | ||
}) | ||
.end(); | ||
}, | ||
'Should not have access to all params': function(browser) { | ||
browser | ||
.init() | ||
.waitForElementVisible('input#email-sign-in', 20000) | ||
.setValue('input#email-sign-in', '[email protected]') | ||
.setValue('input#password-sign-in', process.env.PROTOTYPO_PASS) | ||
.click('input[type=submit]') | ||
.pause(2000) | ||
.waitForElementVisible('#dashboard', 20000) | ||
.click('.controls-tabs-icon:nth-child(1)') | ||
.pause(200) | ||
.elements('css selector', '.sliders .slider', function(result) { | ||
browser.assert.equal(result.value.length, 9); | ||
}) | ||
.elements('css selector', '.sliders .slider.is-disabled', function(result) { | ||
browser.assert.equal(result.value.length, 7); | ||
}) | ||
.end(); | ||
} | ||
}; |