diff --git a/.gemini.js b/.gemini.js index cc06320458..97b0a8ee53 100644 --- a/.gemini.js +++ b/.gemini.js @@ -6,7 +6,7 @@ module.exports = { windowSize: '1024x768', httpTimeout: 60000, - retry: 2, + retry: 1, sessionsPerBrowser: 3, suitesPerSession: 150, @@ -23,8 +23,6 @@ module.exports = { system: { debug: false, exclude: [ - '.build/', - 'coverage/', '*demo/', 'docs/', 'gemini/screens/', @@ -34,6 +32,7 @@ module.exports = { ], plugins: { babel: true, + 'html-reporter': {}, optipng: true, react: { jsModules: [ @@ -45,6 +44,7 @@ module.exports = { }, 'saucelabs-info': {} }, + projectRoot: './', tempDir: './' } }; diff --git a/.travis.yml b/.travis.yml index ee55abf539..f460d213d5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,10 +20,10 @@ install: before_script: - | - if [ "${TEST_SCOPE}" == "gemini" ]; then - curl -L https://gist.githubusercontent.com/teryaew/ab7c8a1c377ba0796f20a007a1d830eb/raw/sauce-connect.sh | bash - cat .gemini.js - fi + if [ "${TEST_SCOPE}" == "gemini" ]; then + curl -L https://gist.githubusercontent.com/teryaew/ab7c8a1c377ba0796f20a007a1d830eb/raw/sauce-connect.sh | bash + cat .gemini.js + fi script: - if [ "${TEST_SCOPE}" == "lint" ]; then yarn lint; fi @@ -31,6 +31,12 @@ script: - if [ "${TEST_SCOPE}" == "mobile_unit" ]; then MOBILE=1 yarn test; fi - if [ "${TEST_SCOPE}" == "gemini" ]; then yarn gemini-ci; fi +after_script: + - | + if [ "${TEST_SCOPE}" == "gemini" ]; then + kill -9 `lsof -i :4445 -t` + fi + after_success: - | if [ "${TRAVIS_BRANCH}" == "master" ]; then diff --git a/CHANGELOG.md b/CHANGELOG.md index bc3e9f828d..71f801991a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,14 @@ + +## [7.0.2](https://github.com/alfa-laboratory/arui-feather/compare/v7.0.1...v7.0.2) (2017-07-03) + + +### Bug Fixes + +* **fantasy:** fix form controls styles with disabled & invalid simultaneous states ([#141](https://github.com/alfa-laboratory/arui-feather/issues/141)) ([e2fd3c6](https://github.com/alfa-laboratory/arui-feather/commit/e2fd3c6)) +* **fantasy:** fix link border colors ([#143](https://github.com/alfa-laboratory/arui-feather/issues/143)) ([cc5f9d2](https://github.com/alfa-laboratory/arui-feather/commit/cc5f9d2)) + + + ## [7.0.1](https://github.com/alfa-laboratory/arui-feather/compare/v7.0.0...v7.0.1) (2017-06-30) diff --git a/gemini-utils/gemini-ci.js b/gemini-utils/gemini-ci.js new file mode 100644 index 0000000000..01b99a074b --- /dev/null +++ b/gemini-utils/gemini-ci.js @@ -0,0 +1,38 @@ +/* eslint import/no-extraneous-dependencies: [2, {"devDependencies": true}] */ +/* eslint no-confusing-arrow: 0 */ +/* eslint strict: [0, "global"] */ + +'use strict'; + +const Gemini = require('gemini/api'); +const Events = require('gemini/lib/constants/events'); +const handleErrors = require('gemini/lib/cli/errors').handleErrors; +const checkForDeprecations = require('gemini/lib/cli/deprecations').checkForDeprecations; +const handleUncaughtExceptions = require('gemini/lib/cli/errors').handleUncaughtExceptions; + +function exit(code) { + process.exit(code); +} + +function promiseTry(func) { + return new Promise(resolve => resolve(func())); +} + +function runGemini(paths = []) { + handleUncaughtExceptions(); + + return promiseTry(() => { + checkForDeprecations(); + + const gemini = new Gemini(); + gemini.on(Events.INTERRUPT, (data) => { exit(data.exitCode); }); + + return gemini; + }) + .then(gemini => gemini.test(paths, { reporters: [{ name: 'flat' }] })) + .then(stats => stats.failed > 0 ? 2 : 0) + .catch(handleErrors) + .then(exit); +} + +runGemini(); diff --git a/package-lock.json b/package-lock.json index 83c941bb60..bc0cca1f7e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "arui-feather", - "version": "7.0.1", + "version": "7.0.2", "lockfileVersion": 1, "dependencies": { "abbrev": { diff --git a/package.json b/package.json index e387a2f2fc..9d6a3f49cc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "arui-feather", - "version": "7.0.1", + "version": "7.0.2", "description": "Alfa-Bank UI lightweight library", "repository": { "type": "git", @@ -13,9 +13,9 @@ "lint-js": "eslint ./*.js ./src/ ./demo/ ./gemini/ ./arui-demo/components --ext .js,.jsx", "lint-md": "eslint -c .eslintrc.styleguide.js ./src/ --ext .md", "lint-css": "stylelint ./src/**/*.css ./arui-demo/**/*.css", - "gemini": "gemini test --reporter html --reporter flat --grep=`env | grep '^SUITES' | awk -F= '{print $NF}'`", + "gemini": "gemini test --grep=`env | grep '^SUITES' | awk -F= '{print $NF}'`", + "gemini-ci": "node ./gemini-utils/gemini-ci.js", "gemini-update": "ALL_SIZES=1 gemini update --grep=`env | grep '^SUITES' | awk -F= '{print $NF}'`", - "gemini-ci": "run-p -r gemini", "build": "webpack", "_changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0", "release-patch": "npm version patch -m 'chore(*): patch version'", @@ -121,6 +121,7 @@ "gemini-react": "^0.11.0", "gemini-saucelabs-info": "^1.0.0", "gulp": "^3.9.1", + "html-reporter": "^0.2.0", "husky": "^0.13.3", "isparta-loader": "^2.0.0", "istanbul": "^0.4.2", @@ -140,7 +141,6 @@ "lint-staged": "^3.6.1", "mocha": "^3.4.2", "node-noop": "^1.0.0", - "npm-run-all": "^4.0.2", "react-docgen": "^2.15.0", "react-frame-component": "^1.1.0", "react-hot-loader": "3.0.0-beta.1", diff --git a/src/input/fantasy/input.css b/src/input/fantasy/input.css index 624df1df88..8d0100f88b 100644 --- a/src/input/fantasy/input.css +++ b/src/input/fantasy/input.css @@ -442,21 +442,3 @@ line-height: 58px; } } - -.input.input_invalid { - .input__top, - .input__sub { - color: var(--color-error); - } - - .input__box { - border-bottom-color: var(--color-error-translucent); - } - - &.input_focused { - .input__box { - border-bottom-color: var(--color-error-translucent); - box-shadow: inset 0 -1px 0 var(--color-error-translucent); - } - } -} diff --git a/src/input/fantasy/input_theme_alfa-on-color.css b/src/input/fantasy/input_theme_alfa-on-color.css index 9d91890319..30f9c51cba 100644 --- a/src/input/fantasy/input_theme_alfa-on-color.css +++ b/src/input/fantasy/input_theme_alfa-on-color.css @@ -64,6 +64,24 @@ } } + &.input_invalid { + .input__top, + .input__sub { + color: var(--color-error); + } + + .input__box { + border-bottom-color: var(--color-error-translucent); + } + + &.input_focused { + .input__box { + border-bottom-color: var(--color-error-translucent); + box-shadow: inset 0 -1px 0 var(--color-error-translucent); + } + } + } + &.input_size_s .input__clear, &.input_size_m .input__clear { background-size: 10px; diff --git a/src/input/fantasy/input_theme_alfa-on-white.css b/src/input/fantasy/input_theme_alfa-on-white.css index 934181c2d0..e221cfb429 100644 --- a/src/input/fantasy/input_theme_alfa-on-white.css +++ b/src/input/fantasy/input_theme_alfa-on-white.css @@ -64,6 +64,24 @@ } } + &.input_invalid { + .input__top, + .input__sub { + color: var(--color-error); + } + + .input__box { + border-bottom-color: var(--color-error-translucent); + } + + &.input_focused { + .input__box { + border-bottom-color: var(--color-error-translucent); + box-shadow: inset 0 -1px 0 var(--color-error-translucent); + } + } + } + &.input_size_s .input__clear, &.input_size_m .input__clear { background-size: 10px; diff --git a/src/link/fantasy/link.css b/src/link/fantasy/link.css index 6edc6c5c3e..59c37ee64c 100644 --- a/src/link/fantasy/link.css +++ b/src/link/fantasy/link.css @@ -81,7 +81,7 @@ color: var(--color-content-accent-alfa-on-color); .link__text { - border-color: rgba(255, 255, 255, 1); + border-color: rgba(--color-content-accent-alfa-on-color); } } @@ -99,10 +99,10 @@ &.link_hovered, &.link_focused { - color: var(--color-content-heavy-accent-alfa-on-white); + color: var(--color-content-accent-alfa-on-white); .link__text { - border-color: var(--color-accent-translucent); + border-color: var(--color-content-accent-alfa-on-white); } } diff --git a/src/select/fantasy/select.css b/src/select/fantasy/select.css index 7b56ac54ab..ccb55fb6d8 100644 --- a/src/select/fantasy/select.css +++ b/src/select/fantasy/select.css @@ -246,9 +246,3 @@ } } } - -.select.select_invalid { - .select__sub { - color: var(--color-error); - } -} diff --git a/src/select/fantasy/select_theme_alfa-on-color.css b/src/select/fantasy/select_theme_alfa-on-color.css index 683087fa40..6fdb704985 100644 --- a/src/select/fantasy/select_theme_alfa-on-color.css +++ b/src/select/fantasy/select_theme_alfa-on-color.css @@ -56,6 +56,10 @@ } &.select_invalid { + .select__sub { + color: var(--color-error); + } + .select-button { border-bottom-color: var(--color-error-translucent); } diff --git a/src/select/fantasy/select_theme_alfa-on-white.css b/src/select/fantasy/select_theme_alfa-on-white.css index fb81299c45..63304ac9d5 100644 --- a/src/select/fantasy/select_theme_alfa-on-white.css +++ b/src/select/fantasy/select_theme_alfa-on-white.css @@ -56,6 +56,10 @@ } &.select_invalid { + .select__sub { + color: var(--color-error); + } + .select-button { border-bottom-color: var(--color-error-translucent); } diff --git a/src/textarea/fantasy/textarea.css b/src/textarea/fantasy/textarea.css index 742d234f1a..9275e7416d 100644 --- a/src/textarea/fantasy/textarea.css +++ b/src/textarea/fantasy/textarea.css @@ -259,21 +259,3 @@ } } } - -.textarea.textarea_invalid { - .textarea__top, - .textarea__sub { - color: var(--color-error); - } - - .textarea__control { - border-bottom-color: var(--color-error-translucent); - } - - &.textarea_focused { - .textarea__control { - border-bottom-color: var(--color-error-translucent); - box-shadow: inset 0 -1px 0 var(--color-error-translucent); - } - } -} diff --git a/src/textarea/fantasy/textarea_theme_alfa-on-color.css b/src/textarea/fantasy/textarea_theme_alfa-on-color.css index a9c7fe3651..8de76bcd89 100644 --- a/src/textarea/fantasy/textarea_theme_alfa-on-color.css +++ b/src/textarea/fantasy/textarea_theme_alfa-on-color.css @@ -41,4 +41,22 @@ border-bottom-style: dotted; } } + + &.textarea_invalid { + .textarea__top, + .textarea__sub { + color: var(--color-error); + } + + .textarea__control { + border-bottom-color: var(--color-error-translucent); + } + + &.textarea_focused { + .textarea__control { + border-bottom-color: var(--color-error-translucent); + box-shadow: inset 0 -1px 0 var(--color-error-translucent); + } + } + } } diff --git a/src/textarea/fantasy/textarea_theme_alfa-on-white.css b/src/textarea/fantasy/textarea_theme_alfa-on-white.css index ae777bbaec..838fd857cc 100644 --- a/src/textarea/fantasy/textarea_theme_alfa-on-white.css +++ b/src/textarea/fantasy/textarea_theme_alfa-on-white.css @@ -41,4 +41,22 @@ border-bottom-style: dotted; } } + + &.textarea_invalid { + .textarea__top, + .textarea__sub { + color: var(--color-error); + } + + .textarea__control { + border-bottom-color: var(--color-error-translucent); + } + + &.textarea_focused { + .textarea__control { + border-bottom-color: var(--color-error-translucent); + box-shadow: inset 0 -1px 0 var(--color-error-translucent); + } + } + } } diff --git a/yarn.lock b/yarn.lock index d8cc8f57f2..f2cea21dba 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3416,7 +3416,7 @@ error-stack-parser@^1.3.6: dependencies: stackframe "^0.3.1" -es-abstract@^1.4.3, es-abstract@^1.7.0: +es-abstract@^1.7.0: version "1.7.0" resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.7.0.tgz#dfade774e01bfcd97f96180298c449c8623fb94c" dependencies: @@ -3728,7 +3728,7 @@ event-emitter@~0.3.5: d "1" es5-ext "~0.10.14" -event-stream@^3.3.4, event-stream@~3.3.0: +event-stream@^3.3.4: version "3.3.4" resolved "https://registry.yarnpkg.com/event-stream/-/event-stream-3.3.4.tgz#4ab4c9a0f5a54db9338b4c34d86bfce8f4b35571" dependencies: @@ -4233,6 +4233,13 @@ fs-extra@^0.30.0: path-is-absolute "^1.0.0" rimraf "^2.2.8" +fs-extra@^2.0.0: + version "2.1.2" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-2.1.2.tgz#046c70163cef9aad46b0e4a7fa467fb22d71de35" + dependencies: + graceful-fs "^4.1.2" + jsonfile "^2.1.0" + fs-extra@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-1.0.0.tgz#cd3ce5f7e7cb6145883fcae3191e9877f8587950" @@ -5082,6 +5089,19 @@ html-minifier@^3.2.3: relateurl "0.2.x" uglify-js "3.0.x" +html-reporter@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/html-reporter/-/html-reporter-0.2.0.tgz#3bec6f621834fc76a8be39c57b740d942cd62fb4" + dependencies: + bluebird "^3.4.7" + browserify "^13.0.0" + chalk "^1.1.3" + fs-extra "^2.0.0" + gemini-configparser "^0.3.0" + handlebars "^4.0.5" + lodash "^4.17.4" + uglify-js "^2.7.3" + html-tags@^1.1.1: version "1.2.0" resolved "https://registry.yarnpkg.com/html-tags/-/html-tags-1.2.0.tgz#c78de65b5663aa597989dd2b7ab49200d7e4db98" @@ -7170,18 +7190,6 @@ npm-path@^2.0.2: dependencies: which "^1.2.10" -npm-run-all@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/npm-run-all/-/npm-run-all-4.0.2.tgz#a84669348e6db6ccbe052200b4cdb6bfe034a4fe" - dependencies: - chalk "^1.1.3" - cross-spawn "^5.0.1" - minimatch "^3.0.2" - ps-tree "^1.0.1" - read-pkg "^2.0.0" - shell-quote "^1.6.1" - string.prototype.padend "^3.0.0" - npm-run-path@^2.0.0: version "2.0.2" resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f" @@ -8299,12 +8307,6 @@ prr@~0.0.0: version "0.0.0" resolved "https://registry.yarnpkg.com/prr/-/prr-0.0.0.tgz#1a84b85908325501411853d0081ee3fa86e2926a" -ps-tree@^1.0.1: - version "1.1.0" - resolved "https://registry.yarnpkg.com/ps-tree/-/ps-tree-1.1.0.tgz#b421b24140d6203f1ed3c76996b4427b08e8c014" - dependencies: - event-stream "~3.3.0" - pseudomap@^1.0.1, pseudomap@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" @@ -9742,14 +9744,6 @@ string-width@^2.0.0: is-fullwidth-code-point "^2.0.0" strip-ansi "^3.0.0" -string.prototype.padend@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/string.prototype.padend/-/string.prototype.padend-3.0.0.tgz#f3aaef7c1719f170c5eab1c32bf780d96e21f2f0" - dependencies: - define-properties "^1.1.2" - es-abstract "^1.4.3" - function-bind "^1.0.2" - string_decoder@^0.10.25, string_decoder@~0.10.0, string_decoder@~0.10.x: version "0.10.31" resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94"