Albert Salim
0bfb273e92
Change getJSONFixture to import on static fixtures
2021-10-19 21:48:04 +00:00
Albert Salim
b9d5c28077
Print error when fixture is not generated
2021-10-04 17:47:36 +08:00
Mike Greiling
5451d41c15
Fix Australian timezone abbreviations in tooltips
...
Fixes Australian 4-letter timezone abbreviations which were rendering
incorrectly in many places.
Changelog: fixed
2021-09-23 04:47:21 +00:00
Albert Salim
4741bd5d3b
Track graphql extensions as modules
...
This would include `.gql` and `.graphql` extensions
into jest filesystem. In turn, it enables
jest to resolve dependencies that use these extensions.
2021-09-20 15:33:23 +08:00
KunQian
a1d952b8ff
Add JH vue components entry
2021-08-25 14:23:41 +08:00
Enrique Alcantara
c5b0ea64d6
Remove Markdown-it from content editor build
2021-04-21 10:52:07 -04:00
Paul Slaughter
b2356dca1a
Setup fake web worker for jest
...
- This does a fake implementation of some
trivial web worker API. This way we can
have integration specs without overly stubbing
these out.
2021-04-07 15:43:01 -05:00
Lukas Eipert
902955400f
Move to jquery slim
2021-03-23 15:57:12 -05:00
David Pisek
1aecf7485f
Move integration specs module name mappers
...
This MR moves the module-name-mappers, which are specific to
the integration suit from jest.config.base to jest.config.integration.
2021-03-23 15:09:42 +00:00
Dave Pisek
e0e316fc9c
Add mock-server setup
...
* Adds settings to jest-config
* Adds mockdata and routes
2021-03-16 11:15:30 +11:00
Lukas 'Eipi' Eipert
3d5eb4cfdc
Run eslint on node scripts and configs
...
This re-adds our config/, scripts/ and *.config.js files to eslint,
together with some rules to make it a little easier for those
node-scripts, e.g. console logging or importing node or dev dependencies
should be fine.
2021-03-10 12:42:16 +00:00
Lukas 'Eipi' Eipert
ca19446d31
Move jest spec helpers to own directory
...
It is a bit confusing as we have put helpers to be used in specs in the
same directory as specs for `app/assets/javascripts/helpers`. In oder
to make the destinction a bit more clear, this moves jest test helpers
to `__helpers__` and adds appropriate readmes to both folders.
2021-01-14 23:43:39 +00:00
Paul Slaughter
2d57d1132e
Use @gitlab/favicon-overlay instead of common_utils
...
- This helps us remove some more karma specs
Which can overall improve our CI cost.
- Also, keeps our adapter methods that wrap
this new library but moves them to their own
modules.
2021-01-07 11:22:03 -06:00
Thomas Randolph
d3a1033008
Switch to faster PRNG
2021-01-04 19:59:53 -07:00
Lukas Eipert
81e8287570
Run prettier on 15 files - 4 of 73
...
Part of our prettier migration; changing the arrow-parens style.
2020-12-23 18:48:02 +01:00
Paul Slaughter
500b7d4428
Add jest raw loader for raw text fixtures
2020-11-23 15:37:04 -06:00
Paul Slaughter
b63cce88ad
Disallow fs in FE integration specs
...
- This is because we'd like to run these in the browser
- Also removes a potential circular dependency
when loading specs in the browser
2020-11-23 15:37:03 -06:00
mfluharty
0e8e98100f
Use addFileAttribute in jest-junit config
...
When running the jest job in a CI environment,
this puts the file name of the *spec.js file for each test case
into the properties for its <testcase> in the junit_jest.xml artifact
2020-10-13 11:38:41 -06:00
Natalia Tepluhina
6c786146b0
Merge branch 'jhope-graphql-startup-js-3' into 'master'
...
Reinstate changes from startupJS Graphql with linked queries
See merge request gitlab-org/gitlab!44425
2020-10-13 09:15:49 +00:00
John Hope
a797ca35f0
Change shared query location
...
Let's use app/graphql/queries for shared queries and teach jest and
webpack about it as well with a `shared_queries` alias.
2020-10-13 09:15:48 +00:00
Vitaly Slobodin
3d199a21d4
Fix generating junit report
2020-10-07 20:28:18 +02:00
Paul Slaughter
cea21d61c9
Add test_X aliases to webpack and jest
...
- test_fixtures
- test_helpers
This is used to run the mock server locally
2020-08-06 04:12:53 -05:00
Himanshu Kapoor
f56761e097
Add support for linting based on schemas in WebIDE
...
This allows us to lint our .gitlab-ci.yml file and other yaml
files in general
2020-07-07 12:47:58 +00:00
Paul Slaughter
aa9ac23e6e
Fix eslint broken for Jest
...
**What happened?**
Previously we just checked the immediate parent
to see if the module was being included from eslint.
Now we recursively check all the parents.
Also moves this eslint check to it's own config/helper
2020-05-15 08:21:35 -05:00
Paul Slaughter
ac4d7d0f2b
Add unit and integration jest.config files
...
**Why?**
To write [FE integration tests][1], we will need
to have two related but different environments.
The best way to do this is with two configs and
a base config.
[1]: https://docs.gitlab.com/ee/development/testing_guide/testing_levels.html#frontend-integration-tests
2020-05-15 08:21:34 -05:00