diff --git a/tests/e2e/globals.js b/tests/e2e/globals.js index 147af2663..5f2c69d3b 100644 --- a/tests/e2e/globals.js +++ b/tests/e2e/globals.js @@ -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 + } }; diff --git a/tests/e2e/pages/embedStream.js b/tests/e2e/pages/embedStream.js index cc584a656..6b02f5260 100644 --- a/tests/e2e/pages/embedStream.js +++ b/tests/e2e/pages/embedStream.js @@ -31,10 +31,9 @@ const embedCommands = { } }; -module.exports = { +export default { commands: [embedCommands], elements: { - commentBox: { selector: '#commentBox' }, diff --git a/tests/e2e/tests/actions/Commenter/FlagCommentTest.js b/tests/e2e/tests/actions/Commenter/FlagCommentTest.js new file mode 100644 index 000000000..7d9a6678d --- /dev/null +++ b/tests/e2e/tests/actions/Commenter/FlagCommentTest.js @@ -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 diff --git a/tests/e2e/tests/actions/Commenter/FlagUsernameTest.js b/tests/e2e/tests/actions/Commenter/FlagUsernameTest.js new file mode 100644 index 000000000..eb606e24c --- /dev/null +++ b/tests/e2e/tests/actions/Commenter/FlagUsernameTest.js @@ -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 diff --git a/tests/e2e/tests/actions/Commenter/LikeCommentTest.js b/tests/e2e/tests/actions/Commenter/LikeCommentTest.js new file mode 100644 index 000000000..a6eb952a5 --- /dev/null +++ b/tests/e2e/tests/actions/Commenter/LikeCommentTest.js @@ -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 diff --git a/tests/e2e/tests/actions/Commenter/LoginTest.js b/tests/e2e/tests/actions/Commenter/LoginTest.js new file mode 100644 index 000000000..90ea8fec0 --- /dev/null +++ b/tests/e2e/tests/actions/Commenter/LoginTest.js @@ -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); + } +} diff --git a/tests/e2e/tests/actions/Commenter/PermalinkTest.js b/tests/e2e/tests/actions/Commenter/PermalinkTest.js new file mode 100644 index 000000000..ed8c7a270 --- /dev/null +++ b/tests/e2e/tests/actions/Commenter/PermalinkTest.js @@ -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 diff --git a/tests/e2e/tests/actions/Commenter/SignUpTest.js b/tests/e2e/tests/actions/Commenter/SignUpTest.js new file mode 100644 index 000000000..ead3fb324 --- /dev/null +++ b/tests/e2e/tests/actions/Commenter/SignUpTest.js @@ -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); + } +}