Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
10 changes: 8 additions & 2 deletions docs/getting-started/running/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,16 @@ To run the UI tests, use the following command:
yarn --cwd web-ui test
```

Or simply `cd` to the `web-ui` directory and run `yarn test`.
Or simply `cd` to the `web-ui` directory and run `yarn test`. Tests using Snapshots are likely to fail with component updates. Those which fail to meet their Snapshot will be marked as failed. You can update the Snapshot by running the following command:

```shell
yarn --cwd web-ui test -u # or simply `yarn test` followed by `u`
```

Testing Library is installed in the UI project. You can find more information about Testing Library [here](https://testing-library.com/docs/react-testing-library/intro/).

# Running the Server

## Running Tests

To skip building the UI when running unit tests in the Server application add the environment variable `SKIP_WEB_UI=true` to your system or run configuration.
To skip building the UI when running unit tests in the Server application add the environment variable `SKIP_WEB_UI=true` to your system or run configuration.
24 changes: 15 additions & 9 deletions web-ui/eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
import globals from "globals";
import reactHooksPlugin from "eslint-plugin-react-hooks";
import reactPlugin from "eslint-plugin-react";
import vitestPlugin from "eslint-plugin-vitest";
import globals from 'globals';
import reactHooksPlugin from 'eslint-plugin-react-hooks';
import reactPlugin from 'eslint-plugin-react';
import vitestPlugin from 'eslint-plugin-vitest';
import tseslint from 'typescript-eslint';

/**
* @type {import('eslint').Linter.FlatConfig[]}
*/
export default [
{
files: ["src/**/*.js", "src/**/*.jsx", "src/**/*.ts", "src/**/*.tsx"],
files: ['src/**/*.js', 'src/**/*.jsx', 'src/**/*.ts', 'src/**/*.tsx'],
languageOptions: {
parser: tseslint.parser,
parserOptions: {
ecmaFeatures: {
jsx: true
Expand All @@ -15,22 +20,23 @@ export default [
globals: {
...globals.browser,
...globals.node,
...vitestPlugin.environments.env.globals,
...vitestPlugin.environments.env.globals,
HttpResponse: false,
snapshot: false,
waitForSnapshot: false,
waitForSnapshot: false
}
},
plugins: {
react: reactPlugin,
'react-hooks': reactHooksPlugin,
'@typescript-eslint': tseslint.plugin,
vitest: vitestPlugin
},
rules: {
// Override default rules here.
'react-hooks/exhaustive-deps': 'warn',
...vitestPlugin.configs.recommended.rules,
'vitest/expect-expect': 'off',
'vitest/expect-expect': 'off'
}
}
];
];
2 changes: 2 additions & 0 deletions web-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@
"prop-types": "^15.8.1",
"react-test-renderer": "^18.2.0",
"storybook": "^8.0.4",
"typescript": "^5.4.5",
"typescript-eslint": "^7.7.1",
"vite": "^5.2.6",
"vite-tsconfig-paths": "^4.3.2",
"vitest": "^1.4.0",
Expand Down
63 changes: 60 additions & 3 deletions web-ui/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1363,7 +1363,7 @@
dependencies:
eslint-visitor-keys "^3.3.0"

"@eslint-community/regexpp@^4.6.1":
"@eslint-community/regexpp@^4.10.0", "@eslint-community/regexpp@^4.6.1":
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we using two versions of this same package?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're not, but one of our transient dependencies may be.

version "4.10.0"
resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.10.0.tgz#548f6de556857c8bb73bbee70c35dc82a2e74d63"
integrity sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==
Expand Down Expand Up @@ -3102,6 +3102,34 @@
resolved "https://registry.yarnpkg.com/@types/wrap-ansi/-/wrap-ansi-3.0.0.tgz#18b97a972f94f60a679fd5c796d96421b9abb9fd"
integrity sha512-ltIpx+kM7g/MLRZfkbL7EsCEjfzCcScLpkg37eXEtx5kmrAKBkTJwd1GIAjDSL8wTpM6Hzn5YO4pSb91BEwu1g==

"@typescript-eslint/eslint-plugin@7.7.1":
version "7.7.1"
resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.7.1.tgz#50a9044e3e5fe76b22caf64fb7fc1f97614bdbfd"
integrity sha512-KwfdWXJBOviaBVhxO3p5TJiLpNuh2iyXyjmWN0f1nU87pwyvfS0EmjC6ukQVYVFJd/K1+0NWGPDXiyEyQorn0Q==
dependencies:
"@eslint-community/regexpp" "^4.10.0"
"@typescript-eslint/scope-manager" "7.7.1"
"@typescript-eslint/type-utils" "7.7.1"
"@typescript-eslint/utils" "7.7.1"
"@typescript-eslint/visitor-keys" "7.7.1"
debug "^4.3.4"
graphemer "^1.4.0"
ignore "^5.3.1"
natural-compare "^1.4.0"
semver "^7.6.0"
ts-api-utils "^1.3.0"

"@typescript-eslint/parser@7.7.1":
version "7.7.1"
resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-7.7.1.tgz#f940e9f291cdca40c46cb75916217d3a42d6ceea"
integrity sha512-vmPzBOOtz48F6JAGVS/kZYk4EkXao6iGrD838sp1w3NQQC0W8ry/q641KU4PrG7AKNAf56NOcR8GOpH8l9FPCw==
dependencies:
"@typescript-eslint/scope-manager" "7.7.1"
"@typescript-eslint/types" "7.7.1"
"@typescript-eslint/typescript-estree" "7.7.1"
"@typescript-eslint/visitor-keys" "7.7.1"
debug "^4.3.4"

"@typescript-eslint/scope-manager@7.7.1":
version "7.7.1"
resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-7.7.1.tgz#07fe59686ca843f66e3e2b5c151522bc38effab2"
Expand All @@ -3110,6 +3138,16 @@
"@typescript-eslint/types" "7.7.1"
"@typescript-eslint/visitor-keys" "7.7.1"

"@typescript-eslint/type-utils@7.7.1":
version "7.7.1"
resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-7.7.1.tgz#2f8094edca3bebdaad009008929df645ed9c8743"
integrity sha512-ZksJLW3WF7o75zaBPScdW1Gbkwhd/lyeXGf1kQCxJaOeITscoSl0MjynVvCzuV5boUz/3fOI06Lz8La55mu29Q==
dependencies:
"@typescript-eslint/typescript-estree" "7.7.1"
"@typescript-eslint/utils" "7.7.1"
debug "^4.3.4"
ts-api-utils "^1.3.0"

"@typescript-eslint/types@7.7.1":
version "7.7.1"
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-7.7.1.tgz#f903a651fb004c75add08e4e9e207f169d4b98d7"
Expand All @@ -3129,7 +3167,7 @@
semver "^7.6.0"
ts-api-utils "^1.3.0"

"@typescript-eslint/utils@^7.7.1":
"@typescript-eslint/utils@7.7.1", "@typescript-eslint/utils@^7.7.1":
version "7.7.1"
resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-7.7.1.tgz#5d161f2b4a55e1bc38b634bebb921e4bd4e4a16e"
integrity sha512-QUvBxPEaBXf41ZBbaidKICgVL8Hin0p6prQDu6bbetWo39BKbWJxRsErOzMNT1rXvTll+J7ChrbmMCXM9rsvOQ==
Expand Down Expand Up @@ -5979,6 +6017,11 @@ graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0,
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3"
integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==

graphemer@^1.4.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/graphemer/-/graphemer-1.4.0.tgz#fb2f1d55e0e3a1849aeffc90c4fa0dd53a0e66c6"
integrity sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==

graphql@^16.8.1:
version "16.8.1"
resolved "https://registry.yarnpkg.com/graphql/-/graphql-16.8.1.tgz#1930a965bef1170603702acdb68aedd3f3cf6f07"
Expand Down Expand Up @@ -6295,7 +6338,7 @@ ieee754@^1.1.13:
resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352"
integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==

ignore@^5.2.0:
ignore@^5.2.0, ignore@^5.3.1:
version "5.3.1"
resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.1.tgz#5073e554cd42c5b33b394375f538b8593e34d4ef"
integrity sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==
Expand Down Expand Up @@ -10175,6 +10218,20 @@ typed-array-length@^1.0.6:
is-typed-array "^1.1.13"
possible-typed-array-names "^1.0.0"

typescript-eslint@^7.7.1:
version "7.7.1"
resolved "https://registry.yarnpkg.com/typescript-eslint/-/typescript-eslint-7.7.1.tgz#16f82e83bb0955af02f258cb7a9de59e1bfb8706"
integrity sha512-ykEBfa3xx3odjZy6GRED4SCPrjo0rgHwstLlEgLX4EMEuv7QeIDSmfV+S6Kk+XkbsYn4BDEcPvsci1X26lRpMQ==
dependencies:
"@typescript-eslint/eslint-plugin" "7.7.1"
"@typescript-eslint/parser" "7.7.1"
"@typescript-eslint/utils" "7.7.1"

typescript@^5.4.5:
version "5.4.5"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.4.5.tgz#42ccef2c571fdbd0f6718b1d1f5e6e5ef006f611"
integrity sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==

ufo@^1.3.2, ufo@^1.4.0:
version "1.5.3"
resolved "https://registry.yarnpkg.com/ufo/-/ufo-1.5.3.tgz#3325bd3c977b6c6cd3160bf4ff52989adc9d3344"
Expand Down