           it "will still have a line", ->
             range = new Range(new Point(8, 2), new Point(8, 5))
             editor.setSelectedBufferRange(range)
-            expect(atom.workspaceView
-              .find('.line.highlight-line-multi-line-solid-bottom'))
-              .toHaveLength(1)
+            expect(
+              editorElement.shadowRoot.querySelectorAll(
+                '.line.highlight-line-multi-line-solid-bottom'
+              )
+            ).toHaveLength(1)
 
       describe "when dashed settings has been set", ->
         beforeEach ->

path = require 'path'
{WorkspaceView, Range, Point} = require 'atom'
HighlightSelected = require '../lib/highlight-line'

describe "DecorationExample", ->
  [activationPromise, editor, editorView, highlightLine] = []

  beforeEach ->
    atom.workspaceView = new WorkspaceView
    atom.project.setPath(path.join(__dirname, 'fixtures'))

    waitsForPromise ->
      atom.workspace.open('sample.coffee')

    runs ->
      atom.workspaceView.attachToDom()
      editorView = atom.workspaceView.getActiveView()
      editor = editorView.getEditor()

      activationPromise = atom.packages
        .activatePackage('highlight-line').then ({mainModule}) ->

          editor.setSelectedBufferRange(range)

        it "adds an underline to the current line", ->
          expect(
            editorElement.shadowRoot.querySelectorAll(
              '.cursor-line.highlight-line-multi-line-dashed-bottom'
            )
          ).toHaveLength(1)

      describe "when dotted settings has been set", ->
        beforeEach ->
