www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit 69041832e7dbb5059c0fa9089476bb49ca0dce0c
parent c6cb46907e566cd6c28b0c509e52c8a47f1b0dea
Author: Dan Stillman <dstillman@zotero.org>
Date:   Fri, 16 Jun 2017 04:52:06 -0400

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.

Diffstat:
Mtest/tests/browserTest.js | 48------------------------------------------------
1 file changed, 0 insertions(+), 48 deletions(-)

diff --git a/test/tests/browserTest.js b/test/tests/browserTest.js @@ -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();