 helpers = require '../helpers/helpers.js'
 assert  = require 'assert'
 
-modalSelector = '.activity-modal.vm-settings'
-
-
 openVmSettingsModal = (browser, vmName) ->
+
+  modalSelector = '.activity-modal.vm-settings'
 
   if not vmName
     vmName = 'koding-vm-0'


  turnOffVm: (browser) ->

    linkSelector = modalSelector + ' .statustoggle .input-wrapper'

    helpers.beginTest(browser)
    helpers.waitForVMRunning(browser)


  openVmDomain: (browser) ->

    modalSelector = '.activity-modal.vm-settings'
    linkSelector  = modalSelector + ' .assigned-url .custom-link-view'

    helpers.beginTest(browser)
    helpers.waitForVMRunning(browser)
