This is an automated email from the ASF dual-hosted git repository.

pierrejeambrun pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new 748b38739a Add and improve coverage for new UI (#42397)
748b38739a is described below

commit 748b38739a419b6c3ad4745240a5f6354b61c33e
Author: Vincent Kling <[email protected]>
AuthorDate: Mon Sep 23 16:14:01 2024 +0200

    Add and improve coverage for new UI (#42397)
    
    Signed-off-by: Vincent Kling <[email protected]>
---
 .gitignore                                         |   1 +
 airflow/ui/package.json                            |   6 +-
 airflow/ui/pnpm-lock.yaml                          | 316 +++++++++++++++++----
 .../utils/ChakraWrapper.test.tsx}                  |  45 ++-
 .../utils/RouterWrapper.test.tsx}                  |  45 ++-
 airflow/ui/vite.config.ts                          |   3 +
 contributing-docs/14_node_environment_setup.rst    |   3 +
 7 files changed, 307 insertions(+), 112 deletions(-)

diff --git a/.gitignore b/.gitignore
index ef8f986f78..257331cb4e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -12,6 +12,7 @@ airflow.db
 airflow/git_version
 airflow/www/static/coverage/
 airflow/www/*.log
+airflow/ui/coverage/
 logs/
 airflow-webserver.pid
 standalone_admin_password.txt
diff --git a/airflow/ui/package.json b/airflow/ui/package.json
index 401d920c20..c7d79f792a 100644
--- a/airflow/ui/package.json
+++ b/airflow/ui/package.json
@@ -12,7 +12,8 @@
     "format": "pnpm prettier --write .",
     "preview": "vite preview",
     "codegen": "openapi-rq -i \"../api_fastapi/openapi/v1-generated.yaml\" -c 
axios --format prettier -o openapi-gen",
-    "test": "vitest run"
+    "test": "vitest run",
+    "coverage": "vitest run --coverage"
   },
   "dependencies": {
     "@chakra-ui/anatomy": "^2.2.2",
@@ -41,6 +42,7 @@
     "@types/react": "^18.3.5",
     "@types/react-dom": "^18.3.0",
     "@vitejs/plugin-react-swc": "^3.7.0",
+    "@vitest/coverage-v8": "^2.1.1",
     "eslint": "^9.10.0",
     "eslint-config-prettier": "^9.1.0",
     "eslint-plugin-jsx-a11y": "^6.10.0",
@@ -56,6 +58,6 @@
     "typescript": "~5.5.4",
     "typescript-eslint": "^8.5.0",
     "vite": "^5.4.4",
-    "vitest": "^2.0.5"
+    "vitest": "^2.1.1"
   }
 }
diff --git a/airflow/ui/pnpm-lock.yaml b/airflow/ui/pnpm-lock.yaml
index 1e4a99ef60..0f9f256941 100644
--- a/airflow/ui/pnpm-lock.yaml
+++ b/airflow/ui/pnpm-lock.yaml
@@ -31,7 +31,7 @@ importers:
         version: 1.7.7
       chakra-react-select:
         specifier: ^4.9.2
-        version: 
4.9.2(@chakra-ui/[email protected](@chakra-ui/[email protected](@emotion/[email protected](@types/[email protected])([email protected]))(@emotion/[email protected](@emotion/[email protected](@types/[email protected])([email protected]))(@types/[email protected])([email protected]))([email protected]))([email protected]))(@chakra-ui/[email protected](@chakra-ui/[email protected](@emotion/[email protected](@types/[email protected])([email protected]))(@emotion/[email protected](@emotion/[email protected](@types/[email protected])([email protected]))(@types/[email protected]
 [...]
+        version: 4.9.2(uzcvocchpeesoxvtkif6ppnvaq)
       framer-motion:
         specifier: ^11.3.29
         version: 
11.3.29(@emotion/[email protected])([email protected]([email protected]))([email protected])
@@ -50,7 +50,7 @@ importers:
     devDependencies:
       '@7nohe/openapi-react-query-codegen':
         specifier: ^1.6.0
-        version: 
1.6.0([email protected])([email protected])([email protected])([email protected])
+        version: 
1.6.0([email protected])([email protected])([email protected])([email protected])([email protected])
       '@eslint/js':
         specifier: ^9.10.0
         version: 9.10.0
@@ -81,6 +81,9 @@ importers:
       '@vitejs/plugin-react-swc':
         specifier: ^3.7.0
         version: 3.7.0([email protected](@types/[email protected]))
+      '@vitest/coverage-v8':
+        specifier: ^2.1.1
+        version: 2.1.1([email protected](@types/[email protected])([email protected]))
       eslint:
         specifier: ^9.10.0
         version: 9.10.0([email protected])
@@ -127,8 +130,8 @@ importers:
         specifier: ^5.4.4
         version: 5.4.4(@types/[email protected])
       vitest:
-        specifier: ^2.0.5
-        version: 2.0.5(@types/[email protected])([email protected])
+        specifier: ^2.1.1
+        version: 2.1.1(@types/[email protected])([email protected])
 
 packages:
 
@@ -202,6 +205,11 @@ packages:
     engines: {node: '>=6.0.0'}
     hasBin: true
 
+  '@babel/[email protected]':
+    resolution: {integrity: 
sha512-trGdfBdbD0l1ZPmcJ83eNxB9rbEax4ALFTF7fN386TMYbeCQbyme5cOEXQhbGXKebwGaB/J52w1mrklMcbgy6Q==}
+    engines: {node: '>=6.0.0'}
+    hasBin: true
+
   '@babel/[email protected]':
     resolution: {integrity: 
sha512-DSgLeL/FNcpXuzav5wfYvHCGvynXkJbn3Zvc3823AEe9nPwW9IK4UoCSS5yGymmQzN0pCPvivtgS6/8U2kkm1w==}
     engines: {node: '>=6.9.0'}
@@ -230,6 +238,13 @@ packages:
     resolution: {integrity: 
sha512-zQ1ijeeCXVEh+aNL0RlmkPkG8HUiDcU2pzQQFjtbntgAczRASFzj4H+6+bV+dy1ntKR14I/DypeuRG1uma98iQ==}
     engines: {node: '>=6.9.0'}
 
+  '@babel/[email protected]':
+    resolution: {integrity: 
sha512-/l42B1qxpG6RdfYf343Uw1vmDjeNhneUXtzhojE7pDgfpEypmRhI6j1kr17XCVv4Cgl9HdAiQY2x0GwKm7rWCw==}
+    engines: {node: '>=6.9.0'}
+
+  '@bcoe/[email protected]':
+    resolution: {integrity: 
sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==}
+
   '@chakra-ui/[email protected]':
     resolution: {integrity: 
sha512-FSXRm8iClFyU+gVaXisOSEw0/4Q+qZbFRiuhIAkVU6Boj0FxAMrlo9a8AV5TuF77rgaHytCdHk0Ng+cyUijrag==}
     peerDependencies:
@@ -953,6 +968,10 @@ packages:
     resolution: {integrity: 
sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==}
     engines: {node: '>=12'}
 
+  '@istanbuljs/[email protected]':
+    resolution: {integrity: 
sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==}
+    engines: {node: '>=8'}
+
   '@jridgewell/[email protected]':
     resolution: {integrity: 
sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==}
     engines: {node: '>=6.0.0'}
@@ -1227,6 +1246,9 @@ packages:
   '@types/[email protected]':
     resolution: {integrity: 
sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==}
 
+  '@types/[email protected]':
+    resolution: {integrity: 
sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==}
+
   '@types/[email protected]':
     resolution: {integrity: 
sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==}
 
@@ -1346,23 +1368,44 @@ packages:
     peerDependencies:
       vite: ^4 || ^5
 
-  '@vitest/[email protected]':
-    resolution: {integrity: 
sha512-yHZtwuP7JZivj65Gxoi8upUN2OzHTi3zVfjwdpu2WrvCZPLwsJ2Ey5ILIPccoW23dd/zQBlJ4/dhi7DWNyXCpA==}
+  '@vitest/[email protected]':
+    resolution: {integrity: 
sha512-md/A7A3c42oTT8JUHSqjP5uKTWJejzUW4jalpvs+rZ27gsURsMU8DEb+8Jf8C6Kj2gwfSHJqobDNBuoqlm0cFw==}
+    peerDependencies:
+      '@vitest/browser': 2.1.1
+      vitest: 2.1.1
+    peerDependenciesMeta:
+      '@vitest/browser':
+        optional: true
 
-  '@vitest/[email protected]':
-    resolution: {integrity: 
sha512-h8k+1oWHfwTkyTkb9egzwNMfJAEx4veaPSnMeKbVSjp4euqGSbQlm5+6VHwTr7u4FJslVVsUG5nopCaAYdOmSQ==}
+  '@vitest/[email protected]':
+    resolution: {integrity: 
sha512-YeueunS0HiHiQxk+KEOnq/QMzlUuOzbU1Go+PgAsHvvv3tUkJPm9xWt+6ITNTlzsMXUjmgm5T+U7KBPK2qQV6w==}
 
-  '@vitest/[email protected]':
-    resolution: {integrity: 
sha512-TfRfZa6Bkk9ky4tW0z20WKXFEwwvWhRY+84CnSEtq4+3ZvDlJyY32oNTJtM7AW9ihW90tX/1Q78cb6FjoAs+ig==}
+  '@vitest/[email protected]':
+    resolution: {integrity: 
sha512-LNN5VwOEdJqCmJ/2XJBywB11DLlkbY0ooDJW3uRX5cZyYCrc4PI/ePX0iQhE3BiEGiQmK4GE7Q/PqCkkaiPnrA==}
+    peerDependencies:
+      '@vitest/spy': 2.1.1
+      msw: ^2.3.5
+      vite: ^5.0.0
+    peerDependenciesMeta:
+      msw:
+        optional: true
+      vite:
+        optional: true
+
+  '@vitest/[email protected]':
+    resolution: {integrity: 
sha512-SjxPFOtuINDUW8/UkElJYQSFtnWX7tMksSGW0vfjxMneFqxVr8YJ979QpMbDW7g+BIiq88RAGDjf7en6rvLPPQ==}
 
-  '@vitest/[email protected]':
-    resolution: {integrity: 
sha512-SgCPUeDFLaM0mIUHfaArq8fD2WbaXG/zVXjRupthYfYGzc8ztbFbu6dUNOblBG7XLMR1kEhS/DNnfCZ2IhdDew==}
+  '@vitest/[email protected]':
+    resolution: {integrity: 
sha512-uTPuY6PWOYitIkLPidaY5L3t0JJITdGTSwBtwMjKzo5O6RCOEncz9PUN+0pDidX8kTHYjO0EwUIvhlGpnGpxmA==}
 
-  '@vitest/[email protected]':
-    resolution: {integrity: 
sha512-c/jdthAhvJdpfVuaexSrnawxZz6pywlTPe84LUB2m/4t3rl2fTo9NFGBG4oWgaD+FTgDDV8hJ/nibT7IfH3JfA==}
+  '@vitest/[email protected]':
+    resolution: {integrity: 
sha512-BnSku1WFy7r4mm96ha2FzN99AZJgpZOWrAhtQfoxjUU5YMRpq1zmHRq7a5K9/NjqonebO7iVDla+VvZS8BOWMw==}
 
-  '@vitest/[email protected]':
-    resolution: {integrity: 
sha512-d8HKbqIcya+GR67mkZbrzhS5kKhtp8dQLcmRZLGTscGVg7yImT82cIrhtn2L8+VujWcy6KZweApgNmPsTAO/UQ==}
+  '@vitest/[email protected]':
+    resolution: {integrity: 
sha512-ZM39BnZ9t/xZ/nF4UwRH5il0Sw93QnZXd9NAZGRpIgj0yvVwPpLd702s/Cx955rGaMlyBQkZJ2Ir7qyY48VZ+g==}
+
+  '@vitest/[email protected]':
+    resolution: {integrity: 
sha512-Y6Q9TsI+qJ2CC0ZKj6VBb+T8UPz593N113nnUykqwANqhgf3QkZeHFlusgKLTqrnVHbj/XDKZcDHol+dxVT+rQ==}
 
   '@zag-js/[email protected]':
     resolution: {integrity: 
sha512-Oqhd6+biWyKnhKwFFuZrrf6lxBz2tX2pRQe6grUnYwO6HJ8BcbqZomy2lpOdr+3itlaUqx+Ywj5E5ZZDr/LBfQ==}
@@ -2073,6 +2116,10 @@ packages:
     resolution: {integrity: 
sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==}
     engines: {node: '>=10.13.0'}
 
+  [email protected]:
+    resolution: {integrity: 
sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==}
+    hasBin: true
+
   [email protected]:
     resolution: {integrity: 
sha512-9UiX/Bl6J2yaBbxKoEBRm4Cipxgok8kQYcOPEhScPwebu2I0HoQOuYdIO6S3hLuWoZgpDpwQZMzTFxgpkyT76g==}
     engines: {node: 20 || >=22}
@@ -2149,6 +2196,9 @@ packages:
   [email protected]:
     resolution: {integrity: 
sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==}
 
+  [email protected]:
+    resolution: {integrity: 
sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==}
+
   [email protected]:
     resolution: {integrity: 
sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==}
     engines: {node: '>=16.17.0'}
@@ -2306,9 +2356,28 @@ packages:
   [email protected]:
     resolution: {integrity: 
sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==}
 
+  [email protected]:
+    resolution: {integrity: 
sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==}
+    engines: {node: '>=8'}
+
+  [email protected]:
+    resolution: {integrity: 
sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==}
+    engines: {node: '>=10'}
+
+  [email protected]:
+    resolution: {integrity: 
sha512-yg2d+Em4KizZC5niWhQaIomgf5WlL4vOOjZ5xGCmF8SnPE/mDWWXgvRExdcpCgh9lLRRa1/fSYp2ymmbJ1pI+A==}
+    engines: {node: '>=10'}
+
+  [email protected]:
+    resolution: {integrity: 
sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g==}
+    engines: {node: '>=8'}
+
   [email protected]:
     resolution: {integrity: 
sha512-DR33HMMr8EzwuRL8Y9D3u2BMj8+RqSE850jfGu59kS7tbmPLzGkZmVSfyCFSDxuZiEY6Rzt3T2NA/qU+NwVj1w==}
 
+  [email protected]:
+    resolution: {integrity: 
sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==}
+
   [email protected]:
     resolution: {integrity: 
sha512-cub8rahkh0Q/bw1+GxP7aeSe29hHHn2V4m29nnDlvCdlgU+3UGxkZp7Z53jLUdpX3jdTO0nJZUDl3xvbWc2Xog==}
     engines: {node: 20 || >=22}
@@ -2398,6 +2467,9 @@ packages:
   [email protected]:
     resolution: {integrity: 
sha512-edNu/8D5MKVfGVFRhFf8aAxiTM6Wumfz5XsaatSxlD3w4R1d/WEKUTydCdPGbl9K7QG/Ca3GnDV2sIKIpXRQcw==}
 
+  [email protected]:
+    resolution: {integrity: 
sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==}
+
   [email protected]:
     resolution: {integrity: 
sha512-CgeuL5uom6j/ZVrg7G/+1IXqRY8JXX4Hghfy5YE0EhoYQWvndP1kufu58cmZLNIDKnRhZrXfdS9urVWx98AipQ==}
     engines: {node: 20 || >=22}
@@ -2409,6 +2481,13 @@ packages:
   [email protected]:
     resolution: {integrity: 
sha512-+Wri9p0QHMy+545hKww7YAu5NyzF8iomPL/RQazugQ9+Ez4Ic3mERMd8ZTX5rfK944j+560ZJi8iAwgak1Ac7A==}
 
+  [email protected]:
+    resolution: {integrity: 
sha512-L0WhttDl+2BOsybvEOLK7fW3UA0OQ0IQ2d6Zl2x/a6vVRs3bAY0ECOSHHeL5jD+SbOpOCUEi0y1DgHEn9Qn1AQ==}
+
+  [email protected]:
+    resolution: {integrity: 
sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==}
+    engines: {node: '>=10'}
+
   [email protected]:
     resolution: {integrity: 
sha512-rkpe71W0N0c0Xz6QD0eJETuWAJGnJ9afsl1srmwPrI+yBCkge5EycXXbYRyvL29zZVUWQCY7InPRCv3GDXuZNw==}
 
@@ -2616,6 +2695,10 @@ packages:
   [email protected]:
     resolution: {integrity: 
sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==}
 
+  [email protected]:
+    resolution: {integrity: 
sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==}
+    engines: {node: '>=16 || 14 >=14.18'}
+
   [email protected]:
     resolution: {integrity: 
sha512-ypGJsmGtdXUOeM5u93TyeIEfEhM6s+ljAhrk5vAvSx8uyY/02OvrZnA0YNGUrPXfpJMgI1ODd3nwz8Npx4O4cg==}
     engines: {node: 20 || >=22}
@@ -3008,6 +3091,10 @@ packages:
     resolution: {integrity: 
sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==}
     engines: {node: '>=10'}
 
+  [email protected]:
+    resolution: {integrity: 
sha512-pFYqmTw68LXVjeWJMST4+borgQP2AyMNbg1BpZh9LbyhUeNkeaPF9gzfPGUAnSMV3qPYdWUwDIjjCLiSDOl7vg==}
+    engines: {node: '>=18'}
+
   [email protected]:
     resolution: {integrity: 
sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==}
 
@@ -3017,6 +3104,9 @@ packages:
   [email protected]:
     resolution: {integrity: 
sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==}
 
+  [email protected]:
+    resolution: {integrity: 
sha512-tVGE0mVJPGb0chKhqmsoosjsS+qUnJVGJpZgsHYQcGoPlG3B51R3PouqTgEGH2Dc9jjFyOqOpix6ZHNMXp1FZg==}
+
   [email protected]:
     resolution: {integrity: 
sha512-URZYihUbRPcGv95En+sz6MfghfIc2OJ1sv/RmhWZLouPY0/8Vo80viwPvg3dlaS9fuq7fQMEfgRRK7BBZThBEA==}
     engines: {node: ^18.0.0 || >=20.0.0}
@@ -3025,8 +3115,8 @@ packages:
     resolution: {integrity: 
sha512-weEDEq7Z5eTHPDh4xjX789+fHfF+P8boiFB+0vbWzpbnbsEr/GRaohi/uMKxg8RZMXnl1ItAi/IUHWMsjDV7kQ==}
     engines: {node: '>=14.0.0'}
 
-  [email protected]:
-    resolution: {integrity: 
sha512-q5nmENpTHgiPVd1cJDDc9cVoYN5x4vCvwT3FMilvKPKneCBZAxn2YWQjDF0UMcE9k0Cay1gBiDfTMU0g+mPMQA==}
+  [email protected]:
+    resolution: {integrity: 
sha512-n1cw8k1k0x4pgA2+9XrOkFydTerNcJ1zWCO5Nn9scWHTD+5tp8dghT2x1uduQePZTZgd3Tupf+x9BxJjeJi77Q==}
     engines: {node: '>=14.0.0'}
 
   [email protected]:
@@ -3152,8 +3242,8 @@ packages:
   [email protected]:
     resolution: {integrity: 
sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==}
 
-  [email protected]:
-    resolution: {integrity: 
sha512-LdsW4pxj0Ot69FAoXZ1yTnA9bjGohr2yNBU7QKRxpz8ITSkhuDl6h3zS/tvgz4qrNjeRnvrWeXQ8ZF7Um4W00Q==}
+  [email protected]:
+    resolution: {integrity: 
sha512-N/mGckI1suG/5wQI35XeR9rsMsPqKXzq1CdUndzVstBj/HvyxxGctwnK6WX43NGt5L3Z5tcRf83g4TITKJhPrA==}
     engines: {node: ^18.0.0 || >=20.0.0}
     hasBin: true
 
@@ -3188,15 +3278,15 @@ packages:
       terser:
         optional: true
 
-  [email protected]:
-    resolution: {integrity: 
sha512-8GUxONfauuIdeSl5f9GTgVEpg5BTOlplET4WEDaeY2QBiN8wSm68vxN/tb5z405OwppfoCavnwXafiaYBC/xOA==}
+  [email protected]:
+    resolution: {integrity: 
sha512-97We7/VC0e9X5zBVkvt7SGQMGrRtn3KtySFQG5fpaMlS+l62eeXRQO633AYhSTC3z7IMebnPPNjGXVGNRFlxBA==}
     engines: {node: ^18.0.0 || >=20.0.0}
     hasBin: true
     peerDependencies:
       '@edge-runtime/vm': '*'
       '@types/node': ^18.0.0 || >=20.0.0
-      '@vitest/browser': 2.0.5
-      '@vitest/ui': 2.0.5
+      '@vitest/browser': 2.1.1
+      '@vitest/ui': 2.1.1
       happy-dom: '*'
       jsdom: '*'
     peerDependenciesMeta:
@@ -3274,9 +3364,9 @@ packages:
 
 snapshots:
 
-  
'@7nohe/[email protected]([email protected])([email protected])([email protected])([email protected])':
+  
'@7nohe/[email protected]([email protected])([email protected])([email protected])([email protected])([email protected])':
     dependencies:
-      '@hey-api/openapi-ts': 0.52.0([email protected])
+      '@hey-api/openapi-ts': 0.52.0([email protected])([email protected])
       commander: 12.1.0
       glob: 11.0.0
       ts-morph: 23.0.0
@@ -3354,6 +3444,10 @@ snapshots:
     dependencies:
       '@babel/types': 7.25.4
 
+  '@babel/[email protected]':
+    dependencies:
+      '@babel/types': 7.25.6
+
   '@babel/[email protected]':
     dependencies:
       regenerator-runtime: 0.14.1
@@ -3406,6 +3500,14 @@ snapshots:
       '@babel/helper-validator-identifier': 7.24.7
       to-fast-properties: 2.0.0
 
+  '@babel/[email protected]':
+    dependencies:
+      '@babel/helper-string-parser': 7.24.8
+      '@babel/helper-validator-identifier': 7.24.7
+      to-fast-properties: 2.0.0
+
+  '@bcoe/[email protected]': {}
+
   
'@chakra-ui/[email protected](@chakra-ui/[email protected](@emotion/[email protected](@types/[email protected])([email protected]))(@emotion/[email protected](@emotion/[email protected](@types/[email protected])([email protected]))(@types/[email protected])([email protected]))([email protected]))([email protected](@emotion/[email protected])([email protected]([email protected]))([email protected]))([email protected])':
     dependencies:
       '@chakra-ui/descendant': 3.1.0([email protected])
@@ -4307,10 +4409,10 @@ snapshots:
 
   '@floating-ui/[email protected]': {}
 
-  '@hey-api/[email protected]([email protected])':
+  '@hey-api/[email protected]([email protected])([email protected])':
     dependencies:
       '@apidevtools/json-schema-ref-parser': 11.6.4
-      c12: 1.11.1
+      c12: 1.11.1([email protected])
       camelcase: 8.0.0
       commander: 12.1.0
       handlebars: 4.7.8
@@ -4331,6 +4433,8 @@ snapshots:
       wrap-ansi: 8.1.0
       wrap-ansi-cjs: [email protected]
 
+  '@istanbuljs/[email protected]': {}
+
   '@jridgewell/[email protected]':
     dependencies:
       '@jridgewell/set-array': 1.2.1
@@ -4561,6 +4665,8 @@ snapshots:
 
   '@types/[email protected]': {}
 
+  '@types/[email protected]': {}
+
   '@types/[email protected]': {}
 
   '@types/[email protected]':
@@ -4718,36 +4824,61 @@ snapshots:
     transitivePeerDependencies:
       - '@swc/helpers'
 
-  '@vitest/[email protected]':
+  
'@vitest/[email protected]([email protected](@types/[email protected])([email protected]))':
     dependencies:
-      '@vitest/spy': 2.0.5
-      '@vitest/utils': 2.0.5
+      '@ampproject/remapping': 2.3.0
+      '@bcoe/v8-coverage': 0.2.3
+      debug: 4.3.7
+      istanbul-lib-coverage: 3.2.2
+      istanbul-lib-report: 3.0.1
+      istanbul-lib-source-maps: 5.0.6
+      istanbul-reports: 3.1.7
+      magic-string: 0.30.11
+      magicast: 0.3.5
+      std-env: 3.7.0
+      test-exclude: 7.0.1
+      tinyrainbow: 1.2.0
+      vitest: 2.1.1(@types/[email protected])([email protected])
+    transitivePeerDependencies:
+      - supports-color
+
+  '@vitest/[email protected]':
+    dependencies:
+      '@vitest/spy': 2.1.1
+      '@vitest/utils': 2.1.1
       chai: 5.1.1
       tinyrainbow: 1.2.0
 
-  '@vitest/[email protected]':
+  '@vitest/[email protected](@vitest/[email protected])([email protected](@types/[email protected]))':
+    dependencies:
+      '@vitest/spy': 2.1.1
+      estree-walker: 3.0.3
+      magic-string: 0.30.11
+    optionalDependencies:
+      vite: 5.4.4(@types/[email protected])
+
+  '@vitest/[email protected]':
     dependencies:
       tinyrainbow: 1.2.0
 
-  '@vitest/[email protected]':
+  '@vitest/[email protected]':
     dependencies:
-      '@vitest/utils': 2.0.5
+      '@vitest/utils': 2.1.1
       pathe: 1.1.2
 
-  '@vitest/[email protected]':
+  '@vitest/[email protected]':
     dependencies:
-      '@vitest/pretty-format': 2.0.5
+      '@vitest/pretty-format': 2.1.1
       magic-string: 0.30.11
       pathe: 1.1.2
 
-  '@vitest/[email protected]':
+  '@vitest/[email protected]':
     dependencies:
-      tinyspy: 3.0.0
+      tinyspy: 3.0.2
 
-  '@vitest/[email protected]':
+  '@vitest/[email protected]':
     dependencies:
-      '@vitest/pretty-format': 2.0.5
-      estree-walker: 3.0.3
+      '@vitest/pretty-format': 2.1.1
       loupe: 3.1.1
       tinyrainbow: 1.2.0
 
@@ -4919,7 +5050,7 @@ snapshots:
 
   [email protected]: {}
 
-  [email protected]:
+  [email protected]([email protected]):
     dependencies:
       chokidar: 3.6.0
       confbox: 0.1.7
@@ -4933,6 +5064,8 @@ snapshots:
       perfect-debounce: 1.0.0
       pkg-types: 1.1.3
       rc9: 2.1.2
+    optionalDependencies:
+      magicast: 0.3.5
 
   [email protected]: {}
 
@@ -4958,8 +5091,8 @@ snapshots:
       loupe: 3.1.1
       pathval: 2.0.0
 
-  ? 
[email protected](@chakra-ui/[email protected](@chakra-ui/[email protected](@emotion/[email protected](@types/[email protected])([email protected]))(@emotion/[email protected](@emotion/[email protected](@types/[email protected])([email protected]))(@types/[email protected])([email protected]))([email protected]))([email protected]))(@chakra-ui/[email protected](@chakra-ui/[email protected](@emotion/[email protected](@types/[email protected])([email protected]))(@emotion/[email protected](@emotion/[email protected](@types/[email protected])([email protected]))(@types/react
 [...]
-  : dependencies:
+  [email protected](uzcvocchpeesoxvtkif6ppnvaq):
+    dependencies:
       '@chakra-ui/form-control': 
2.2.0(@chakra-ui/[email protected](@emotion/[email protected](@types/[email protected])([email protected]))(@emotion/[email protected](@emotion/[email protected](@types/[email protected])([email protected]))(@types/[email protected])([email protected]))([email protected]))([email protected])
       '@chakra-ui/icon': 
3.2.0(@chakra-ui/[email protected](@emotion/[email protected](@types/[email protected])([email protected]))(@emotion/[email protected](@emotion/[email protected](@types/[email protected])([email protected]))(@types/[email protected])([email protected]))([email protected]))([email protected])
       '@chakra-ui/layout': 
2.3.1(@chakra-ui/[email protected](@emotion/[email protected](@types/[email protected])([email protected]))(@emotion/[email protected](@emotion/[email protected](@types/[email protected])([email protected]))(@types/[email protected])([email protected]))([email protected]))([email protected])
@@ -5485,7 +5618,7 @@ snapshots:
 
   [email protected]:
     dependencies:
-      '@types/estree': 1.0.5
+      '@types/estree': 1.0.6
 
   [email protected]: {}
 
@@ -5638,6 +5771,15 @@ snapshots:
     dependencies:
       is-glob: 4.0.3
 
+  [email protected]:
+    dependencies:
+      foreground-child: 3.3.0
+      jackspeak: 3.4.3
+      minimatch: 9.0.5
+      minipass: 7.1.2
+      package-json-from-dist: 1.0.0
+      path-scurry: 1.11.1
+
   [email protected]:
     dependencies:
       foreground-child: 3.3.0
@@ -5716,6 +5858,8 @@ snapshots:
 
   [email protected]: {}
 
+  [email protected]: {}
+
   [email protected]: {}
 
   [email protected]: {}
@@ -5854,6 +5998,27 @@ snapshots:
 
   [email protected]: {}
 
+  [email protected]: {}
+
+  [email protected]:
+    dependencies:
+      istanbul-lib-coverage: 3.2.2
+      make-dir: 4.0.0
+      supports-color: 7.2.0
+
+  [email protected]:
+    dependencies:
+      '@jridgewell/trace-mapping': 0.3.25
+      debug: 4.3.7
+      istanbul-lib-coverage: 3.2.2
+    transitivePeerDependencies:
+      - supports-color
+
+  [email protected]:
+    dependencies:
+      html-escaper: 2.0.2
+      istanbul-lib-report: 3.0.1
+
   [email protected]:
     dependencies:
       define-properties: 1.2.1
@@ -5862,6 +6027,12 @@ snapshots:
       reflect.getprototypeof: 1.0.6
       set-function-name: 2.0.2
 
+  [email protected]:
+    dependencies:
+      '@isaacs/cliui': 8.0.2
+    optionalDependencies:
+      '@pkgjs/parseargs': 0.11.0
+
   [email protected]:
     dependencies:
       '@isaacs/cliui': 8.0.2
@@ -5938,6 +6109,8 @@ snapshots:
     dependencies:
       get-func-name: 2.0.2
 
+  [email protected]: {}
+
   [email protected]: {}
 
   [email protected]: {}
@@ -5946,6 +6119,16 @@ snapshots:
     dependencies:
       '@jridgewell/sourcemap-codec': 1.5.0
 
+  [email protected]:
+    dependencies:
+      '@babel/parser': 7.25.6
+      '@babel/types': 7.25.6
+      source-map-js: 1.2.1
+
+  [email protected]:
+    dependencies:
+      semver: 7.6.3
+
   [email protected]: {}
 
   [email protected]: {}
@@ -6136,6 +6319,11 @@ snapshots:
 
   [email protected]: {}
 
+  [email protected]:
+    dependencies:
+      lru-cache: 10.4.3
+      minipass: 7.1.2
+
   [email protected]:
     dependencies:
       lru-cache: 11.0.1
@@ -6580,17 +6768,25 @@ snapshots:
       mkdirp: 1.0.4
       yallist: 4.0.0
 
+  [email protected]:
+    dependencies:
+      '@istanbuljs/schema': 0.1.3
+      glob: 10.4.5
+      minimatch: 9.0.5
+
   [email protected]: {}
 
   [email protected]: {}
 
   [email protected]: {}
 
+  [email protected]: {}
+
   [email protected]: {}
 
   [email protected]: {}
 
-  [email protected]: {}
+  [email protected]: {}
 
   [email protected]: {}
 
@@ -6716,12 +6912,11 @@ snapshots:
       spdx-correct: 3.2.0
       spdx-expression-parse: 3.0.1
 
-  [email protected](@types/[email protected]):
+  [email protected](@types/[email protected]):
     dependencies:
       cac: 6.7.14
-      debug: 4.3.6
+      debug: 4.3.7
       pathe: 1.1.2
-      tinyrainbow: 1.2.0
       vite: 5.4.4(@types/[email protected])
     transitivePeerDependencies:
       - '@types/node'
@@ -6743,26 +6938,26 @@ snapshots:
       '@types/node': 22.5.4
       fsevents: 2.3.3
 
-  [email protected](@types/[email protected])([email protected]):
+  [email protected](@types/[email protected])([email protected]):
     dependencies:
-      '@ampproject/remapping': 2.3.0
-      '@vitest/expect': 2.0.5
-      '@vitest/pretty-format': 2.0.5
-      '@vitest/runner': 2.0.5
-      '@vitest/snapshot': 2.0.5
-      '@vitest/spy': 2.0.5
-      '@vitest/utils': 2.0.5
+      '@vitest/expect': 2.1.1
+      '@vitest/mocker': 
2.1.1(@vitest/[email protected])([email protected](@types/[email protected]))
+      '@vitest/pretty-format': 2.1.1
+      '@vitest/runner': 2.1.1
+      '@vitest/snapshot': 2.1.1
+      '@vitest/spy': 2.1.1
+      '@vitest/utils': 2.1.1
       chai: 5.1.1
-      debug: 4.3.6
-      execa: 8.0.1
+      debug: 4.3.7
       magic-string: 0.30.11
       pathe: 1.1.2
       std-env: 3.7.0
       tinybench: 2.9.0
+      tinyexec: 0.3.0
       tinypool: 1.0.1
       tinyrainbow: 1.2.0
       vite: 5.4.4(@types/[email protected])
-      vite-node: 2.0.5(@types/[email protected])
+      vite-node: 2.1.1(@types/[email protected])
       why-is-node-running: 2.3.0
     optionalDependencies:
       '@types/node': 22.5.4
@@ -6770,6 +6965,7 @@ snapshots:
     transitivePeerDependencies:
       - less
       - lightningcss
+      - msw
       - sass
       - sass-embedded
       - stylus
diff --git a/airflow/ui/vite.config.ts 
b/airflow/ui/src/utils/ChakraWrapper.test.tsx
similarity index 52%
copy from airflow/ui/vite.config.ts
copy to airflow/ui/src/utils/ChakraWrapper.test.tsx
index 17f03d0ee3..45508e930e 100644
--- a/airflow/ui/vite.config.ts
+++ b/airflow/ui/src/utils/ChakraWrapper.test.tsx
@@ -16,30 +16,25 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-import react from "@vitejs/plugin-react-swc";
-import { defineConfig } from "vitest/config";
+import { render } from "@testing-library/react";
+import { describe, it, expect } from "vitest";
 
-// https://vitejs.dev/config/
-export default defineConfig({
-  build: { chunkSizeWarningLimit: 1600, manifest: true },
-  plugins: [
-    react(),
-    // Replace the directory to work with the flask plugin generation
-    {
-      name: "transform-url-src",
-      transformIndexHtml: (html) =>
-        html
-          .replace(`src="/assets/`, `src="/ui/assets/`)
-          .replace(`href="/`, `href="/ui/`),
-    },
-  ],
-  resolve: { alias: { openapi: "/openapi-gen", src: "/src" } },
-  test: {
-    css: true,
-    environment: "happy-dom",
-    globals: true,
-    mockReset: true,
-    restoreMocks: true,
-    setupFiles: "./testsSetup.ts",
-  },
+import { ChakraWrapper } from "src/utils/ChakraWrapper.tsx";
+
+describe("ChakraWrapper", () => {
+  it("renders children correctly", () => {
+    const { getByText } = render(
+      <ChakraWrapper>
+        <div>Test Child</div>
+      </ChakraWrapper>,
+    );
+
+    expect(getByText("Test Child")).toBeInTheDocument();
+  });
+
+  it("renders without children", () => {
+    const { container } = render(<ChakraWrapper />);
+
+    expect(container).toBeInTheDocument();
+  });
 });
diff --git a/airflow/ui/vite.config.ts 
b/airflow/ui/src/utils/RouterWrapper.test.tsx
similarity index 52%
copy from airflow/ui/vite.config.ts
copy to airflow/ui/src/utils/RouterWrapper.test.tsx
index 17f03d0ee3..b3af0db143 100644
--- a/airflow/ui/vite.config.ts
+++ b/airflow/ui/src/utils/RouterWrapper.test.tsx
@@ -16,30 +16,25 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-import react from "@vitejs/plugin-react-swc";
-import { defineConfig } from "vitest/config";
+import { render } from "@testing-library/react";
+import { describe, it, expect } from "vitest";
 
-// https://vitejs.dev/config/
-export default defineConfig({
-  build: { chunkSizeWarningLimit: 1600, manifest: true },
-  plugins: [
-    react(),
-    // Replace the directory to work with the flask plugin generation
-    {
-      name: "transform-url-src",
-      transformIndexHtml: (html) =>
-        html
-          .replace(`src="/assets/`, `src="/ui/assets/`)
-          .replace(`href="/`, `href="/ui/`),
-    },
-  ],
-  resolve: { alias: { openapi: "/openapi-gen", src: "/src" } },
-  test: {
-    css: true,
-    environment: "happy-dom",
-    globals: true,
-    mockReset: true,
-    restoreMocks: true,
-    setupFiles: "./testsSetup.ts",
-  },
+import { RouterWrapper } from "src/utils/RouterWrapper.tsx";
+
+describe("RouterWrapper", () => {
+  it("renders children correctly", () => {
+    const { getByText } = render(
+      <RouterWrapper>
+        <div>Test Child</div>
+      </RouterWrapper>,
+    );
+
+    expect(getByText("Test Child")).toBeInTheDocument();
+  });
+
+  it("renders without children", () => {
+    const { container } = render(<RouterWrapper />);
+
+    expect(container).toBeInTheDocument();
+  });
 });
diff --git a/airflow/ui/vite.config.ts b/airflow/ui/vite.config.ts
index 17f03d0ee3..06ad450f37 100644
--- a/airflow/ui/vite.config.ts
+++ b/airflow/ui/vite.config.ts
@@ -35,6 +35,9 @@ export default defineConfig({
   ],
   resolve: { alias: { openapi: "/openapi-gen", src: "/src" } },
   test: {
+    coverage: {
+      include: ["src/**/*.ts", "src/**/*.tsx"],
+    },
     css: true,
     environment: "happy-dom",
     globals: true,
diff --git a/contributing-docs/14_node_environment_setup.rst 
b/contributing-docs/14_node_environment_setup.rst
index 99da685aeb..8d98f0860f 100644
--- a/contributing-docs/14_node_environment_setup.rst
+++ b/contributing-docs/14_node_environment_setup.rst
@@ -70,6 +70,9 @@ Follow the `pnpm docs <https://pnpm.io/installation>`__ to 
install pnpm locally
     # Run tests for all .test.ts, test.tsx files
     pnpm test
 
+    # Run coverage
+    pnpm coverage
+
     # Generate queries and types from the REST API OpenAPI spec
     pnpm codegen
 

Reply via email to