fix some firefox e2e tests

stable
Juanfran 2015-07-28 15:24:24 +02:00
parent 785794dd3b
commit 452cc8e528
5 changed files with 16 additions and 11 deletions

View File

@ -10,6 +10,9 @@ exports.config = {
mochaOpts: { mochaOpts: {
timeout: 30000 timeout: 30000
}, },
// capabilities: {
// 'browserName': 'firefox'
// },
suites: { suites: {
auth: 'e2e/auth/*.e2e.js', auth: 'e2e/auth/*.e2e.js',
full: 'e2e/full/**/*.e2e.js' full: 'e2e/full/**/*.e2e.js'

View File

@ -53,7 +53,7 @@ describe('taskboard', function() {
createTaskLightbox.tags().sendKeys('bbb'); createTaskLightbox.tags().sendKeys('bbb');
browser.actions().sendKeys(protractor.Key.ENTER).perform(); browser.actions().sendKeys(protractor.Key.ENTER).perform();
createTaskLightbox.blocked().click(); await createTaskLightbox.blocked().click();
await createTaskLightbox.blockedNote().sendKeys(formFields.blockedNote); await createTaskLightbox.blockedNote().sendKeys(formFields.blockedNote);
utils.common.takeScreenshot('taskboard', 'create-task-filled'); utils.common.takeScreenshot('taskboard', 'create-task-filled');

View File

@ -38,7 +38,7 @@ describe('wiki', function() {
let timesEdited = wikiHelper.editor().getTimesEdited(); let timesEdited = wikiHelper.editor().getTimesEdited();
let lastEditionDatetime = wikiHelper.editor().getLastEditionDateTime(); let lastEditionDatetime = wikiHelper.editor().getLastEditionDateTime();
wikiHelper.editor().enabledEditionMode(); 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); wikiHelper.editor().setText(settingText);
// Checking preview // Checking preview
@ -57,6 +57,7 @@ describe('wiki', function() {
// Delete // Delete
await wikiHelper.editor().delete(); await wikiHelper.editor().delete();
expect(browser.getCurrentUrl()).to.be.eventually.equal('http://localhost:9001/project/project-0/wiki/home'); expect(browser.getCurrentUrl()).to.be.eventually.equal('http://localhost:9001/project/project-0/wiki/home');
}) })

View File

@ -18,7 +18,7 @@ helper.title = function() {
}; };
return obj; return obj;
} };
helper.description = function(){ helper.description = function(){
let el = $('section[tg-editable-description]'); let el = $('section[tg-editable-description]');
@ -82,10 +82,10 @@ helper.tags = function() {
browser.actions().sendKeys(protractor.Key.ENTER).perform(); browser.actions().sendKeys(protractor.Key.ENTER).perform();
} }
} }
} };
return obj; return obj;
} };
helper.assignedTo = function() { helper.assignedTo = function() {
let el = $('.assigned-to'); let el = $('.assigned-to');
@ -215,10 +215,10 @@ helper.block = function() {
el.$('.item-unblock').click(); el.$('.item-unblock').click();
await browser.waitForAngular(); await browser.waitForAngular();
} }
} };
return obj; return obj;
} };
helper.blockLightbox = function() { helper.blockLightbox = function() {
let el = $('div[tg-lb-block]'); let el = $('div[tg-lb-block]');
@ -299,8 +299,7 @@ helper.attachment = function() {
}, },
countAttachments: async function(){ countAttachments: async function(){
let attachments = await el.$$('div[tg-attachment] .attachment-comments') return await el.$$('div[tg-attachment]').count();
return attachments.length;
}, },
countDeprecatedAttachments: async function(){ countDeprecatedAttachments: async function(){
@ -333,10 +332,10 @@ helper.attachment = function() {
let destination = el.$$('div[tg-attachment] .attachment-settings .icon-drag-v').first(); let destination = el.$$('div[tg-attachment] .attachment-settings .icon-drag-v').first();
await utils.common.drag(lastDraggableAttachment, destination); await utils.common.drag(lastDraggableAttachment, destination);
} }
} };
return obj; return obj;
} };

View File

@ -138,6 +138,8 @@ helper.attachmentTesting = async function() {
attachmentsLength = await attachmentHelper.countAttachments(); attachmentsLength = await attachmentHelper.countAttachments();
deprecatedAttachmentsLength = await attachmentHelper.countDeprecatedAttachments(); deprecatedAttachmentsLength = await attachmentHelper.countDeprecatedAttachments();
await attachmentHelper.showDeprecated(); await attachmentHelper.showDeprecated();
await browser.waitForAngular();
await browser.sleep(6000);
newAttachmentsLength = await attachmentHelper.countAttachments(); newAttachmentsLength = await attachmentHelper.countAttachments();
expect(newAttachmentsLength).to.be.equal(attachmentsLength + deprecatedAttachmentsLength); expect(newAttachmentsLength).to.be.equal(attachmentsLength + deprecatedAttachmentsLength);