From a0e4e0ce9ab867214e67dfef3d8303b89a3b49d3 Mon Sep 17 00:00:00 2001 From: Jeremy Press Date: Mon, 11 Dec 2017 10:18:11 -0800 Subject: [PATCH] Fix: Building preview before running tests (#537) --- .travis.yml | 2 +- functional-tests/base-test.js | 4 ++-- package.json | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 06dd6b735..83c80e6ff 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,7 +8,7 @@ addons: secure: EPjmiionirVVkbFbp9r4DjMLMcfmdj9Sq8UiMcIGGf5gQk0cV5sgJpDHUDlKhFL3na8FkYf27qadaaJHG9Lr7o1V6IN1tsLamD9kdQjeG1pUSZbyMoMbja9i8CY0/MnQPaPL8UBXbcPrJoBwPNp6PphZ1PtBW68oXale3Xdfd7JMyTtm8f6G40pxpDl50dKI2VZHKKrfWakFkK2DMM73vJScxCrlyJEDc+wSJi2Mr/lrZc/QYy3ug3BGq1S6vV6wsOCk/4Jx+W1hvqK0QBgIytv1XzypqDFJ0OiTiOccsbwvEUHOepQl0EQxBZtM9PO//SBMFc2TqAhldta37JFrEcOEtqrsHwqVELzRMJm9lDSSD+TSj/tri6Kevy311gboZsJh2T3Znkq2h5Zpx8ImbgZCKvQyn8bTSp9MOkb9bGt1tUkZ1LEk3Pj0PUEjFZMnAsT/fLg2EGdXRQWb1W/ZyknoNPfvsU5Po8obQ/AOlKMqaMM7YiGQWruL7Esml0XaiL9H1TSUwmtyAnAU+Q1eYv7II7SnQmVxcgILX7D7nAO82/jP2f12fszEOlgivLr0AS9iAMLcNsrTfSO2p60MESmc/2ZVGjIagNEaGohfb9AI5d0tezU6+GWijuRijVqn1x2rLbSXOV7c3G9yrJpGTru9WD3n/ekgVvg/0nanBpU= before_script: - python -m SimpleHTTPServer & -- sleep 15 +- sleep 5 stages: - ci - name: sauce-labs diff --git a/functional-tests/base-test.js b/functional-tests/base-test.js index c00a33245..309a156ad 100644 --- a/functional-tests/base-test.js +++ b/functional-tests/base-test.js @@ -43,9 +43,9 @@ describe('Base Test', () => { it('should load a file', () => { return this.browser - .wait(webdriver.until.elementLocated(webdriver.By.className('bp-loaded')), 10000) + .wait(webdriver.until.elementLocated(webdriver.By.className('bp-loaded')), 5000) .then((element) => { - this.browser.wait(webdriver.until.elementIsVisible(element), 10000).then((el) => { + this.browser.wait(webdriver.until.elementIsVisible(element), 5000).then((el) => { expect(el).to.not.equal(undefined); }); }); diff --git a/package.json b/package.json index 90716605f..fd37e18d3 100644 --- a/package.json +++ b/package.json @@ -103,7 +103,7 @@ "debug": "NODE_ENV=test ./node_modules/.bin/karma start build/karma.conf.js --no-single-run --auto-watch", "dev": "BABEL_ENV=dev NODE_ENV=dev ./node_modules/.bin/webpack --progress --colors --config build/webpack.config.js", "functional-tests": "python -m SimpleHTTPServer 8000 & node ./node_modules/mocha/bin/mocha --recursive ./functional-tests/ --timeout 10000 ; killall python -m SimpleHTTPServer 8000", - "functional-tests-ci": "node ./node_modules/mocha/bin/mocha ./functional-tests/ --timeout 10000", + "functional-tests-ci": "yarn run clean && yarn run build-ci && node ./node_modules/mocha/bin/mocha ./functional-tests/ --timeout 10000", "lint": "NODE_ENV=dev ./node_modules/.bin/eslint src/lib && ./node_modules/.bin/stylelint 'src/lib/**/*.scss'", "precommit": "lint-staged", "prepush": "yarn run lint",