From b94e02c3aa814075bfc477e80e4f5cf0134fc317 Mon Sep 17 00:00:00 2001 From: Beni Cherniavsky-Paskin Date: Sun, 28 May 2017 01:29:31 +0300 Subject: [PATCH 1/5] [test] wait longer for math Was consistently timing out in IE8 on XP. --- test/browser-on-saucelabs.spec.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/browser-on-saucelabs.spec.coffee b/test/browser-on-saucelabs.spec.coffee index caa10f3..6780712 100644 --- a/test/browser-on-saucelabs.spec.coffee +++ b/test/browser-on-saucelabs.spec.coffee @@ -142,7 +142,7 @@ describeBrowserTest = (browserName, getDesired, getSite) -> expect(err).to.be(null) browser.waitFor wd.asserters.jsCondition('document.title.match(/smoke test/)'), 10*sec, (err, value) -> expect(err).to.be(null) - browser.waitForElementByCss '.MathJax_Display', 15*sec, (err, el) -> + browser.waitForElementByCss '.MathJax_Display', 30*sec, (err, el) -> expect(err).to.be(null) el.text (err, text) -> expect(err).to.be(null) From 81500482694c73b4830257e53d509df56843a003 Mon Sep 17 00:00:00 2001 From: Beni Cherniavsky-Paskin Date: Sun, 28 May 2017 01:32:32 +0300 Subject: [PATCH 2/5] [test] bump chrome on linux a few versions Shooting in the dark, in hope to resolve consistent error "[element.text()] Error response status: 13, , UnknownError - An unknown server-side error occurred while processing the command. Selenium error: unknown error: Cannot read property 'OTransform' of null\n (Session info: chrome=30.0.1599.114)\n (Driver info: chromedriver=2.4.226074,platform=Linux 3.13.0-83-generic x86)","status":13,"cause":{"status":13,"sessionId":"92f393cc5c354032a0a3f9846fc70a8d","value":{"message":"unknown error: Cannot read property 'OTransform' of null\n (Sessi..." --- test/browser-on-saucelabs.spec.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/browser-on-saucelabs.spec.coffee b/test/browser-on-saucelabs.spec.coffee index 6780712..2f35c9c 100644 --- a/test/browser-on-saucelabs.spec.coffee +++ b/test/browser-on-saucelabs.spec.coffee @@ -50,7 +50,7 @@ desiredBrowsers = [ {browserName: 'MicrosoftEdge'} # arbitrary somewhat old - but not ancient - FF and Chrome versions. {browserName: 'firefox', version: '30.0', platform: 'Linux'} - {browserName: 'chrome', version: '30.0', platform: 'Linux'} + {browserName: 'chrome', version: '35.0', platform: 'Linux'} {browserName: 'safari', version: '9.0'} {browserName: 'safari', version: '6.0'} # Mobile (doesn't mean it's usable though): From d26b602caee0604aa1e48f3649aedefbb0e6e176 Mon Sep 17 00:00:00 2001 From: Beni Cherniavsky-Paskin Date: Fri, 29 Sep 2017 11:26:18 +0300 Subject: [PATCH 3/5] Sauce Labs: specify/bump some versions Mobile safari errored The Sauce VMs failed to start the browser or device. Docs say more fields are required https://wiki.saucelabs.com/display/DOCS/Test+Configuration+Options#TestConfigurationOptions-RequiredAppiumTestConfigurationSettings and this helped. Safari 6 on OS X 10.8 and IE 8 on Win XP are not available. Platform configurator still offers them https://wiki.saucelabs.com/display/DOCS/Platform+Configurator#/ but https://saucelabs.com/platforms shows these OSes are no longer supported (both are long EOL anyway). --- test/browser-on-saucelabs.spec.coffee | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/browser-on-saucelabs.spec.coffee b/test/browser-on-saucelabs.spec.coffee index 2f35c9c..9eaca7f 100644 --- a/test/browser-on-saucelabs.spec.coffee +++ b/test/browser-on-saucelabs.spec.coffee @@ -45,17 +45,17 @@ timeouts = { desiredBrowsers = [ # Generated with https://docs.saucelabs.com/reference/platforms-configurator/ # Desktop: - {browserName: 'internet explorer', version: '8.0', platform: 'Windows XP'} + {browserName: 'internet explorer', version: '8.0', platform: 'Windows 7'} {browserName: 'internet explorer', version: '11.0', platform: 'Windows 10'} {browserName: 'MicrosoftEdge'} # arbitrary somewhat old - but not ancient - FF and Chrome versions. {browserName: 'firefox', version: '30.0', platform: 'Linux'} {browserName: 'chrome', version: '35.0', platform: 'Linux'} - {browserName: 'safari', version: '9.0'} - {browserName: 'safari', version: '6.0'} + {browserName: 'Safari', version: '10.0', platform: 'macOS 10.12'} + {browserName: 'Safari', version: '7.0', platform: 'OS X 10.9'} # Mobile (doesn't mean it's usable though): - {browserName: 'safari', deviceName: 'iPad Simulator', platformVersion: '8.4'} - {browserName: 'android', deviceName: 'Android Emulator', platformVersion: '4.0'} + {browserName: 'Safari', deviceName: 'iPad Simulator', platformName: 'iOS', platformVersion: '8.4'} + {browserName: 'Browser', deviceName: 'Android Emulator', platformName: 'Android', platformVersion: '4.4'} ] getCommonDesired = -> From 2eace77c786df5a3d1f884894689bee959bd36b3 Mon Sep 17 00:00:00 2001 From: Beni Cherniavsky-Paskin Date: Fri, 29 Sep 2017 11:56:38 +0300 Subject: [PATCH 4/5] Specify NodeJS 8, should fix "SyntaxError: Use of const in strict mode." --- .travis.yml | 6 +++++- package.json | 3 +++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index f9a2de6..efa5c86 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,8 +11,12 @@ branches: - /.*/ language: node_js +# Should test the Node version that runs in production. +# https://docs.travis-ci.com/user/languages/javascript-with-nodejs/#Specifying-Node.js-versions +# https://devcenter.heroku.com/articles/nodejs-support#specifying-a-node-js-version +# I believe RHcloud (openshift 2) was running 0.11 but it's being sunset anyway. node_js: - - "0.11" # Latest http://docs.travis-ci.com/user/languages/javascript-with-nodejs/#Provided-Node.js-Versions + - "8" # http://blog.travis-ci.com/2013-12-05-speed-up-your-builds-cache-your-dependencies/ cache: diff --git a/package.json b/package.json index 175f004..fa52789 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,9 @@ "sync-exec": "~0.6.2", "wd": "~1.0.0" }, + "engines": { + "node": "8.x" + }, "main": "server.coffee", "scripts": { "start": "coffee server.coffee", From f73b2338b43fd4c2c9f0d373e36e609eecc34214 Mon Sep 17 00:00:00 2001 From: Beni Cherniavsky-Paskin Date: Fri, 29 Sep 2017 12:26:01 +0300 Subject: [PATCH 5/5] Comment out failing Android test for now Closes #170. It fails on title becoming set from first line. Bumping 4.4->5.0, 10s->20s, didn't help. But manual testing shows Mathdown does load & render math. For #173, I urgently need CI that can give me pass/fail, and Android is not very usable anyway (#81), so commenting out. --- test/browser-on-saucelabs.spec.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/browser-on-saucelabs.spec.coffee b/test/browser-on-saucelabs.spec.coffee index 9eaca7f..f8f5e6b 100644 --- a/test/browser-on-saucelabs.spec.coffee +++ b/test/browser-on-saucelabs.spec.coffee @@ -55,7 +55,7 @@ desiredBrowsers = [ {browserName: 'Safari', version: '7.0', platform: 'OS X 10.9'} # Mobile (doesn't mean it's usable though): {browserName: 'Safari', deviceName: 'iPad Simulator', platformName: 'iOS', platformVersion: '8.4'} - {browserName: 'Browser', deviceName: 'Android Emulator', platformName: 'Android', platformVersion: '4.4'} +# {browserName: 'Browser', deviceName: 'Android Emulator', platformName: 'Android', platformVersion: '4.4'} ] getCommonDesired = ->