-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #17 from michielbdejong/add-selenium
Bug #16 - Add selenium, r=johanlorenzo
- Loading branch information
Showing
4 changed files
with
26 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,3 +10,5 @@ | |
# Generated by Cargo | ||
/target/ | ||
|
||
# Used in selenium tests | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,18 @@ | ||
language: rust | ||
rust: | ||
- nightly | ||
|
||
before_script: | ||
- "sh -e /etc/init.d/xvfb start" | ||
- "export DISPLAY=:99.0" | ||
- "wget http://selenium-release.storage.googleapis.com/2.50/selenium-server-standalone-2.50.1.jar" | ||
- "java -jar selenium-server-standalone-2.50.1.jar > /dev/null &" | ||
- sleep 5 | ||
- nvm install 4.2 | ||
- nvm use 4.2 | ||
- npm install selenium-webdriver | ||
|
||
script: | ||
- cargo build # Linter is also executed here | ||
- RUST_BACKTRACE=1 cargo test | ||
- (cargo run > /dev/null &) ; node test/selenium/ftu_test.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>FoxLink</title> | ||
<title>FoxBox</title> | ||
</head> | ||
<body> | ||
<h1>Welcome To FoxLink!</h1> | ||
<h1>Welcome To FoxBox!</h1> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
var webdriver = require('selenium-webdriver'), | ||
until = require('selenium-webdriver').until; | ||
|
||
var driver = new webdriver.Builder(). | ||
forBrowser('firefox'). | ||
build(); | ||
|
||
driver.get('http://localhost:3000/'); | ||
driver.wait(until.titleIs('FoxBox'), 10000); | ||
driver.quit(); |