improve lightbox close e2e
parent
473362d772
commit
d95e4778c8
|
@ -357,9 +357,10 @@ shared.attachmentTesting = async function() {
|
||||||
|
|
||||||
let previewSrc2 = await attachmentHelper.getPreviewSrc();
|
let previewSrc2 = await attachmentHelper.getPreviewSrc();
|
||||||
|
|
||||||
expect(previewSrc).not.to.be.equal(previewSrc2);
|
|
||||||
await lightbox.exit();
|
await lightbox.exit();
|
||||||
|
|
||||||
|
expect(previewSrc).not.to.be.equal(previewSrc2);
|
||||||
|
|
||||||
// Deleting
|
// Deleting
|
||||||
attachmentsLength = await attachmentHelper.countAttachments();
|
attachmentsLength = await attachmentHelper.countAttachments();
|
||||||
await attachmentHelper.deleteLastAttachment();
|
await attachmentHelper.deleteLastAttachment();
|
||||||
|
|
|
@ -10,6 +10,7 @@ var sharedFilters = require('../shared/filters');
|
||||||
chai.use(chaiAsPromised);
|
chai.use(chaiAsPromised);
|
||||||
var expect = chai.expect;
|
var expect = chai.expect;
|
||||||
|
|
||||||
|
|
||||||
describe('backlog', function() {
|
describe('backlog', function() {
|
||||||
before(async function() {
|
before(async function() {
|
||||||
browser.get(browser.params.glob.host + 'project/project-3/backlog');
|
browser.get(browser.params.glob.host + 'project/project-3/backlog');
|
||||||
|
@ -160,6 +161,7 @@ describe('backlog', function() {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
it('edit status inline', async function() {
|
it('edit status inline', async function() {
|
||||||
await backlogHelper.setUsStatus(0, 1);
|
await backlogHelper.setUsStatus(0, 1);
|
||||||
|
|
||||||
|
@ -209,7 +211,7 @@ describe('backlog', function() {
|
||||||
expect(firstElementTextRef).to.be.equal(draggedElementRef);
|
expect(firstElementTextRef).to.be.equal(draggedElementRef);
|
||||||
});
|
});
|
||||||
|
|
||||||
it.skip('reorder multiple us', async function() {
|
it('reorder multiple us', async function() {
|
||||||
let dragableElements = backlogHelper.userStories();
|
let dragableElements = backlogHelper.userStories();
|
||||||
|
|
||||||
let count = await dragableElements.count();
|
let count = await dragableElements.count();
|
||||||
|
@ -237,7 +239,7 @@ describe('backlog', function() {
|
||||||
expect(elementRef1).to.be.equal(draggedRefs[1]);
|
expect(elementRef1).to.be.equal(draggedRefs[1]);
|
||||||
});
|
});
|
||||||
|
|
||||||
it.skip('drag multiple us to milestone', async function() {
|
it('drag multiple us to milestone', async function() {
|
||||||
let sprint = backlogHelper.sprints().get(0);
|
let sprint = backlogHelper.sprints().get(0);
|
||||||
let initUssSprintCount = await backlogHelper.getSprintUsertories(sprint).count();
|
let initUssSprintCount = await backlogHelper.getSprintUsertories(sprint).count();
|
||||||
|
|
||||||
|
|
|
@ -13,6 +13,8 @@ lightbox.exit = function(el) {
|
||||||
}
|
}
|
||||||
|
|
||||||
el.$('.close').click();
|
el.$('.close').click();
|
||||||
|
|
||||||
|
return lightbox.close(el);
|
||||||
};
|
};
|
||||||
|
|
||||||
lightbox.open = async function(el) {
|
lightbox.open = async function(el) {
|
||||||
|
@ -38,7 +40,6 @@ lightbox.open = async function(el) {
|
||||||
};
|
};
|
||||||
|
|
||||||
lightbox.close = async function(el) {
|
lightbox.close = async function(el) {
|
||||||
var deferred = protractor.promise.defer();
|
|
||||||
var present = true;
|
var present = true;
|
||||||
|
|
||||||
if (typeof el == 'string' || el instanceof String) {
|
if (typeof el == 'string' || el instanceof String) {
|
||||||
|
@ -47,22 +48,16 @@ lightbox.close = async function(el) {
|
||||||
|
|
||||||
present = await el.isPresent();
|
present = await el.isPresent();
|
||||||
|
|
||||||
if (!present) {
|
if (present) {
|
||||||
deferred.fulfill(true);
|
try {
|
||||||
} else {
|
await browser.wait(async function() {
|
||||||
return browser.wait(function() {
|
let open = await common.hasClass(el, 'open');
|
||||||
return common.hasClass(el, 'open').then(function(open) {
|
|
||||||
return !open;
|
return !open;
|
||||||
});
|
}, 4000);
|
||||||
}, 4000)
|
} catch (e) {
|
||||||
.then(function() {
|
new Error('Lightbox doesn\'t close')
|
||||||
return deferred.fulfill(true);
|
}
|
||||||
}, function() {
|
|
||||||
deferred.reject(new Error('Lightbox doesn\'t close'));
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return deferred.promise;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
lightbox.confirm = {};
|
lightbox.confirm = {};
|
||||||
|
|
Loading…
Reference in New Issue