fixed bug in spec. Has to be synchronous to work correctly

This commit is contained in:
Andy Gup 2014-09-08 17:12:33 -06:00
parent 6921982295
commit daf30a4039

View File

@ -452,7 +452,7 @@ describe("Attachments", function()
});
});
async.it("go Online", function(done)
it("go Online", function(done)
{
expect(g_featureLayers[3].graphics.length).toBe(2);
@ -492,28 +492,28 @@ describe("Attachments", function()
{
expect(success).toBeTruthy();
expect(result.count).toBe(2);
done();
// done();
});
});
expect(g_offlineFeaturesManager.getOnlineStatus()).toBe(g_offlineFeaturesManager.RECONNECTING);
});
async.it("no edits pending", function(done)
it("no edits pending", function(done)
{
expect(g_editsStore.pendingEditsCount()).toBe(0);
done();
// done();
});
async.it("no attachments pending", function(done)
it("no attachments pending", function(done)
{
g_offlineFeaturesManager.attachmentsStore.getUsage(function(usage)
{
expect(usage.attachmentCount).toBe(0);
done();
// done();
});
});
async.it("query attachments info - online - 1", function(done)
it("query attachments info - online - 1", function(done)
{
g_featureLayers[3].queryAttachmentInfos(g1_online.attributes.objectid,
function(attachmentsInfo)
@ -521,16 +521,16 @@ describe("Attachments", function()
expect(attachmentsInfo.length).toBe(1);
expect(attachmentsInfo[0].objectId).toBe(g1_online.attributes.objectid);
expect(attachmentsInfo[0].id).toBeGreaterThan(0);
done();
// done();
},
function(err)
{
expect(true).toBeFalsy();
done();
// done();
});
});
async.it("query attachments info - online - 2", function(done)
it("query attachments info - online - 2", function(done)
{
g_featureLayers[3].queryAttachmentInfos(g2_offline.attributes.objectid,
function(attachmentsInfo)
@ -538,12 +538,12 @@ describe("Attachments", function()
expect(attachmentsInfo.length).toBe(1);
expect(attachmentsInfo[0].objectId).toBe(g2_offline.attributes.objectid);
expect(attachmentsInfo[0].id).toBeGreaterThan(0);
done();
// done();
},
function(err)
{
expect(true).toBeFalsy();
done();
// done();
});
});
});