From 452cc8e528857de2169ca37f454b4d32f2b32932 Mon Sep 17 00:00:00 2001 From: Juanfran Date: Tue, 28 Jul 2015 15:24:24 +0200 Subject: [PATCH] fix some firefox e2e tests --- conf.e2e.js | 3 +++ e2e/full/taskboard.e2e.js | 2 +- e2e/full/wiki.e2e.js | 3 ++- e2e/helpers/detail-helper.js | 17 ++++++++--------- e2e/utils/detail.js | 2 ++ 5 files changed, 16 insertions(+), 11 deletions(-) diff --git a/conf.e2e.js b/conf.e2e.js index 0aa021a6..ae8aedf9 100644 --- a/conf.e2e.js +++ b/conf.e2e.js @@ -10,6 +10,9 @@ exports.config = { mochaOpts: { timeout: 30000 }, + // capabilities: { + // 'browserName': 'firefox' + // }, suites: { auth: 'e2e/auth/*.e2e.js', full: 'e2e/full/**/*.e2e.js' diff --git a/e2e/full/taskboard.e2e.js b/e2e/full/taskboard.e2e.js index e801acfd..77ea59de 100644 --- a/e2e/full/taskboard.e2e.js +++ b/e2e/full/taskboard.e2e.js @@ -53,7 +53,7 @@ describe('taskboard', function() { createTaskLightbox.tags().sendKeys('bbb'); browser.actions().sendKeys(protractor.Key.ENTER).perform(); - createTaskLightbox.blocked().click(); + await createTaskLightbox.blocked().click(); await createTaskLightbox.blockedNote().sendKeys(formFields.blockedNote); utils.common.takeScreenshot('taskboard', 'create-task-filled'); diff --git a/e2e/full/wiki.e2e.js b/e2e/full/wiki.e2e.js index 72cd248c..949a5b62 100644 --- a/e2e/full/wiki.e2e.js +++ b/e2e/full/wiki.e2e.js @@ -38,7 +38,7 @@ describe('wiki', function() { let timesEdited = wikiHelper.editor().getTimesEdited(); let lastEditionDatetime = wikiHelper.editor().getLastEditionDateTime(); wikiHelper.editor().enabledEditionMode(); - let settingText = "This is the new text" + new Date().getTime() + let settingText = "This is the new text" + new Date().getTime(); wikiHelper.editor().setText(settingText); // Checking preview @@ -57,6 +57,7 @@ describe('wiki', function() { // Delete await wikiHelper.editor().delete(); + expect(browser.getCurrentUrl()).to.be.eventually.equal('http://localhost:9001/project/project-0/wiki/home'); }) diff --git a/e2e/helpers/detail-helper.js b/e2e/helpers/detail-helper.js index a3e7c98d..5c8b8d4f 100644 --- a/e2e/helpers/detail-helper.js +++ b/e2e/helpers/detail-helper.js @@ -18,7 +18,7 @@ helper.title = function() { }; return obj; -} +}; helper.description = function(){ let el = $('section[tg-editable-description]'); @@ -82,10 +82,10 @@ helper.tags = function() { browser.actions().sendKeys(protractor.Key.ENTER).perform(); } } - } + }; return obj; -} +}; helper.assignedTo = function() { let el = $('.assigned-to'); @@ -215,10 +215,10 @@ helper.block = function() { el.$('.item-unblock').click(); await browser.waitForAngular(); } - } + }; return obj; -} +}; helper.blockLightbox = function() { let el = $('div[tg-lb-block]'); @@ -299,8 +299,7 @@ helper.attachment = function() { }, countAttachments: async function(){ - let attachments = await el.$$('div[tg-attachment] .attachment-comments') - return attachments.length; + return await el.$$('div[tg-attachment]').count(); }, countDeprecatedAttachments: async function(){ @@ -333,10 +332,10 @@ helper.attachment = function() { let destination = el.$$('div[tg-attachment] .attachment-settings .icon-drag-v').first(); await utils.common.drag(lastDraggableAttachment, destination); } - } + }; return obj; -} +}; diff --git a/e2e/utils/detail.js b/e2e/utils/detail.js index 24b85828..521cbb46 100644 --- a/e2e/utils/detail.js +++ b/e2e/utils/detail.js @@ -138,6 +138,8 @@ helper.attachmentTesting = async function() { attachmentsLength = await attachmentHelper.countAttachments(); deprecatedAttachmentsLength = await attachmentHelper.countDeprecatedAttachments(); await attachmentHelper.showDeprecated(); + await browser.waitForAngular(); + await browser.sleep(6000); newAttachmentsLength = await attachmentHelper.countAttachments(); expect(newAttachmentsLength).to.be.equal(attachmentsLength + deprecatedAttachmentsLength);