 describe "Mac Modal e2e test", ->
-  ptor = null
-
   beforeEach ->
     browser.get "/test/e2e/modal.html"
-    ptor = protractor.getInstance()
     browser.waitForAngular()
 
   it "should show the registered modal", ->


    modal = element(By.id("keyboard-modal"))

    ptor.actions().sendKeys(protractor.Key.ESCAPE).perform()

    expect(modal.isDisplayed()).toBeFalsy()


    button = element(By.id("open-overlay-btn"))
    button.click()

    modal = browser.findElement(By.id("overlay-modal"))
    browser.driver.executeScript("arguments[0].click()", modal).then ->
      expect(modal.isDisplayed()).toBeFalsy()
