From 9768d1843d580a1adf5744b938a3e03b26498b05 Mon Sep 17 00:00:00 2001 From: Anna Tong Date: Mon, 23 Feb 2015 17:29:58 -0800 Subject: [PATCH] [TEST] Travis: Add e2e tests --- .travis.yml | 7 ++++++- test/selenium/interpreter_config.json | 23 +++++++++++++++++++++++ test/selenium/tests/openRT.json | 25 +++++++++++++++++++++++++ 3 files changed, 54 insertions(+), 1 deletion(-) create mode 100644 test/selenium/interpreter_config.json create mode 100644 test/selenium/tests/openRT.json diff --git a/.travis.yml b/.travis.yml index 618c2905c..ad845338b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,7 +9,8 @@ before_script: - "cp src/js/config-example.js src/js/config.js" - npm install -g bower - bower install -script: "grunt && npm run test-travis" + - npm install -g se-interpreter +script: "grunt && npm run test-travis && se-interpreter test/selenium/interpreter_config.json" notifications: email: false @@ -19,3 +20,7 @@ notifications: on_success: change on_failure: always on_start: false +env: + global: + - SAUCE_USERNAME=tonga + - secure: "VJFHj5fr46Qf7h34xa/W6FmGvknPH57eQLJoEjKlZUYn0EGx9EliCdENfzAbtr3e4GnNvQh6X2bLA/lB7TRzoD84oyGkllkMayevQm/dViJbUBQsl7HOa6VwUwugW+o7T3+vPM4y5qqFv1B/fs3Fthl+eKUatccy9qK4xra1Hso=" diff --git a/test/selenium/interpreter_config.json b/test/selenium/interpreter_config.json new file mode 100644 index 000000000..17c3e9224 --- /dev/null +++ b/test/selenium/interpreter_config.json @@ -0,0 +1,23 @@ +{ + "type": "interpreter-config", + "configurations": [ + { + "settings": [ + { + "driverOptions": { + "host": "ondemand.saucelabs.com", + "port": 80 + }, + "browserOptions": { + "browserName": "googlechrome", + "username": "${SAUCE_USERNAME}", + "accessKey": "${SAUCE_ACCESS_KEY}" + } + } + ], + "scripts": [ + "test/selenium/tests/*" + ] + } + ] +} diff --git a/test/selenium/tests/openRT.json b/test/selenium/tests/openRT.json new file mode 100644 index 000000000..be94ba9f7 --- /dev/null +++ b/test/selenium/tests/openRT.json @@ -0,0 +1,25 @@ +{ + "type": "script", + "seleniumVersion": "2", + "formatVersion": 2, + "steps": [ + { + "type": "get", + "url": "https://www.rippletrade.com/" + }, + { + "type": "waitForTextPresent", + "text": "XRP" + }, + { + "type": "verifyTextPresent", + "text": "Trade hundreds of assets, from XRP to crypto to gold to fiat." + } + ], + "data": { + "configs": {}, + "source": "none" + }, + "inputs": [], + "timeoutSeconds": 60 +} \ No newline at end of file