           .click                    '.more-form .alwayson .koding-on-off'
           .pause                    1000
           .refresh()
-          .waitForElementVisible    '[testpath=main-sidebar]', 25000
-
-        openVmSettingsModal(browser, 'koding-vm-1')
-        clickMoreButtonInVMSettingsModal(browser)
-
-        browser
-          .waitForElementVisible   '.more-form .alwayson .koding-on-off.on', 20000
-          .end()
+          .waitForElementVisible    '[testpath=main-sidebar]', 25000, =>
+
+            openVmSettingsModal(browser, 'koding-vm-1')
+            clickMoreButtonInVMSettingsModal(browser) # Assertion
+
+            browser
+              .waitForElementVisible   '.more-form .alwayson .koding-on-off.on', 20000
+              .end()


        browser
          .pause 5000 # wait to see the modal
          .waitForElementVisible   modalSelector, 20000
          .waitForElementVisible   modalSelector + ' a.custom-link-view span', 20000
          .click                   modalSelector + ' a.custom-link-view span'
          .waitForElementVisible   pricingPage, 25000
          .waitForElementVisible   pricingPage + ' .plans .developer', 25000
          .pause 2000

    .moveToElement           vmSelector + ' span', 125, 20
    .click                   vmSelector + ' span'
    .waitForElementVisible   modalSelector, 20000 # Assertion
    .pause                   2500


clickMoreButtonInVMSettingsModal = (browser) ->

  browser
    .waitForElementVisible  '.settings form.with-fields .moreview', 20000
    .click                  '.settings form.with-fields .moreview'
    .pause                  2000


clickAddVMButton = (browser) ->
