mirror of
https://github.com/wassname/talk.git
synced 2026-08-20 12:50:41 +08:00
Take karma into account when doing e2e
This commit is contained in:
@@ -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 => {
|
||||
|
||||
Reference in New Issue
Block a user