From 58ba061c66834eaec1ce4d01afdf77d1c5d054f0 Mon Sep 17 00:00:00 2001 From: BryceLTaylor Date: Wed, 11 Jul 2018 11:14:44 -0400 Subject: [PATCH 01/13] Make Travis use Saucelabs --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 365e0ab47..10938990f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -94,7 +94,7 @@ jobs: - cd test/integration - npm install - cd - - script: npm run smoke + script: npm run smoke-sauce stages: - test - name: smoke From 90d10dd417593dd12dcbec5c4d97c401353e3b55 Mon Sep 17 00:00:00 2001 From: BryceLTaylor Date: Wed, 11 Jul 2018 11:17:49 -0400 Subject: [PATCH 02/13] Name Sauce Labs tests to indicate when run by Travis --- test/integration/selenium-helpers.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/test/integration/selenium-helpers.js b/test/integration/selenium-helpers.js index dcd96476f..1839cba9f 100644 --- a/test/integration/selenium-helpers.js +++ b/test/integration/selenium-helpers.js @@ -3,6 +3,7 @@ const bindAll = require('lodash.bindall'); const headless = process.env.SMOKE_HEADLESS || false; const remote = process.env.SMOKE_REMOTE || false; +const travis = process.env.SMOKE_TRAVIS || false; const {SAUCE_USERNAME, SAUCE_ACCESS_KEY} = process.env; const {By, until} = webdriver; @@ -24,7 +25,13 @@ class SeleniumHelper { } buildDriver (name) { if (remote === 'true'){ - this.driver = this.getSauceDriver(SAUCE_USERNAME, SAUCE_ACCESS_KEY, name); + let nameToUse; + if (travis === 'true'){ + nameToUse = 'travis: ' + name; + } else { + nameToUse = name; + } + this.driver = this.getSauceDriver(SAUCE_USERNAME, SAUCE_ACCESS_KEY, nameToUse); } else { this.driver = this.getDriver(); } From b1fa09eef9467d83a4662143d8fa42b64d82902e Mon Sep 17 00:00:00 2001 From: BryceLTaylor Date: Wed, 11 Jul 2018 12:07:28 -0400 Subject: [PATCH 03/13] Include Travis build id in Sauce Labs test name --- test/integration/selenium-helpers.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/integration/selenium-helpers.js b/test/integration/selenium-helpers.js index 1839cba9f..cc1a7f9f3 100644 --- a/test/integration/selenium-helpers.js +++ b/test/integration/selenium-helpers.js @@ -4,6 +4,7 @@ const bindAll = require('lodash.bindall'); const headless = process.env.SMOKE_HEADLESS || false; const remote = process.env.SMOKE_REMOTE || false; const travis = process.env.SMOKE_TRAVIS || false; +const buildID = process.env.TRAVIS_BUILD_ID; const {SAUCE_USERNAME, SAUCE_ACCESS_KEY} = process.env; const {By, until} = webdriver; @@ -27,7 +28,7 @@ class SeleniumHelper { if (remote === 'true'){ let nameToUse; if (travis === 'true'){ - nameToUse = 'travis: ' + name; + nameToUse = 'travis ' + buildID + ' : ' + name; } else { nameToUse = name; } From fb8e0292ce113a2e7107a8360c5677be33655634 Mon Sep 17 00:00:00 2001 From: BryceLTaylor Date: Wed, 11 Jul 2018 13:21:57 -0400 Subject: [PATCH 04/13] Use Travis build Number rather than ID --- test/integration/selenium-helpers.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/integration/selenium-helpers.js b/test/integration/selenium-helpers.js index cc1a7f9f3..65fc2bd1a 100644 --- a/test/integration/selenium-helpers.js +++ b/test/integration/selenium-helpers.js @@ -4,7 +4,7 @@ const bindAll = require('lodash.bindall'); const headless = process.env.SMOKE_HEADLESS || false; const remote = process.env.SMOKE_REMOTE || false; const travis = process.env.SMOKE_TRAVIS || false; -const buildID = process.env.TRAVIS_BUILD_ID; +const buildID = process.env.TRAVIS_BUILD_NUMBER; const {SAUCE_USERNAME, SAUCE_ACCESS_KEY} = process.env; const {By, until} = webdriver; From 417ce0996e9f0987d44efe82bc49f92a8508b695 Mon Sep 17 00:00:00 2001 From: BryceLTaylor Date: Wed, 11 Jul 2018 14:50:04 -0400 Subject: [PATCH 05/13] =?UTF-8?q?Use=20Travis=E2=80=99s=20built=20in=20CI?= =?UTF-8?q?=20environment=20variable=20for=20tests?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/integration/selenium-helpers.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/integration/selenium-helpers.js b/test/integration/selenium-helpers.js index 65fc2bd1a..5b6e6e392 100644 --- a/test/integration/selenium-helpers.js +++ b/test/integration/selenium-helpers.js @@ -3,7 +3,7 @@ const bindAll = require('lodash.bindall'); const headless = process.env.SMOKE_HEADLESS || false; const remote = process.env.SMOKE_REMOTE || false; -const travis = process.env.SMOKE_TRAVIS || false; +const ci = process.env.CI || false; const buildID = process.env.TRAVIS_BUILD_NUMBER; const {SAUCE_USERNAME, SAUCE_ACCESS_KEY} = process.env; const {By, until} = webdriver; @@ -27,7 +27,7 @@ class SeleniumHelper { buildDriver (name) { if (remote === 'true'){ let nameToUse; - if (travis === 'true'){ + if (ci === 'true'){ nameToUse = 'travis ' + buildID + ' : ' + name; } else { nameToUse = name; From a46fd34e0d69fd26780acd22d915760430d06295 Mon Sep 17 00:00:00 2001 From: BryceLTaylor Date: Wed, 11 Jul 2018 15:11:36 -0400 Subject: [PATCH 06/13] Make Travis run tests on all branches --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 10938990f..33d4eb9fa 100644 --- a/.travis.yml +++ b/.travis.yml @@ -98,4 +98,4 @@ jobs: stages: - test - name: smoke - if: branch IN (travis) and type != pull_request + if: type != pull_request From 2dd9d5a27eec8a22f7f4e45ca55918f8eee60ff7 Mon Sep 17 00:00:00 2001 From: Colby Gutierrez-Kraybill Date: Wed, 18 Jul 2018 11:37:58 -0400 Subject: [PATCH 07/13] watchOptions required for use in docker environment MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This will work in both docker and outside of docker, and tunes the load on a docker container running webpack to not overly burden a local host’s cpu watching for changes. By default, webpack-dev-middleware is supposed to be watching, but in practice this seems to not be the case in docker containers, as fsevents are not passed through the NFS mount into a container and it requires explicit polling to enable watching for changes. --- dev-server/index.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/dev-server/index.js b/dev-server/index.js index 61874bd15..3386b621a 100644 --- a/dev-server/index.js +++ b/dev-server/index.js @@ -21,7 +21,15 @@ routes.forEach(route => { app.get(route.pattern, handler(route)); }); -app.use(webpackDevMiddleware(compiler)); +app.use(webpackDevMiddleware(compiler, + { + watchOptions: { + aggregateTimeout: 500, + poll: 2500, + ignored: ['node_modules','build'] + } + } +)); var proxyHost = process.env.FALLBACK || ''; if (proxyHost !== '') { From 1624c92ef4f15ff0881d7158a22d33dd9c243486 Mon Sep 17 00:00:00 2001 From: Colby Gutierrez-Kraybill Date: Wed, 18 Jul 2018 11:48:52 -0400 Subject: [PATCH 08/13] Add USE_DOCKER_WATCHOPTIONS Let docker containers to make use of watchOptions and polling --- docker-compose.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/docker-compose.yml b/docker-compose.yml index 8915d2b21..99af28a33 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -15,6 +15,7 @@ services: environment: - API_HOST=http://localhost:8491 - FALLBACK=http://localhost:8080 + - USE_DOCKER_WATCHOPTIONS=true build: context: ./ dockerfile: Dockerfile From a76e36054c07d28068e45c6536ec19f0555bbdcb Mon Sep 17 00:00:00 2001 From: Colby Gutierrez-Kraybill Date: Wed, 18 Jul 2018 11:49:52 -0400 Subject: [PATCH 09/13] Move watchOptions into middlewareOptions This creates middlewareOptions and a check on USE_DOCKER_WATCHOPTIONS as a pathway to have docker containers use polling for file system updates. --- dev-server/index.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/dev-server/index.js b/dev-server/index.js index 3386b621a..ee0f708c6 100644 --- a/dev-server/index.js +++ b/dev-server/index.js @@ -21,15 +21,18 @@ routes.forEach(route => { app.get(route.pattern, handler(route)); }); -app.use(webpackDevMiddleware(compiler, - { +var middlewareOptions = {}; +if (process.env.USE_DOCKER_WATCHOPTIONS) { + middlewareOptions = { watchOptions: { aggregateTimeout: 500, poll: 2500, ignored: ['node_modules','build'] } - } -)); + }; +} + +app.use(webpackDevMiddleware(compiler, middlewareOptions)); var proxyHost = process.env.FALLBACK || ''; if (proxyHost !== '') { From 19e141fc0e039e7cbf2094331519a2e375197dbf Mon Sep 17 00:00:00 2001 From: Colby Gutierrez-Kraybill Date: Wed, 18 Jul 2018 16:00:34 -0400 Subject: [PATCH 10/13] Fix linting issue with space after comma --- dev-server/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev-server/index.js b/dev-server/index.js index ee0f708c6..5ab70abbd 100644 --- a/dev-server/index.js +++ b/dev-server/index.js @@ -27,7 +27,7 @@ if (process.env.USE_DOCKER_WATCHOPTIONS) { watchOptions: { aggregateTimeout: 500, poll: 2500, - ignored: ['node_modules','build'] + ignored: ['node_modules', 'build'] } }; } From cd8d951fd64fc85df7d49c34037b36811c2ceffb Mon Sep 17 00:00:00 2001 From: Colby Gutierrez-Kraybill Date: Wed, 18 Jul 2018 16:02:22 -0400 Subject: [PATCH 11/13] Linting tests will not work if scratch-gui is linked directly into local directory MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We’re currently linking scratch-gui directly into the scratch-www directory (either through a bind mount in docker) or a symoblic link in unix. This causes the current make lint target to fail when it attempts to look in that directory for lint targets. Also, don’t bother linting node_modules --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 6fed25bde..f47cacb35 100644 --- a/Makefile +++ b/Makefile @@ -55,7 +55,7 @@ test: @make tap lint: - $(ESLINT) . --ext .js,.jsx,.json + $(ESLINT) --ignore-pattern scratch-gui --ignore-pattern node_modules . --ext .js,.jsx,.json $(SASSLINT) ./src/*.scss $(SASSLINT) ./src/**/*.scss From 5bf674a440930cf02df5f87c857c12c5111d8ae5 Mon Sep 17 00:00:00 2001 From: Colby Gutierrez-Kraybill Date: Thu, 19 Jul 2018 08:48:44 -0400 Subject: [PATCH 12/13] Move the eslint ignore from Makefile lint rule to into .eslintignore --- .eslintignore | 1 + Makefile | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.eslintignore b/.eslintignore index 941eaa3fb..322608d70 100644 --- a/.eslintignore +++ b/.eslintignore @@ -5,3 +5,4 @@ intl/* locales/* **/*.min.js **/node_modules/* +scratch-gui/* diff --git a/Makefile b/Makefile index f47cacb35..6fed25bde 100644 --- a/Makefile +++ b/Makefile @@ -55,7 +55,7 @@ test: @make tap lint: - $(ESLINT) --ignore-pattern scratch-gui --ignore-pattern node_modules . --ext .js,.jsx,.json + $(ESLINT) . --ext .js,.jsx,.json $(SASSLINT) ./src/*.scss $(SASSLINT) ./src/**/*.scss From 7de1cb80d69dac4ecd039b6d7c8054e22ae361e3 Mon Sep 17 00:00:00 2001 From: carljbowman Date: Sat, 21 Jul 2018 09:55:08 -0400 Subject: [PATCH 13/13] Fix new message highlight New messages should now have a blue backgroud (like they did previously). --- src/components/social-message/social-message.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/social-message/social-message.scss b/src/components/social-message/social-message.scss index 8dfc5db75..b6cdcc871 100644 --- a/src/components/social-message/social-message.scss +++ b/src/components/social-message/social-message.scss @@ -13,7 +13,7 @@ } .social-message.mod-unread { - background-color: lighten($ui-blue, 40); + background-color: $ui-blue-10percent; } .social-message.mod-unread .social-message-icon {