       .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()
 


    sidebarSelector         = '.kdview.with-sidebar .logo-wrapper'
    collapseButton          = '.logo-wrapper .sidebar-close-handle'
    collapsedWindowSelector = '.kdview.with-sidebar.desktop.collapsed'

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

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

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

    browser
      .waitForElementVisible        fileTabSelector, 20000
      .pause                        3000 # wait for file tree to load
      .moveToElement                fileTabSelector, 5, 5
      .waitForElementVisible        collapseButton, 20000
      .click                        collapseButton
      .pause                        500
      .waitForElementVisible        collapsedWindowSelector, 20000
      .click                        fileTabSelector
      .pause                        500
      .waitForElementNotPresent     collapsedWindowSelector, 20000
      .click                        collapseButton
      .pause                        500
      .waitForElementVisible        collapsedWindowSelector, 20000
      .click                        settingsTabSelector
      .pause                        500
      .waitForElementNotPresent     collapsedWindowSelector, 20000
      .waitForElementVisible        settingsHeaderSelector, 20000
      .end()


