reset like/unlike

stable
Juanfran 2016-01-28 10:24:14 +01:00
parent 1a3d5086ab
commit ba48eb02be
1 changed files with 15 additions and 0 deletions

View File

@ -10,6 +10,9 @@ describe('project home', function() {
beforeEach(async function() {
browser.get(browser.params.glob.host + 'project/project-1/');
await utils.common.waitLoader();
await utils.common.takeScreenshot("project", "home-like");
});
it('screenshot', async function() {
@ -39,6 +42,18 @@ describe('project home', function() {
});
*/
it('unlike', async function() {
let reset = async function() {
//reset
let link = $('tg-like-project-button a');
let likeActive = await utils.common.hasClass(link, 'active');
if (!likeActive) {
link.click();
}
};
await reset();
let link = $('tg-like-project-button a');
let likesCounterOld = parseInt(await link.$('.track-button-counter').getText(), 10);