mirror of
https://github.com/wassname/talk.git
synced 2026-06-28 20:08:37 +08:00
35 lines
919 B
JavaScript
35 lines
919 B
JavaScript
module.exports = {
|
|
'@tags': ['flag', 'commenter'],
|
|
before: (client) => {
|
|
const embedStreamPage = client.page.embedStreamPage();
|
|
const {users} = client.globals;
|
|
|
|
embedStreamPage
|
|
.navigate()
|
|
.ready();
|
|
|
|
embedStreamPage
|
|
.login(users.commenter);
|
|
},
|
|
'Commenter flags a username': (client) => {
|
|
const embedStreamPage = client.page.embedStreamPage();
|
|
|
|
embedStreamPage
|
|
.flagUsername()
|
|
.click('@flagButton')
|
|
.waitForElementVisible('@flagPopUp')
|
|
.waitForElementVisible('@flagUsernameOption')
|
|
.click('@flagUsernameOption')
|
|
.waitForElementVisible('@flagDoneButton')
|
|
.click('@flagDoneButton')
|
|
.waitForElementVisible('@flagOtherOption')
|
|
.click('@flagOtherOption')
|
|
.waitForElementVisible('@flagDoneButton')
|
|
.click('@flagDoneButton')
|
|
.click('@flagDoneButton');
|
|
},
|
|
after: (client) => {
|
|
client.end();
|
|
}
|
|
};
|