Conversation
Add basic screenshot config and first test. Upgrade typescript, jest and related dev dependencies.
Codecov Report
@@ Coverage Diff @@
## master #394 +/- ##
==========================================
+ Coverage 97.95% 97.96% +<.01%
==========================================
Files 39 39
Lines 2887 2899 +12
Branches 692 680 -12
==========================================
+ Hits 2828 2840 +12
Misses 52 52
Partials 7 7
Continue to review full report at Codecov.
|
fbf6919 to
a198b70
Compare
|
@nickofthyme thanks to starting this! elastic-charts/.ci/jobs/defaults.yml Lines 68 to 76 in d8f4531 I think it's enough to change the default diff storage to |
|
@markov00 Ok sweet I'll take a look at that! Thanks |
48cecd2 to
b331814
Compare
|
Waiting to address lfs quota https://github.com/elastic/infra/issues/14886 |
1edf75c to
426f1dc
Compare
markov00
left a comment
There was a problem hiding this comment.
This looks great now, I've increased the server launch waiting time a bit as storybook can take a while before loading everything.
I think we can also go and remove the fonts so we don't depends on any particular fonts and we always use the fallback inside our docker container.
As next phase we can have some sort of html report or better a bot that push a comment on the PR with the diffs
markov00
left a comment
There was a problem hiding this comment.
LGTM
please check the squash commit message and align the PR title to that
|
🎉 This PR is included in version 13.5.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Summary
closes #77
Visual regression tests and dependency upgrades
Add visual testing config
to run the integration tests just run. Don't forget to run
yarnto get the latest deps.The following
devDependencieswere used:jest-image-snapshotpuppeteerjest-puppeteerseedrandomjest-puppeteer-dockerBased on this example config/setup.
git ignores the screenshot diffs (i.e.
**/__diff_output__/) as this seems to be a local use case. Any diffs created from CI are stored in gcsAdd seeded random number function
Please use the
getRandomNumberfunction instories/and for*.test.ts{x}files (there is a lint rule to make sure 😏).This allows for randomness in story data but allows us to control the randomness when we want, like in visual tests. This is controlled by using the
RNG_SEEDenvironment variable.Visual regression tests use the
'elastic-charts'string add theRNG_SEED.RNG_SEED='elastic-charts' yarn startUpgraded
devDependencies:jesttypescript@typescript-eslint/eslint-plugin@typescript-eslint/parserts-jestts-loaderPrevent no-show charts here
Checklist
src/index.ts(and stories only import from../srcexcept for test data & storybook)