Skip to content

Commit

Permalink
Bug fxbox#16 - Add selenium, r=johanlorenzo
Browse files Browse the repository at this point in the history
  • Loading branch information
Michiel de Jong committed Feb 5, 2016
1 parent 3fca045 commit 75522fe
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@
# Generated by Cargo
/target/

# Used in selenium tests
node_modules
12 changes: 12 additions & 0 deletions .travis.yml
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
- RUST_BACKTRACE=1 cargo test
- cargo run > /dev/null & node test/selenium/ftu_test.js
4 changes: 2 additions & 2 deletions static/index.html
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>
10 changes: 10 additions & 0 deletions test/selenium/ftu_test.js
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();

0 comments on commit 75522fe

Please sign in to comment.