Skip to content
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ jobs:
- run:
name: Unit tests
command: yarn run test --maxWorkers=4
- store_test_results:
path: junit/jest/

'e2e tests':
<<: *defaults
Expand All @@ -93,11 +95,14 @@ jobs:
- restore_cache: *restore_yarn_cache
- run: *run_yarn_install
- save_cache: *save_yarn_cache
- run:
name: Build example
command: yarn run website:build e-commerce
- run:
name: End-2-End tests
command: |
yarn run website:build
yarn run test:e2e:saucelabs
command: yarn run test:e2e:saucelabs
- store_test_results:
path: junit/wdio/

'release if needed':
<<: *defaults
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,6 @@ yarn-error.log
/website/stories
/storybook/dist/*

# Argos CI screenshots
# Test output
/functional-tests/screenshots/
/junit
14 changes: 14 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,18 @@ module.exports = {
globals: {
__DEV__: true,
},

// reporter for circleci
reporters: [
'default',
[
'jest-junit',
{
outputDirectory: 'junit/jest',
suiteNameTemplate: '{filepath}',
ancestorSeparator: ' › ',
addFileAttribute: 'true',
},
],
],
};
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@
"@typescript-eslint/parser": "4.15.1",
"@wdio/cli": "5.16.9",
"@wdio/jasmine-framework": "5.16.5",
"@wdio/junit-reporter": "5.16.11",
"@wdio/local-runner": "5.16.9",
"@wdio/sauce-service": "5.16.5",
"@wdio/selenium-standalone-service": "5.16.5",
Expand Down Expand Up @@ -123,6 +124,7 @@
"jest-diff": "26.6.2",
"jest-environment-jsdom": "26.6.2",
"jest-environment-jsdom-global": "2.0.4",
"jest-junit": "12.2.0",
"jest-watch-typeahead": "0.6.2",
"jscodeshift": "0.7.0",
"jsdom-global": "3.0.2",
Expand Down
24 changes: 17 additions & 7 deletions scripts/website/build-examples.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,21 @@ set -e # exit when error
rm -rf website/examples
mkdir website/examples

for example in examples/*; do
if [ -d "$example" ]; then
name=$(basename "$example")
echo "Building $name example..."
build_example() {
name=$1
echo "Building $name example..."

(cd "$example" && yarn && yarn build && cp -r "dist/" "../../website/examples/$name/")
fi
done
(cd "$example" && yarn && yarn build && cp -r "dist/" "../../website/examples/$name/")
}

if [ -z "$1" ]; then
for example in examples/*; do
if [ -d "$example" ]; then
name=$(basename "$example")
build_example $name
fi
done
else
cd examples/$1
build_example $1
fi
20 changes: 19 additions & 1 deletion wdio.saucelabs.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,22 @@

const { saucelabs } = require('instantsearch-e2e-tests');

exports.config = saucelabs;
exports.config = {
...saucelabs,
reporters: [
'spec',
[
'junit',
{
outputDir: `${__dirname}/junit/wdio`,
outputFileFormat({
cid,
capabilities: { browserName, browserVersion },
}) {
return `results-${cid}.${browserName}-${browserVersion}.xml`;
},
addFileAttribute: true,
},
],
],
};
54 changes: 52 additions & 2 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3115,6 +3115,16 @@
"@wdio/utils" "5.16.5"
jasmine "^3.5.0"

"@wdio/[email protected]":
version "5.16.11"
resolved "https://registry.yarnpkg.com/@wdio/junit-reporter/-/junit-reporter-5.16.11.tgz#70c2dd83fd669783de233bd2c386faa4c0d60de2"
integrity sha512-Jslnz1Iijho+AwIAwlYHYEqI7fEqvom7P+MvZ2F8Y2r94ui0VzR14B9iOlGr4D6PvWv0/NnZ+othfTzUTL0j5Q==
dependencies:
"@wdio/reporter" "5.15.2"
json-stringify-safe "^5.0.1"
junit-report-builder "^1.3.0"
validator "^12.0.0"

"@wdio/[email protected]":
version "5.16.9"
resolved "https://registry.yarnpkg.com/@wdio/local-runner/-/local-runner-5.16.9.tgz#87111a5a6ade418326da237d802ed135efb975d3"
Expand Down Expand Up @@ -5996,6 +6006,11 @@ data-urls@^2.0.0:
whatwg-mimetype "^2.3.0"
whatwg-url "^8.0.0"

[email protected]:
version "0.0.2"
resolved "https://registry.yarnpkg.com/date-format/-/date-format-0.0.2.tgz#fafd448f72115ef1e2b739155ae92f2be6c28dd1"
integrity sha1-+v1Ej3IRXvHitzkVWukvK+bCjdE=

date-now@^0.1.4:
version "0.1.4"
resolved "https://registry.yarnpkg.com/date-now/-/date-now-0.1.4.tgz#eaf439fd4d4848ad74e5cc7dbef200672b9e345b"
Expand Down Expand Up @@ -9264,6 +9279,16 @@ jest-jasmine2@^26.6.3:
pretty-format "^26.6.2"
throat "^5.0.0"

[email protected]:
version "12.2.0"
resolved "https://registry.yarnpkg.com/jest-junit/-/jest-junit-12.2.0.tgz#cff7f9516e84f8e30f6bdea04cd84db6b095a376"
integrity sha512-ecGzF3KEQwLbMP5xMO7wqmgmyZlY/5yWDvgE/vFa+/uIT0KsU5nluf0D2fjIlOKB+tb6DiuSSpZuGpsmwbf7Fw==
dependencies:
mkdirp "^1.0.4"
strip-ansi "^5.2.0"
uuid "^8.3.2"
xml "^1.0.1"

jest-leak-detector@^26.6.2:
version "26.6.2"
resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-26.6.2.tgz#7717cf118b92238f2eba65054c8a0c9c653a91af"
Expand Down Expand Up @@ -9732,6 +9757,16 @@ jsx-ast-utils@^2.2.3:
array-includes "^3.0.3"
object.assign "^4.1.0"

junit-report-builder@^1.3.0:
version "1.3.3"
resolved "https://registry.yarnpkg.com/junit-report-builder/-/junit-report-builder-1.3.3.tgz#a848e9ef1b1664b855d1abf8766c39f0a9c5ff33"
integrity sha512-75bwaXjP/3ogyzOSkkcshXGG7z74edkJjgTZlJGAyzxlOHaguexM3VLG6JyD9ZBF8mlpgsUPB1sIWU4LISgeJw==
dependencies:
date-format "0.0.2"
lodash "^4.17.15"
mkdirp "^0.5.0"
xmlbuilder "^10.0.0"

kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0:
version "3.2.2"
resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64"
Expand Down Expand Up @@ -10508,7 +10543,7 @@ mkdirp@^0.5.0, mkdirp@^0.5.1:
dependencies:
minimist "0.0.8"

mkdirp@^1.0.0:
mkdirp@^1.0.0, mkdirp@^1.0.4:
version "1.0.4"
resolved "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e"
integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==
Expand Down Expand Up @@ -14789,7 +14824,7 @@ uuid@^3.3.2:
resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.3.tgz#4568f0216e78760ee1dbf3a4d2cf53e224112866"
integrity sha512-pW0No1RGHgzlpHJO1nsVrHKpOEIxkGg1xB+v0ZmdNH5OAeAwzAVrCnI2/6Mtx+Uys6iaylxa+D3g4j63IKKjSQ==

uuid@^8.3.0:
uuid@^8.3.0, uuid@^8.3.2:
version "8.3.2"
resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2"
integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==
Expand All @@ -14816,6 +14851,11 @@ validate-npm-package-license@^3.0.1:
spdx-correct "^3.0.0"
spdx-expression-parse "^3.0.0"

validator@^12.0.0:
version "12.2.0"
resolved "https://registry.yarnpkg.com/validator/-/validator-12.2.0.tgz#660d47e96267033fd070096c3b1a6f2db4380a0a"
integrity sha512-jJfE/DW6tIK1Ek8nCfNFqt8Wb3nzMoAbocBF6/Icgg1ZFSBpObdnwVY2jQj6qUqzhx5jc71fpvBWyLGO7Xl+nQ==

validator@^8.0.0:
version "8.2.0"
resolved "https://registry.yarnpkg.com/validator/-/validator-8.2.0.tgz#3c1237290e37092355344fef78c231249dab77b9"
Expand Down Expand Up @@ -15257,6 +15297,16 @@ xml-name-validator@^3.0.0:
resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-3.0.0.tgz#6ae73e06de4d8c6e47f9fb181f78d648ad457c6a"
integrity sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw==

xml@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/xml/-/xml-1.0.1.tgz#78ba72020029c5bc87b8a81a3cfcd74b4a2fc1e5"
integrity sha1-eLpyAgApxbyHuKgaPPzXS0ovweU=

xmlbuilder@^10.0.0:
version "10.1.1"
resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-10.1.1.tgz#8cae6688cc9b38d850b7c8d3c0a4161dcaf475b0"
integrity sha512-OyzrcFLL/nb6fMGHbiRDuPup9ljBycsdCypwuyg5AAHvyWzGfChJpCXMG88AGTIMFhGZ9RccFN1e6lhg3hkwKg==

xmlchars@^2.2.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/xmlchars/-/xmlchars-2.2.0.tgz#060fe1bcb7f9c76fe2a17db86a9bc3ab894210cb"
Expand Down