Sign Up test

This commit is contained in:
Belen Curcio
2016-12-19 12:20:18 -03:00
parent 3646b07178
commit ab05403d1c
4 changed files with 54 additions and 2 deletions
+29
View File
@@ -9,6 +9,23 @@ const embedStreamCommands = {
.waitForElementVisible('iframe#coralStreamIframe')
.api.frame('coralStreamIframe');
},
signUp(user) {
return this
.waitForElementVisible('@signInButton', 2000)
.click('@signInButton')
.waitForElementVisible('@signInDialog')
.waitForElementVisible('@registerButton')
.click('@registerButton')
.setValue('@signInDialogEmail', user.email)
.setValue('@signInDialogPassword', user.pass)
.setValue('@signUpDialogConfirmPassword', user.pass)
.setValue('@signUpDialogDisplayName', user.displayName)
.waitForElementVisible('@signUpButton')
.click('@signUpButton')
.waitForElementVisible('@logInButton')
.click('@logInButton')
.waitForElementVisible('@logoutButton', 5000);
},
login(user) {
return this
.waitForElementVisible('@signInButton', 2000)
@@ -74,9 +91,18 @@ export default {
signInDialogPassword: {
selector: '#signInDialog #password'
},
signUpDialogConfirmPassword: {
selector: '#signInDialog #confirmPassword'
},
signUpDialogDisplayName: {
selector: '#signInDialog #displayName'
},
logInButton: {
selector: '#coralLogInButton'
},
signUpButton: {
selector: '#coralSignUpButton'
},
logoutButton: {
selector: '.commentStream #logout'
},
@@ -128,5 +154,8 @@ export default {
permalinkInput: {
selector: '.comment .coral-plugin-permalinks-popover.active input'
},
registerButton: {
selector: '#signInDialog #coralRegister'
}
}
};
@@ -1,4 +1,4 @@
module.exports = {
export default {
'@tags': ['app'],
'Base url and Hostname': browser => {
const {baseUrl} = browser.globals;
+1 -1
View File
@@ -1,4 +1,4 @@
module.exports = {
export default {
'@tags': ['like', 'comments', 'visitor'],
before: client => {
const embedStreamPage = client.page.embedStreamPage();
+23
View File
@@ -0,0 +1,23 @@
export default {
'@tags': ['signup', 'visitor'],
before: client => {
const embedStreamPage = client.page.embedStreamPage();
embedStreamPage
.navigate()
.ready();
},
'Visitor signs up': client => {
const embedStreamPage = client.page.embedStreamPage();
embedStreamPage
.signUp({
email: 'visitor@test.com',
displayName: 'Visitor',
pass: 'testtest'
});
},
after: client => {
client.end();
}
};