From 3f56fcba07d61ad39c27b2b1120442d147facfca Mon Sep 17 00:00:00 2001 From: Belen Curcio Date: Sun, 18 Dec 2016 20:13:02 -0300 Subject: [PATCH] Like tests text check --- tests/e2e/pages/embedStreamPage.js | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/tests/e2e/pages/embedStreamPage.js b/tests/e2e/pages/embedStreamPage.js index 128a7de77..7e8940f6a 100644 --- a/tests/e2e/pages/embedStreamPage.js +++ b/tests/e2e/pages/embedStreamPage.js @@ -36,12 +36,15 @@ const embedStreamCommands = { }, likeComment() { return this - .waitForElementVisible('@likeButton', 2000) - .click('@likeButton'); + .waitForElementVisible('@likeButton') + .waitForElementVisible('@likesCount') + .click('@likeButton') + .expect.element('@likeText').text.to.equal('Liked'); }, visitorLikeComment() { return this - .waitForElementVisible('@likeButton', 2000) + .waitForElementVisible('@likeButton') + .waitForElementVisible('@likesCount') .click('@likeButton') .waitForElementVisible('@signInDialog', 2000); } @@ -76,6 +79,12 @@ export default { }, likeButton: { selector: '.comment .coral-plugin-likes-container .coral-plugin-likes-button' + }, + 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' } } };