       editorScrollRatio = editorElement.getScrollTop() / (editorElement.getScrollHeight() - editorElement.getHeight())
 
     it 'scales the editor scroll based on the minimap scale factor', ->
-      expect(minimap.getTextEditorScaledScrollTop()).toEqual(500)
-      expect(minimap.getTextEditorScaledScrollLeft()).toEqual(200 * minimap.getHorizontalScaleFactor())
+      expect(minimap.getTextEditorScaledScrollTop()).toEqual(1000 * minimapVerticalScaleFactor)
+      expect(minimap.getTextEditorScaledScrollLeft()).toEqual(200 * minimapHorizontalScaleFactor)
 
     it 'computes the offset to apply based on the editor scroll top', ->
       expect(minimap.getScrollTop()).toEqual(editorScrollRatio * minimap.getMaxScrollTop())

    expect(minimap.getHeight()).toEqual(editor.getScreenLineCount() * 5)

  it 'measures the scaling factor between the editor and the minimap', ->
    expect(minimap.getVerticalScaleFactor()).toEqual(0.5)
    expect(minimap.getHorizontalScaleFactor()).toEqual(2 / editor.getDefaultCharWidth())

  it 'measures the editor visible area size at minimap scale', ->
    editor.setText(largeSample)
    expect(minimap.getTextEditorScaledHeight()).toEqual(25)

  it 'measures the available minimap scroll', ->
    editor.setText(largeSample)

    jasmine.attachToDOM(editorElement)
    editorElement.setHeight(50)
    editorElement.setWidth(200)

    minimapVerticalScaleFactor = 5 / editor.getLineHeightInPixels()
    minimapHorizontalScaleFactor = 2 / editor.getDefaultCharWidth()

    dir = atom.project.getDirectories()[0]

