Base tests

This commit is contained in:
Belen Curcio
2016-12-19 12:49:00 -03:00
parent ab05403d1c
commit 155351a88f
4 changed files with 46 additions and 5 deletions
+1 -1
View File
@@ -10,4 +10,4 @@ selenium-standalone install
{ echo moderator@test.com; echo test; echo test; echo Moderator Test User; echo moderator;} | dotenv ./bin/cli-users create
# Creating Commenter Test User
{ echo commenter@test.com; echo test; echo test; echo Commenter Test User; echo '';} | dotenv ./bin/cli-users create
{ echo commenter@test.com; echo test; echo test; echo Commenter Test User; echo ;} | dotenv ./bin/cli-users create
+1 -1
View File
@@ -5,7 +5,7 @@ const embedStreamCommands = {
},
ready() {
return this
.waitForElementVisible('body', 2000)
.waitForElementVisible('body', 4000)
.waitForElementVisible('iframe#coralStreamIframe')
.api.frame('coralStreamIframe');
},
@@ -6,8 +6,5 @@ export default {
.url(baseUrl)
.assert.title('Coral Talk')
.waitForElementPresent('body', 1000);
},
after: client => {
client.end();
}
};
+44
View File
@@ -0,0 +1,44 @@
export default {
'@tags': ['embedStream'],
before: client => {
const embedStreamPage = client.page.embedStreamPage();
embedStreamPage
.navigate()
.ready();
},
'Login as commenter': client => {
const embedStreamPage = client.page.embedStreamPage();
const {users} = client.globals;
embedStreamPage
.login(users.commenter);
},
'Add test comment': client => {
const embedStreamPage = client.page.embedStreamPage();
embedStreamPage
.postComment('Test Comment');
},
'Logout': client => {
const embedStreamPage = client.page.embedStreamPage();
embedStreamPage
.logout();
},
'Login as admin': client => {
const embedStreamPage = client.page.embedStreamPage();
const {users} = client.globals;
embedStreamPage
.login(users.admin);
},
'Approve test comment': client => {
const adminPage = client.page.adminPage();
adminPage
.navigate()
.ready();
adminPage
.approveComment();
},
after: client => {
client.end();
}
};