mirror of
https://github.com/wassname/talk.git
synced 2026-07-19 11:28:50 +08:00
Adding Actions
This commit is contained in:
@@ -1,4 +1,8 @@
|
||||
module.exports = {
|
||||
export default {
|
||||
waitForConditionTimeout: 20000,
|
||||
baseUrl: 'localhost:3011/'
|
||||
baseUrl: 'http://localhost:3000',
|
||||
testUser: {
|
||||
user: process.env.CORAL_TEST_USER,
|
||||
pass: process.env.CORAL_TEST_PASS
|
||||
}
|
||||
};
|
||||
|
||||
@@ -31,10 +31,9 @@ const embedCommands = {
|
||||
}
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
export default {
|
||||
commands: [embedCommands],
|
||||
elements: {
|
||||
|
||||
commentBox: {
|
||||
selector: '#commentBox'
|
||||
},
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
// 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
|
||||
@@ -0,0 +1,9 @@
|
||||
// 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 username
|
||||
// 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 username should show in the Flagged moderation queue
|
||||
@@ -0,0 +1,15 @@
|
||||
// Given I am signed into my commenter account
|
||||
// And I am on the comment stream page
|
||||
// And I see the option to like a comment
|
||||
// And I see the number of likes on a comment
|
||||
// When I like a comment
|
||||
// Then the comment should show as Liked
|
||||
// And the like count should increase by one
|
||||
|
||||
// Given I am a visitor and not logged in
|
||||
// And I am on the comment stream page
|
||||
// And I see the option to like a comment
|
||||
// And I see the number of likes on a comment
|
||||
// When I like a comment
|
||||
// Then I should be prompted to login to like a comment
|
||||
// And the like count should not be increased
|
||||
@@ -0,0 +1,15 @@
|
||||
export default {
|
||||
'@tags': ['login'],
|
||||
'Commenter logs in': client => {
|
||||
const embedStream = client.page.embedStream();
|
||||
const { baseUrl, testUser } = client.globals;
|
||||
|
||||
|
||||
// loginPage
|
||||
// .navigate(baseUrl + '/login')
|
||||
// .ready()
|
||||
//
|
||||
// loginPage.login(testUser)
|
||||
// client.pause(2000);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
//
|
||||
// Given I am signed into my commenter account
|
||||
// And I visit the comment stream page
|
||||
// And I should see the option to link to a comment
|
||||
// When I click to link to a comment
|
||||
// Then the link should be there for me to copy
|
||||
//
|
||||
// Given I have clicked the link to a comment
|
||||
// When I copy and paste that comment
|
||||
// Then I should be directed to that comment stream
|
||||
// And the page should scroll to where that comment is in the stream
|
||||
@@ -0,0 +1,15 @@
|
||||
export default {
|
||||
'@tags': ['sign-up'],
|
||||
'Commenter Sign Up': client => {
|
||||
const embedStream = client.page.embedStream();
|
||||
const { baseUrl, testUser } = client.globals;
|
||||
|
||||
|
||||
// loginPage
|
||||
// .navigate(baseUrl + '/login')
|
||||
// .ready()
|
||||
//
|
||||
// loginPage.login(testUser)
|
||||
// client.pause(2000);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user