       .moveToElement             sidebarSelector, 5, 5
       .waitForElementVisible     collapseButton, 20000
       .click                     collapseButton
+      .pause                     500
       .waitForElementVisible     collapsedWindowSelector, 20000
       .moveToElement             sidebarSelector, 5, 5
+      .pause                     2000 # wait for hidden button to be displayed
+      .click                     hiddenExpandSelector
+      .pause                     500
       .waitForElementNotPresent  collapsedWindowSelector, 20000
       .end()
 

    settingsTabSelector     = "#{tabSelector} .settings"
    collapseButton          = '.application-tab-handle-holder .general-handles'
    collapsedWindowSelector = '.kdview.kdscrollview.kdsplitview-panel.panel-0.floating'
    settingsHeaderSelector  = '.kdsplitview-panel.panel-0 .settings-header'

    user = helpers.beginTest(browser)
    helpers.waitForVMRunning(browser)

    browser
      .waitForElementVisible        fileTabSelector, 20000
      .moveToElement                fileTabSelector, 5, 5
      .waitForElementVisible        collapseButton, 20000
      .click                        collapseButton
      .waitForElementVisible        collapsedWindowSelector, 20000
      .click                        fileTabSelector
      .waitForElementNotPresent     collapsedWindowSelector, 20000
      .click                        collapseButton
      .waitForElementVisible        collapsedWindowSelector, 20000
      .click                        settingsTabSelector
      .waitForElementNotPresent     collapsedWindowSelector, 20000
      .assert.containsText          settingsHeaderSelector, 'Editor Settings'
      .end()




    sidebarSelector         = '.kdview.with-sidebar .logo-wrapper'
    collapseButton          = '.logo-wrapper .sidebar-close-handle'
    collapsedWindowSelector = '.kdview.with-sidebar#kdmaincontainer.collapsed'
    hiddenExpandSelector    = '.sidebar-close-handle.hidden .icon'

    user = helpers.beginTest(browser)
    helpers.waitForVMRunning(browser)
