Take karma into account when doing e2e

This commit is contained in:
Chi Vinh Le
2018-05-25 22:49:35 +02:00
parent 79a0f0321f
commit 90e4682cf6
9 changed files with 98 additions and 23 deletions
+5 -5
View File
@@ -1,3 +1,5 @@
const commentBody = 'Embed Stream Test';
module.exports = {
'@tags': ['embedStream', 'login'],
@@ -40,28 +42,26 @@ module.exports = {
},
'user posts a comment': client => {
const comments = client.page.embedStream().section.comments;
const { testData: { comment } } = client.globals;
comments
.waitForElementVisible('@commentBoxTextarea')
.setValue('@commentBoxTextarea', comment.body)
.setValue('@commentBoxTextarea', commentBody)
.waitForElementVisible('@commentBoxPostButton')
.click('@commentBoxPostButton')
.waitForElementVisible('@firstCommentContent')
.getText('@firstCommentContent', result => {
comments.assert.equal(result.value, comment.body);
comments.assert.equal(result.value, commentBody);
});
},
'signed in user sees comment history': client => {
const profile = client.page.embedStream().goToProfileSection();
const { testData: { comment } } = client.globals;
profile
.waitForElementVisible('@myCommentHistory')
.waitForElementVisible('@myCommentHistoryComment')
.getText('@myCommentHistoryComment', result => {
profile.assert.equal(result.value, comment.body);
profile.assert.equal(result.value, commentBody);
});
},
'user sees replies and reactions to comments': client => {