describe("Zotero_File_Interface", function() { let win; before(function* () { win = yield loadZoteroPane(); yield OS.File.copy(OS.Path.join(getTestDataDirectory().path, "Test Import Translator.js"), OS.Path.join(Zotero.getTranslatorsDirectory().path, "Test Import Translator.js")); yield Zotero.Translators.reinit(); }); after(function () { win.close(); }); it('should import a file into a collection', function* () { this.timeout(10000); let testFile = getTestDataDirectory(); testFile.append("allTypesAndFields.js"); yield win.Zotero_File_Interface.importFile(testFile); let importedCollection = Zotero.Collections.getByLibrary( Zotero.Libraries.userLibraryID ).filter(x => x.name == 'allTypesAndFields'); assert.equal(importedCollection.length, 1); let childItems = importedCollection[0].getChildItems(); let savedItems = {}; for (let i=0; i