   context 'when I use a Windows PC to view SSH instructions', ->
     before (done) ->
       browser.refresh ->
-        browser.eval "window.navigator = {platform: 'Win32'}", ->
-          wd40.click '.dataset-actions .git-ssh', ->
-            browser.waitForVisibleByCss '.modal', 4000, done
+        browser.eval "window.navigator = {platform: 'Win32'}", done
+
+    before clickSSHButton
+
+    before (done) ->
+      browser.waitForVisibleByCss '.modal', 4000, done
 
     before (done) =>
-        wd40.getText '.modal', (err, text) =>
-          @modalTextContent = text.toLowerCase()
-          done()
+      wd40.getText '.modal', (err, text) =>
+        @modalTextContent = text.toLowerCase()
+        done()
 
     it 'the modal window tells me to use Git Bash', =>
       @modalTextContent.should.include 'git bash'

should = require 'should'
{wd40, browser, login_url, home_url, prepIntegration} = require './helper'

describe 'Platform-specific SSH instructions', ->
  prepIntegration()

  context 'when I use a Mac to view SSH instructions', ->
    before (done) ->
      browser.refresh ->
        browser.eval "window.navigator = {platform: 'MacIntel'}", done

    before clickSSHButton

    before (done) ->
      browser.waitForVisibleByCss '.modal', 4000, done

    before (done) =>
      wd40.getText '.modal', (err, text) =>
        @modalTextContent = text.toLowerCase()
        done()

    it 'the modal window tells me to use the Terminal', =>
      @modalTextContent.should.include 'terminal'
