Fix various issues with rapid UI/data changes due to asyncification

This commit is contained in:
Dan Stillman 2015-05-05 02:35:04 -04:00
parent fc428f8e1b
commit 02a36eab9b
8 changed files with 69 additions and 42 deletions

View file

@ -1,11 +1,17 @@
describe("Zotero.DB", function() {
var tmpTable = "tmpDBTest";
before(function* () {
this.timeout(5000);
Zotero.debug("Waiting for DB activity to settle");
yield Zotero.DB.waitForTransaction();
yield Zotero.Promise.delay(1000);
});
beforeEach(function* () {
Zotero.DB.queryAsync("DROP TABLE IF EXISTS " + tmpTable);
yield Zotero.DB.queryAsync("DROP TABLE IF EXISTS " + tmpTable);
});
after(function* () {
Zotero.DB.queryAsync("DROP TABLE IF EXISTS " + tmpTable);
yield Zotero.DB.queryAsync("DROP TABLE IF EXISTS " + tmpTable);
});
describe("#executeTransaction()", function () {