Skip to content

Commit

Permalink
Add test for testing download button. (comment out logs for determine…
Browse files Browse the repository at this point in the history
…-os.js)
  • Loading branch information
ElliDy committed Mar 16, 2015
1 parent 6621934 commit 03b106b
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 2 deletions.
4 changes: 2 additions & 2 deletions public/javascripts/determine-os.js
Expand Up @@ -84,8 +84,8 @@ switch (os) {
requiredOS = [requiredOSWin, requiredOSMac];
break;
}
console.info("OS: " + os + ", Version:" + osVersion) ;
console.log('available', downloadAvailable)
//console.info("OS: " + os + ", Version:" + osVersion) ;
//console.log('available', downloadAvailable)
if(downloadAvailable){
document.getElementById('download_available').setAttribute('style','display:block;');
}
Expand Down
@@ -0,0 +1,26 @@
package com.yetu.oauth2provider.integration

import com.yetu.oauth2provider.base.BaseMethods
import org.scalatestplus.play.{ OneServerPerSuite, OneBrowserPerSuite, HtmlUnitFactory, PlaySpec }
import play.api.Logger

/**
* Created by elisahilprecht on 16/03/15.
*/
class IntegrationSetupSpec extends PlaySpec with OneServerPerSuite with OneBrowserPerSuite with HtmlUnitFactory with BaseMethods {

"Download page" must {
"title must be 'Download'" in {
go to (s"http://localhost:$port" + setupDownloadUrl)
pageTitle mustBe "Download"
Logger.info(pageSource)

}
"show new content when clicking on download" in {
//TODO: why it is a windows user agent
find(id("download_win1")) must be ('defined)
click on find(id("download_win1")).value
eventually { find(id("fullContainer")) must be ('defined) }
}
}
}

0 comments on commit 03b106b

Please sign in to comment.