From 44d3e7e4daf215fd61f989a842ada04254b58989 Mon Sep 17 00:00:00 2001 From: Juanfran Date: Wed, 2 Dec 2015 14:25:38 +0100 Subject: [PATCH] fix related tasks e2e tests --- e2e/full/user-stories/user-story-detail.e2e.js | 6 ++++++ e2e/helpers/us-detail-helper.js | 6 +++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/e2e/full/user-stories/user-story-detail.e2e.js b/e2e/full/user-stories/user-story-detail.e2e.js index 88849eac..2144b221 100644 --- a/e2e/full/user-stories/user-story-detail.e2e.js +++ b/e2e/full/user-stories/user-story-detail.e2e.js @@ -83,6 +83,8 @@ describe('User story detail', function(){ expect(utils.notifications.success.open()).to.be.eventually.true; + utils.notifications.success.close(); + let relatedTaskCount = usDetailHelper.relatedTasks().count(); expect(relatedTaskCount).to.be.eventually.equal(oldRelatedTaskCount + 1); @@ -92,6 +94,8 @@ describe('User story detail', function(){ usDetailHelper.editRelatedTasks(0, 'test2', 2, 2); expect(utils.notifications.success.open()).to.be.eventually.true; + + utils.notifications.success.close(); }); it('delete', async function() { @@ -101,6 +105,8 @@ describe('User story detail', function(){ expect(utils.notifications.success.open()).to.be.eventually.true; + utils.notifications.success.close(); + let relatedTaskCount = usDetailHelper.relatedTasks().count(); expect(relatedTaskCount).to.be.eventually.equal(oldRelatedTaskCount - 1); diff --git a/e2e/helpers/us-detail-helper.js b/e2e/helpers/us-detail-helper.js index 3a6bf3c4..946bb6ef 100644 --- a/e2e/helpers/us-detail-helper.js +++ b/e2e/helpers/us-detail-helper.js @@ -82,7 +82,11 @@ helper.editRelatedTasks = function(taskIndex, name, status, assigned_to) { helper.deleteRelatedTask = function(taskIndex, name, status, assigned_to) { let task = helper.relatedTasks().get(taskIndex); - task.$('.icon-delete').click(); + browser + .actions() + .mouseMove(task.$('.icon-delete')) + .click() + .perform(); utils.lightbox.confirm.ok(); };