Remove Zotero_Browser tests for new Firefox windows
I'm not sure if we need the browser tests at all -- we still translate some things via hidden browsers, and I'm not sure what we have that tests that -- but we definitely don't need to test saving before the Zotero pane is opened.
This commit is contained in:
parent
c6cb46907e
commit
69041832e7
1 changed files with 0 additions and 48 deletions
|
@ -29,54 +29,6 @@ describe("Zotero_Browser", function () {
|
|||
});
|
||||
|
||||
|
||||
it("should save webpage to My Library if the Zotero pane hasn't been opened yet in a Firefox window", function* () {
|
||||
var win = yield loadBrowserWindow();
|
||||
|
||||
var uri = OS.Path.join(getTestDataDirectory().path, "snapshot", "index.html");
|
||||
var deferred = Zotero.Promise.defer();
|
||||
win.Zotero_Browser.addDetectCallback(() => deferred.resolve());
|
||||
win.loadURI(uri);
|
||||
yield deferred.promise;
|
||||
|
||||
var promise = waitForWindow('chrome://zotero/content/progressWindow.xul', function (progressWin) {
|
||||
assert.include(
|
||||
progressWin.document.documentElement.textContent,
|
||||
"Test"
|
||||
);
|
||||
});
|
||||
yield win.Zotero_Browser.scrapeThisPage();
|
||||
yield promise;
|
||||
|
||||
win.close();
|
||||
});
|
||||
|
||||
it("should save journal article to My Library if the Zotero pane hasn't been opened yet in a Firefox window", function* () {
|
||||
Zotero.Prefs.set('lastViewedFolder', collection.treeViewID);
|
||||
|
||||
var win = yield loadBrowserWindow();
|
||||
|
||||
var deferred = Zotero.Promise.defer();
|
||||
win.Zotero_Browser.addDetectCallback(() => deferred.resolve());
|
||||
var uri = OS.Path.join(
|
||||
getTestDataDirectory().path, "metadata", "journalArticle-single.html"
|
||||
);
|
||||
win.loadURI(uri);
|
||||
yield deferred.promise;
|
||||
|
||||
var promise1 = waitForWindow('chrome://zotero/content/progressWindow.xul', function (progressWin) {});
|
||||
var promise2 = waitForItemEvent('add');
|
||||
yield win.Zotero_Browser.scrapeThisPage();
|
||||
yield promise1;
|
||||
var ids = yield promise2;
|
||||
var items = Zotero.Items.get(ids);
|
||||
assert.lengthOf(items, 1);
|
||||
assert.equal(items[0].libraryID, Zotero.Libraries.userLibraryID);
|
||||
assert.equal(Zotero.ItemTypes.getName(items[0].itemTypeID), 'journalArticle');
|
||||
assert.lengthOf(items[0].getCollections(), 0);
|
||||
|
||||
win.close();
|
||||
});
|
||||
|
||||
it("should save webpage to current collection", function* () {
|
||||
var uri = OS.Path.join(getTestDataDirectory().path, "snapshot", "index.html");
|
||||
var deferred = Zotero.Promise.defer();
|
||||
|
|
Loading…
Reference in a new issue