spec: add time for server to respond
This fixes some failing tests when upgrading to jQuery 3.5. refs FOO-4260 flag=none Test Plan: - Jenkins Passes [skip-crystalball] Change-Id: I44f320f0cc768fb7123e8e2ac405d379cf2a7c20 Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/341382 Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com> Reviewed-by: Michael Hulse <michael.hulse@instructure.com> QA-Review: Angela Gomba <angela.gomba@instructure.com> Product-Review: Angela Gomba <angela.gomba@instructure.com>
This commit is contained in:
parent
399e5ea8cb
commit
328720c016
|
@ -89,6 +89,7 @@ QUnit.module('Quizzes::LogAuditing::EventManager - Event delivery', {
|
|||
})
|
||||
|
||||
test('it should deliver events', function () {
|
||||
const clock = sinon.useFakeTimers()
|
||||
this.evtManager = new EventManager({
|
||||
autoDeliver: false,
|
||||
deliveryUrl: '/events',
|
||||
|
@ -112,8 +113,10 @@ test('it should deliver events', function () {
|
|||
)
|
||||
ok(this.evtManager.isDelivering(), 'it correctly reports whether a delivery is in progress')
|
||||
this.server.requests[0].respond(204)
|
||||
clock.tick(1)
|
||||
ok(!this.evtManager.isDelivering(), "it untracks the delivery once it's synced with the server")
|
||||
ok(!this.evtManager.isDirty(), 'it flushes its buffer when sync is complete')
|
||||
clock.restore()
|
||||
})
|
||||
|
||||
test('should ignore EVT_PAGE_FOCUSED events that are not preceded by EVT_PAGE_BLURRED', function () {
|
||||
|
|
Loading…
Reference in New Issue