Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
linkedin#52:  Changed accuracy to be +-16ms*skip_cycle
  • Loading branch information
SparshithNR committed Jun 27, 2017
1 parent b9ed1d5 commit f8a5b33
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion test/headless/specs/spaniel-observer.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ testModule('SpanielObserver', class extends SpanielObserverTestClass {
.evaluate(function() {
window.observer.unobserve(window.target);
})
.wait(20)
.wait(100)
.getExecution()
.evaluate(function() {
return window.STATE.impressions === 1 && window.STATE.completes === 1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ testModule('Impression Complete event', class extends WatcherTestClass {
.scrollTo(0)
.wait(RAF_THRESHOLD * SKIP_CYCLE)
.assert(function(e) {
return e.meta.duration >= 495 && e.meta.duration <= 545 && e.id === 5 && e.e === 'impression-complete';
return e.meta.duration >= ((IMPRESSION_THRESHOLD * 5) - (RAF_THRESHOLD * SKIP_CYCLE)) && e.meta.duration <= ((IMPRESSION_THRESHOLD * 5) (RAF_THRESHOLD * SKIP_CYCLE)) && e.id === 5 && e.e === 'impression-complete';
}, 1)
.done();
}
Expand Down
2 changes: 1 addition & 1 deletion test/headless/specs/watcher/impression-event.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const { time: { IMPRESSION_THRESHOLD, RAF_THRESHOLD, SMALL }, ITEM_TO_OBSERVE, S
testModule('Impression event', class extends WatcherTestClass {
['@test should not fire if item is exposed but not impressed']() {
return this.context.scrollTo(50)
.wait(RAF_THRESHOLD * 2)
.wait(RAF_THRESHOLD * SKIP_CYCLE)
.assertOnce(ITEM_TO_OBSERVE, 'exposed')
.assertNever(ITEM_TO_OBSERVE, 'impressed')
.assertOnce(ITEM_TO_OBSERVE, 'exposed')
Expand Down

0 comments on commit f8a5b33

Please sign in to comment.