Show hard warning dialog when unlinking or linking to a different account (#1047)
And give option to delete local data when unlinking This removes the old behavior of merging accounts when syncing with a different username.
This commit is contained in:
parent
455facee95
commit
11e7cef057
12 changed files with 353 additions and 122 deletions
|
@ -95,6 +95,17 @@ describe("Sync Preferences", function () {
|
|||
assert.equal(Zotero.Sync.Data.Local.getAPIKey(), "");
|
||||
assert.equal(doc.getElementById('sync-authorized').getAttribute('hidden'), 'true');
|
||||
});
|
||||
|
||||
it("should not unlink on pressing cancel", function* () {
|
||||
getAPIKeyFromCredentialsStub.resolves(apiResponse);
|
||||
yield setCredentials("Username", "correctPassword");
|
||||
|
||||
waitForDialog(null, 'cancel');
|
||||
|
||||
yield win.Zotero_Preferences.Sync.unlinkAccount();
|
||||
assert.equal(Zotero.Sync.Data.Local.getAPIKey(), apiKey);
|
||||
assert.equal(doc.getElementById('sync-unauthorized').getAttribute('hidden'), 'true');
|
||||
});
|
||||
|
||||
})
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue