Preferences: Fix tests, improve clarity, and more
- Fix sync and advanced preferences tests; use a new waitForFirstPaneLoad() functions instead of the old paneload event listener - Remove empty preferences_searchTest.js - Rename some Zotero_Preferences members/functions for better clarity and public/private differentiation - Reorder, also for clarity - Fix tabIndex parameter causing an error if invalid - Remove window.sizeToContent() call in Sync.displayFields() - So *that's* why the window resized every time the sync pane was loaded... - Deprecate openURL() and simplify openInViewer()
This commit is contained in:
parent
286381d0dd
commit
5d6ad703c1
7 changed files with 144 additions and 205 deletions
|
@ -3,18 +3,10 @@ describe("Sync Preferences", function () {
|
|||
before(function* () {
|
||||
// Load prefs with sync pane
|
||||
win = yield loadWindow("chrome://zotero/content/preferences/preferences.xhtml", {
|
||||
pane: 'zotero-prefpane-sync',
|
||||
tabIndex: 0
|
||||
pane: 'zotero-prefpane-sync'
|
||||
});
|
||||
doc = win.document;
|
||||
let defer = Zotero.Promise.defer();
|
||||
let pane = doc.getElementById('zotero-prefpane-sync');
|
||||
if (!pane.loaded) {
|
||||
pane.addEventListener('paneload', function () {
|
||||
defer.resolve();
|
||||
});
|
||||
yield defer.promise;
|
||||
}
|
||||
yield win.Zotero_Preferences.waitForFirstPaneLoad();
|
||||
});
|
||||
|
||||
after(function() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue