Fix instances of browser windows being left open after tests
This commit is contained in:
parent
0b75b75b96
commit
b0ef76cf57
|
@ -8,19 +8,17 @@ describe("Duplicate Items", function () {
|
||||||
thisArg: this,
|
thisArg: this,
|
||||||
skipBundledFiles: true
|
skipBundledFiles: true
|
||||||
});
|
});
|
||||||
});
|
|
||||||
beforeEach(function* () {
|
|
||||||
Zotero.Prefs.clear('duplicateLibraries');
|
Zotero.Prefs.clear('duplicateLibraries');
|
||||||
win = yield loadZoteroPane();
|
win = yield loadZoteroPane();
|
||||||
zp = win.ZoteroPane;
|
zp = win.ZoteroPane;
|
||||||
cv = zp.collectionsView;
|
cv = zp.collectionsView;
|
||||||
|
});
|
||||||
|
beforeEach(function* () {
|
||||||
return selectLibrary(win);
|
return selectLibrary(win);
|
||||||
})
|
})
|
||||||
after(function () {
|
after(function () {
|
||||||
if (win) {
|
win.close();
|
||||||
win.close();
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
describe("Merging", function () {
|
describe("Merging", function () {
|
||||||
|
|
|
@ -208,10 +208,17 @@ describe("Zotero.FeedItem", function () {
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('#translate()', function() {
|
describe('#translate()', function() {
|
||||||
|
var win;
|
||||||
|
|
||||||
before(function* () {
|
before(function* () {
|
||||||
// Needs an open window to be able to create a hidden window for translation
|
// Needs an open window to be able to create a hidden window for translation
|
||||||
yield loadBrowserWindow();
|
win = yield loadBrowserWindow();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
after(function () {
|
||||||
|
win.close()
|
||||||
|
});
|
||||||
|
|
||||||
it('translates and saves items', function* () {
|
it('translates and saves items', function* () {
|
||||||
var feedItem = yield createDataObject('feedItem', {libraryID});
|
var feedItem = yield createDataObject('feedItem', {libraryID});
|
||||||
var url = getTestDataUrl('metadata/journalArticle-single.html');
|
var url = getTestDataUrl('metadata/journalArticle-single.html');
|
||||||
|
|
Loading…
Reference in New Issue
Block a user