mirror of
https://github.com/wassname/talk.git
synced 2026-08-07 11:29:44 +08:00
Visitor tries to flag a comment
This commit is contained in:
@@ -47,6 +47,11 @@ const embedStreamCommands = {
|
||||
.waitForElementVisible('@likesCount')
|
||||
.click('@likeButton')
|
||||
.waitForElementVisible('@signInDialog', 2000);
|
||||
},
|
||||
flagComment() {
|
||||
return this
|
||||
.waitForElementVisible('@flagButton')
|
||||
.click('@likeButton');
|
||||
}
|
||||
};
|
||||
|
||||
@@ -83,8 +88,8 @@ export default {
|
||||
likeText: {
|
||||
selector: '.comment .coral-plugin-likes-container .coral-plugin-likes-button .coral-plugin-likes-button-text'
|
||||
},
|
||||
likesCount: {
|
||||
selector: '.comment .coral-plugin-likes-container .coral-plugin-likes-like-count'
|
||||
flagButton: {
|
||||
selector: '.comment .coral-plugin-flags-container .coral-plugin-flags-button'
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,15 +1,24 @@
|
||||
// Given I am signed into my commenter account
|
||||
// And I am on the comment stream page
|
||||
// And I see the option to report a comment
|
||||
// When I report the comment
|
||||
// And choose to flag the comment
|
||||
// Then I should see the option to give a flag reason
|
||||
// Then I should see a thank you message
|
||||
// And the comment should still show on the comment stream
|
||||
// And the comment should show in the Flagged moderation queue
|
||||
//
|
||||
// Given I am a visitor and not logged in
|
||||
// And I am on the comment stream page
|
||||
// And I see the option to report a comment
|
||||
// When I click to report the comment
|
||||
// Then I should be prompted to login to report
|
||||
export default {
|
||||
'@tags': ['flag', 'comments', 'commenter'],
|
||||
before: client => {
|
||||
const embedStreamPage = client.page.embedStreamPage();
|
||||
const {users} = client.globals;
|
||||
|
||||
embedStreamPage
|
||||
.navigate()
|
||||
.ready();
|
||||
|
||||
embedStreamPage
|
||||
.login(users.commenter);
|
||||
},
|
||||
'Commenter likes a comment': client => {
|
||||
const embedStreamPage = client.page.embedStreamPage();
|
||||
|
||||
embedStreamPage
|
||||
.likeComment();
|
||||
|
||||
},
|
||||
after: client => {
|
||||
client.end();
|
||||
}
|
||||
};
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
export default {
|
||||
'@tags': ['flag', 'comments', 'visitor'],
|
||||
before: client => {
|
||||
const embedStreamPage = client.page.embedStreamPage();
|
||||
|
||||
embedStreamPage
|
||||
.navigate()
|
||||
.ready();
|
||||
},
|
||||
'Visitor tries to flag a comment': client => {
|
||||
const embedStreamPage = client.page.embedStreamPage();
|
||||
|
||||
embedStreamPage
|
||||
.flagComment()
|
||||
.waitForElementVisible('@signInDialog', 2000);
|
||||
},
|
||||
after: client => {
|
||||
client.end();
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user