Commit 8cafdd2c authored by csillag's avatar csillag

Simplify a test case

parent c8e538bf
......@@ -665,14 +665,9 @@ describe 'Annotator.Plugin.EnhancedAnchoring', ->
ann = createTestAnnotationForPages "a1", [10]
anchor = am.createAnchor(ann, ann.target[0]).result
am.document.currentIndex = 5 # We start from page 5
am.document.setPageIndex = sinon.spy (index) ->
am.document.currentIndex = index
if index is 9
renderPage am.document, 9
renderPage am.document, 10
# Now we trigger the actual action
anchor.scrollIntoView().then ->
anchor.scrollIntoView()
assert.calledWith am.document.setPageIndex, 9
it 'gets the wanted page rendered', ->
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment