diff --git a/.github/workflows/cleanup_closed_pr_packages.yaml b/.github/workflows/cleanup_closed_pr_packages.yaml new file mode 100644 index 000000000..ac302b7a3 --- /dev/null +++ b/.github/workflows/cleanup_closed_pr_packages.yaml @@ -0,0 +1,23 @@ +name: Cleanup GHCR docker packages on closed pull request + +on: + pull_request_target: + types: + - closed + +jobs: + cleanup-package: + name: Cleanup closed PR package + runs-on: ubuntu-latest + steps: + - name: Cleanup web package + uses: snok/container-retention-policy@v2 + with: + image-names: ${{ github.event.repository.name }}-web + cut-off: now UTC + timestamp-to-use: created_at + account-type: org + org-name: ${{ github.repository_owner }} + keep-at-least: 0 + filter-tags: pr-${{github.event.pull_request.number}} + token: ${{ secrets.PAT }} \ No newline at end of file diff --git a/.github/workflows/deploy_master.yaml b/.github/workflows/deploy_master.yaml new file mode 100644 index 000000000..dfc8ea4ea --- /dev/null +++ b/.github/workflows/deploy_master.yaml @@ -0,0 +1,51 @@ +name: Deploy web docker image to GHCR registry on push to master + +on: + push: + branches: + - master + +env: + REGISTRY: ghcr.io + IMAGE_NAME: ${{ github.repository }}-web + +jobs: + deploy-web: + runs-on: ubuntu-latest + + permissions: + contents: read + packages: write + + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Login to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@v5.0.0 + with: + images: ${{ env.REGISTRY }}/${{ env.WORKER_IMAGE_NAME }} + + - name: Build and push Docker image + uses: docker/build-push-action@v5 + with: + provenance: false + context: . + push: true + tags: ${{ steps.meta.outputs.tags }}, ${{ steps.meta.outputs.tags }}-${{github.run_number}} + labels: ${{ steps.meta.outputs.labels }} + build-args: | + BUILDKIT_CONTEXT_KEEP_GIT_DIR=true + DEPLOYMENT=dev diff --git a/.github/workflows/manual_deploy.yml b/.github/workflows/manual_deploy.yml index 1c41ad076..202db6a9d 100644 --- a/.github/workflows/manual_deploy.yml +++ b/.github/workflows/manual_deploy.yml @@ -55,11 +55,15 @@ jobs: uses: docker/metadata-action@v5.4.0 with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + # Need to override the tag with pr-{issue_number} to make the retention working properly + tags: | + type=raw,value=pr-${{ github.event.issue.number }} # see https://github.com/docker/build-push-action/issues/513#issuecomment-987951050 - name: Build and push Docker image uses: docker/build-push-action@v5 with: + provenance: false context: . push: true tags: ${{ steps.meta.outputs.tags }} diff --git a/.github/workflows/packages_retention.yaml b/.github/workflows/packages_retention.yaml new file mode 100644 index 000000000..34def6c82 --- /dev/null +++ b/.github/workflows/packages_retention.yaml @@ -0,0 +1,48 @@ +name: Retention policy for web GHCR docker packages + +on: + schedule: + - cron: '30 4 * * *' # Running everyday at 04:30 AM + workflow_dispatch: + +jobs: + cleanup-packages: + name: Cleanup old GHCR docker packages + runs-on: ubuntu-latest + steps: + - name: Cleanup web outdated PR packages + uses: snok/container-retention-policy@v2 + with: + image-names: ${{ github.event.repository.name }}-web + cut-off: 1 day ago UTC + timestamp-to-use: created_at + account-type: org + org-name: ${{ github.repository_owner }} + keep-at-least: 0 + untagged-only: true + token: ${{ secrets.PAT }} + - name: Cleanup web latest but old PR packages + uses: snok/container-retention-policy@v2 + with: + image-names: ${{ github.event.repository.name }}-web + cut-off: 3 days ago UTC + timestamp-to-use: created_at + account-type: org + org-name: ${{ github.repository_owner }} + keep-at-least: 0 + filter-include-untagged: false + filter-tags: pr-* + token: ${{ secrets.PAT }} + - name: Cleanup web outdated master packages + uses: snok/container-retention-policy@v2 + with: + image-names: ${{ github.event.repository.name }}-web + cut-off: 2 days ago UTC + timestamp-to-use: created_at + account-type: org + org-name: ${{ github.repository_owner }} + keep-at-least: 0 + filter-include-untagged: false + filter-tags: master-* + skip-tags: master # Don't remove the newest master image + token: ${{ secrets.PAT }} diff --git a/package-lock.json b/package-lock.json index ed853792a..f2317963d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,15 +13,15 @@ "@emotion/react": "^11.11.3", "@emotion/styled": "^11.11.0", "@minoru/react-dnd-treeview": "^3.4.4", - "@mui/icons-material": "^5.15.1", - "@mui/lab": "^5.0.0-alpha.157", - "@mui/material": "^5.15.1", + "@mui/icons-material": "^5.15.2", + "@mui/lab": "^5.0.0-alpha.159", + "@mui/material": "^5.15.3", "@mui/x-data-grid": "^6.18.6", - "@testing-library/jest-dom": "^6.1.5", + "@testing-library/jest-dom": "^6.2.0", "@testing-library/react": "^12.1.2", - "@testing-library/user-event": "^14.5.1", + "@testing-library/user-event": "^14.5.2", "@types/jest": "^29.5.11", - "@types/node": "^20.10.5", + "@types/node": "^20.10.6", "@types/react-dom": "^17.0.11", "@types/signals": "^1.0.4", "@types/throttle-debounce": "^5.0.2", @@ -55,7 +55,7 @@ "typescript": "^5.2.2", "use-interval": "^1.4.0", "usehooks-ts": "^2.9.1", - "web-vitals": "^3.5.0" + "web-vitals": "^3.5.1" }, "devDependencies": { "@total-typescript/ts-reset": "^0.5.1", @@ -1946,9 +1946,9 @@ "integrity": "sha512-x/rqGMdzj+fWZvCOYForTghzbtqPDZ5gPwaoNGHdgDfF2QA/XZbCBp4Moo5scrkAMPhB7z26XM/AaHuIJdgauA==" }, "node_modules/@babel/runtime": { - "version": "7.23.5", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.23.5.tgz", - "integrity": "sha512-NdUTHcPe4C99WxPub+K9l9tK5/lV4UXIoaHSYgzco9BCyjKAAwzdBI+wWtYqHt7LJdbo74ZjRPJgzVweq1sz0w==", + "version": "7.23.7", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.23.7.tgz", + "integrity": "sha512-w06OXVOFso7LcbzMiDGt+3X7Rh7Ho8MmgPoWU3rarH+8upf+wSU/grlGbWzQyr3DkdN6ZeuMFjpdwW0Q+HxobA==", "dependencies": { "regenerator-runtime": "^0.14.0" }, @@ -3704,14 +3704,14 @@ } }, "node_modules/@mui/base": { - "version": "5.0.0-beta.28", - "resolved": "https://registry.npmjs.org/@mui/base/-/base-5.0.0-beta.28.tgz", - "integrity": "sha512-KIoSc5sUFceeCaZTq5MQBapFzhHqMo4kj+4azWaCAjorduhcRQtN+BCgVHmo+gvEjix74bUfxwTqGifnu2fNTg==", + "version": "5.0.0-beta.30", + "resolved": "https://registry.npmjs.org/@mui/base/-/base-5.0.0-beta.30.tgz", + "integrity": "sha512-dc38W4W3K42atE9nSaOeoJ7/x9wGIfawdwC/UmMxMLlZ1iSsITQ8dQJaTATCbn98YvYPINK/EH541YA5enQIPQ==", "dependencies": { - "@babel/runtime": "^7.23.5", + "@babel/runtime": "^7.23.6", "@floating-ui/react-dom": "^2.0.4", - "@mui/types": "^7.2.11", - "@mui/utils": "^5.15.1", + "@mui/types": "^7.2.12", + "@mui/utils": "^5.15.3", "@popperjs/core": "^2.11.8", "clsx": "^2.0.0", "prop-types": "^15.8.1" @@ -3735,28 +3735,28 @@ } }, "node_modules/@mui/base/node_modules/clsx": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.0.0.tgz", - "integrity": "sha512-rQ1+kcj+ttHG0MKVGBUXwayCCF1oh39BF5COIpRzuCEv8Mwjv0XucrI2ExNTOn9IlLifGClWQcU9BrZORvtw6Q==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.1.0.tgz", + "integrity": "sha512-m3iNNWpd9rl3jvvcBnu70ylMdrXt8Vlq4HYadnU5fwcOtvkSQWPmj7amUcDT2qYI7risszBjI5AUIUox9D16pg==", "engines": { "node": ">=6" } }, "node_modules/@mui/core-downloads-tracker": { - "version": "5.15.1", - "resolved": "https://registry.npmjs.org/@mui/core-downloads-tracker/-/core-downloads-tracker-5.15.1.tgz", - "integrity": "sha512-y/nUEsWHyBzaKYp9zLtqJKrLod/zMNEWpMj488FuQY9QTmqBiyUhI2uh7PVaLqLewXRtdmG6JV0b6T5exyuYRw==", + "version": "5.15.3", + "resolved": "https://registry.npmjs.org/@mui/core-downloads-tracker/-/core-downloads-tracker-5.15.3.tgz", + "integrity": "sha512-sWeihiVyxdJjpLkp8SHkTy9kt2M/o11M60G1MzwljGL2BXdM3Ktzqv5QaQHdi00y7Y1ulvtI3GOSxP2xU8mQJw==", "funding": { "type": "opencollective", "url": "https://opencollective.com/mui-org" } }, "node_modules/@mui/icons-material": { - "version": "5.15.1", - "resolved": "https://registry.npmjs.org/@mui/icons-material/-/icons-material-5.15.1.tgz", - "integrity": "sha512-VPJdBSyap6uOxCb5BLbWbkvd6aeJCp1pQZm8DcZBITCH0NOSv8Mz9c8Zvo8xr4Od7+xyWHUAgvRSL4047pL2WQ==", + "version": "5.15.2", + "resolved": "https://registry.npmjs.org/@mui/icons-material/-/icons-material-5.15.2.tgz", + "integrity": "sha512-Vs0Z6cd6ieTavMjqPvIJJfwsKaCLdRSErk5LjKdZlBqk7r2SR6roDyhVTQuZOeCzjEFj0qZ4iVPp2DJZRwuYbw==", "dependencies": { - "@babel/runtime": "^7.23.5" + "@babel/runtime": "^7.23.6" }, "engines": { "node": ">=12.0.0" @@ -3777,15 +3777,15 @@ } }, "node_modules/@mui/lab": { - "version": "5.0.0-alpha.157", - "resolved": "https://registry.npmjs.org/@mui/lab/-/lab-5.0.0-alpha.157.tgz", - "integrity": "sha512-gY7UM2kNSxiVLfsm0o6HG2G5rM2Vr47prJhDCazY+VG/NOSRc8CG7la6dpL9WDTJhotEZdWwfj1FOUxTonmuQA==", - "dependencies": { - "@babel/runtime": "^7.23.5", - "@mui/base": "5.0.0-beta.28", - "@mui/system": "^5.15.1", - "@mui/types": "^7.2.11", - "@mui/utils": "^5.15.1", + "version": "5.0.0-alpha.159", + "resolved": "https://registry.npmjs.org/@mui/lab/-/lab-5.0.0-alpha.159.tgz", + "integrity": "sha512-42Y8nf2/mDgYSLOw6PhOfHNV6P7tPcQkQEL0DTbY7a+gc+hXDsyVEzBMYST1MrV64EHTH68msfQm+k3CvLON/g==", + "dependencies": { + "@babel/runtime": "^7.23.6", + "@mui/base": "5.0.0-beta.30", + "@mui/system": "^5.15.3", + "@mui/types": "^7.2.12", + "@mui/utils": "^5.15.3", "clsx": "^2.0.0", "prop-types": "^15.8.1" }, @@ -3825,16 +3825,16 @@ } }, "node_modules/@mui/material": { - "version": "5.15.1", - "resolved": "https://registry.npmjs.org/@mui/material/-/material-5.15.1.tgz", - "integrity": "sha512-WA5DVyvacxDakVyAhNqu/rRT28ppuuUFFw1bLpmRzrCJ4uw/zLTATcd4WB3YbB+7MdZNEGG/SJNWTDLEIyn3xQ==", - "dependencies": { - "@babel/runtime": "^7.23.5", - "@mui/base": "5.0.0-beta.28", - "@mui/core-downloads-tracker": "^5.15.1", - "@mui/system": "^5.15.1", - "@mui/types": "^7.2.11", - "@mui/utils": "^5.15.1", + "version": "5.15.3", + "resolved": "https://registry.npmjs.org/@mui/material/-/material-5.15.3.tgz", + "integrity": "sha512-DODBBMouyq1B5f3YkEWL9vO8pGCxuEGqtfpltF6peMJzz/78tJFyLQsDas9MNLC/8AdFu2BQdkK7wox5UBPTAA==", + "dependencies": { + "@babel/runtime": "^7.23.6", + "@mui/base": "5.0.0-beta.30", + "@mui/core-downloads-tracker": "^5.15.3", + "@mui/system": "^5.15.3", + "@mui/types": "^7.2.12", + "@mui/utils": "^5.15.3", "@types/react-transition-group": "^4.4.10", "clsx": "^2.0.0", "csstype": "^3.1.2", @@ -3869,20 +3869,20 @@ } }, "node_modules/@mui/material/node_modules/clsx": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.0.0.tgz", - "integrity": "sha512-rQ1+kcj+ttHG0MKVGBUXwayCCF1oh39BF5COIpRzuCEv8Mwjv0XucrI2ExNTOn9IlLifGClWQcU9BrZORvtw6Q==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.1.0.tgz", + "integrity": "sha512-m3iNNWpd9rl3jvvcBnu70ylMdrXt8Vlq4HYadnU5fwcOtvkSQWPmj7amUcDT2qYI7risszBjI5AUIUox9D16pg==", "engines": { "node": ">=6" } }, "node_modules/@mui/private-theming": { - "version": "5.15.1", - "resolved": "https://registry.npmjs.org/@mui/private-theming/-/private-theming-5.15.1.tgz", - "integrity": "sha512-wTbzuy5KjSvCPE9UVJktWHJ0b/tD5biavY9wvF+OpYDLPpdXK52vc1hTDxSbdkHIFMkJExzrwO9GvpVAHZBnFQ==", + "version": "5.15.3", + "resolved": "https://registry.npmjs.org/@mui/private-theming/-/private-theming-5.15.3.tgz", + "integrity": "sha512-Q79MhVMmywC1l5bMsMZq5PsIudr1MNPJnx9/EqdMP0vpz5iNvFpnLmxsD7d8/hqTWgFAljI+LH3jX8MxlZH9Gw==", "dependencies": { - "@babel/runtime": "^7.23.5", - "@mui/utils": "^5.15.1", + "@babel/runtime": "^7.23.6", + "@mui/utils": "^5.15.3", "prop-types": "^15.8.1" }, "engines": { @@ -3903,11 +3903,11 @@ } }, "node_modules/@mui/styled-engine": { - "version": "5.15.1", - "resolved": "https://registry.npmjs.org/@mui/styled-engine/-/styled-engine-5.15.1.tgz", - "integrity": "sha512-7WDZTJLqGexWDjqE9oAgjU8ak6hEtUw2yQU7SIYID5kLVO2Nj/Wi/KicbLsXnTsJNvSqePIlUIWTBSXwWJCPZw==", + "version": "5.15.3", + "resolved": "https://registry.npmjs.org/@mui/styled-engine/-/styled-engine-5.15.3.tgz", + "integrity": "sha512-+d5XZCTeemOO/vBfWGEeHgTm8fjU1Psdgm+xAw+uegycO2EnoA/EfGSaG5UwZ6g3b66y48Mkxi35AggShMr88w==", "dependencies": { - "@babel/runtime": "^7.23.5", + "@babel/runtime": "^7.23.6", "@emotion/cache": "^11.11.0", "csstype": "^3.1.2", "prop-types": "^15.8.1" @@ -3934,15 +3934,15 @@ } }, "node_modules/@mui/system": { - "version": "5.15.1", - "resolved": "https://registry.npmjs.org/@mui/system/-/system-5.15.1.tgz", - "integrity": "sha512-LAnP0ls69rqW9eBgI29phIx/lppv+WDGI7b3EJN7VZIqw0RezA0GD7NRpV12BgEYJABEii6z5Q9B5tg7dsX0Iw==", - "dependencies": { - "@babel/runtime": "^7.23.5", - "@mui/private-theming": "^5.15.1", - "@mui/styled-engine": "^5.15.1", - "@mui/types": "^7.2.11", - "@mui/utils": "^5.15.1", + "version": "5.15.3", + "resolved": "https://registry.npmjs.org/@mui/system/-/system-5.15.3.tgz", + "integrity": "sha512-ewVU4eRgo4VfNMGpO61cKlfWmH7l9s6rA8EknRzuMX3DbSLfmtW2WJJg6qPwragvpPIir0Pp/AdWVSDhyNy5Tw==", + "dependencies": { + "@babel/runtime": "^7.23.6", + "@mui/private-theming": "^5.15.3", + "@mui/styled-engine": "^5.15.3", + "@mui/types": "^7.2.12", + "@mui/utils": "^5.15.3", "clsx": "^2.0.0", "csstype": "^3.1.2", "prop-types": "^15.8.1" @@ -3981,9 +3981,9 @@ } }, "node_modules/@mui/types": { - "version": "7.2.11", - "resolved": "https://registry.npmjs.org/@mui/types/-/types-7.2.11.tgz", - "integrity": "sha512-KWe/QTEsFFlFSH+qRYf3zoFEj3z67s+qAuSnMMg+gFwbxG7P96Hm6g300inQL1Wy///gSRb8juX7Wafvp93m3w==", + "version": "7.2.12", + "resolved": "https://registry.npmjs.org/@mui/types/-/types-7.2.12.tgz", + "integrity": "sha512-3kaHiNm9khCAo0pVe0RenketDSFoZGAlVZ4zDjB/QNZV0XiCj+sh1zkX0VVhQPgYJDlBEzAag+MHJ1tU3vf0Zw==", "peerDependencies": { "@types/react": "^17.0.0 || ^18.0.0" }, @@ -3994,11 +3994,11 @@ } }, "node_modules/@mui/utils": { - "version": "5.15.1", - "resolved": "https://registry.npmjs.org/@mui/utils/-/utils-5.15.1.tgz", - "integrity": "sha512-V1/d0E3Bju5YdB59HJf2G0tnHrFEvWLN+f8hAXp9+JSNy/LC2zKyqUfPPahflR6qsI681P8G9r4mEZte/SrrYA==", + "version": "5.15.3", + "resolved": "https://registry.npmjs.org/@mui/utils/-/utils-5.15.3.tgz", + "integrity": "sha512-mT3LiSt9tZWCdx1pl7q4Q5tNo6gdZbvJel286ZHGuj6LQQXjWNAh8qiF9d+LogvNUI+D7eLkTnj605d1zoazfg==", "dependencies": { - "@babel/runtime": "^7.23.5", + "@babel/runtime": "^7.23.6", "@types/prop-types": "^15.7.11", "prop-types": "^15.8.1", "react-is": "^18.2.0" @@ -4602,16 +4602,16 @@ } }, "node_modules/@testing-library/jest-dom": { - "version": "6.1.5", - "resolved": "https://registry.npmjs.org/@testing-library/jest-dom/-/jest-dom-6.1.5.tgz", - "integrity": "sha512-3y04JLW+EceVPy2Em3VwNr95dOKqA8DhR0RJHhHKDZNYXcVXnEK7WIrpj4eYU8SVt/qYZ2aRWt/WgQ+grNES8g==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/@testing-library/jest-dom/-/jest-dom-6.2.0.tgz", + "integrity": "sha512-+BVQlJ9cmEn5RDMUS8c2+TU6giLvzaHZ8sU/x0Jj7fk+6/46wPdwlgOPcpxS17CjcanBi/3VmGMqVr2rmbUmNw==", "dependencies": { - "@adobe/css-tools": "^4.3.1", + "@adobe/css-tools": "^4.3.2", "@babel/runtime": "^7.9.2", "aria-query": "^5.0.0", "chalk": "^3.0.0", "css.escape": "^1.5.1", - "dom-accessibility-api": "^0.5.6", + "dom-accessibility-api": "^0.6.3", "lodash": "^4.17.15", "redent": "^3.0.0" }, @@ -4653,6 +4653,11 @@ "node": ">=8" } }, + "node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/dom-accessibility-api/-/dom-accessibility-api-0.6.3.tgz", + "integrity": "sha512-7ZgogeTnjuHbo+ct10G9Ffp0mif17idi0IyWNVA/wcwcm7NPOD/WEHVP3n7n3MhXqxoIYm8d6MuZohYWIZ4T3w==" + }, "node_modules/@testing-library/react": { "version": "12.1.5", "resolved": "https://registry.npmjs.org/@testing-library/react/-/react-12.1.5.tgz", @@ -4689,9 +4694,9 @@ } }, "node_modules/@testing-library/user-event": { - "version": "14.5.1", - "resolved": "https://registry.npmjs.org/@testing-library/user-event/-/user-event-14.5.1.tgz", - "integrity": "sha512-UCcUKrUYGj7ClomOo2SpNVvx4/fkd/2BbIHDCle8A0ax+P3bU7yJwDBDrS6ZwdTMARWTGODX1hEsCcO+7beJjg==", + "version": "14.5.2", + "resolved": "https://registry.npmjs.org/@testing-library/user-event/-/user-event-14.5.2.tgz", + "integrity": "sha512-YAh82Wh4TIrxYLmfGcixwD18oIjyC1pFQC2Y01F2lzV2HTMiYrI0nze0FD0ocB//CKS/7jIUgae+adPqxK5yCQ==", "engines": { "node": ">=12", "npm": ">=6" @@ -4965,9 +4970,9 @@ "integrity": "sha512-Y4XFY5VJAuw0FgAqPNd6NNoV44jbq9Bz2L7Rh/J6jLTiHBSBJa9fxqQIvkIld4GsoDOcCbvzOUAbLPsSKKg+uA==" }, "node_modules/@types/node": { - "version": "20.10.5", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.10.5.tgz", - "integrity": "sha512-nNPsNE65wjMxEKI93yOP+NPGGBJz/PoN3kZsVLee0XMiJolxSekEVD8wRwBUBqkwc7UWop0edW50yrCQW4CyRw==", + "version": "20.10.6", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.10.6.tgz", + "integrity": "sha512-Vac8H+NlRNNlAmDfGUP7b5h/KA+AtWIzuXy0E6OyP8f1tCLYAtPvKRRDJjAPqhpCb0t6U2j7/xqAuLEebW2kiw==", "dependencies": { "undici-types": "~5.26.4" } @@ -22111,9 +22116,9 @@ } }, "node_modules/web-vitals": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/web-vitals/-/web-vitals-3.5.0.tgz", - "integrity": "sha512-f5YnCHVG9Y6uLCePD4tY8bO/Ge15NPEQWtvm3tPzDKygloiqtb4SVqRHBcrIAqo2ztqX5XueqDn97zHF0LdT6w==" + "version": "3.5.1", + "resolved": "https://registry.npmjs.org/web-vitals/-/web-vitals-3.5.1.tgz", + "integrity": "sha512-xQ9lvIpfLxUj0eSmT79ZjRoU5wIRfIr7pNukL7ZE4EcWZSmfZQqOlhuAGfkVa3EFmzPHZhWhXfm2i5ys+THVPg==" }, "node_modules/webidl-conversions": { "version": "6.1.0", @@ -24294,9 +24299,9 @@ "integrity": "sha512-x/rqGMdzj+fWZvCOYForTghzbtqPDZ5gPwaoNGHdgDfF2QA/XZbCBp4Moo5scrkAMPhB7z26XM/AaHuIJdgauA==" }, "@babel/runtime": { - "version": "7.23.5", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.23.5.tgz", - "integrity": "sha512-NdUTHcPe4C99WxPub+K9l9tK5/lV4UXIoaHSYgzco9BCyjKAAwzdBI+wWtYqHt7LJdbo74ZjRPJgzVweq1sz0w==", + "version": "7.23.7", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.23.7.tgz", + "integrity": "sha512-w06OXVOFso7LcbzMiDGt+3X7Rh7Ho8MmgPoWU3rarH+8upf+wSU/grlGbWzQyr3DkdN6ZeuMFjpdwW0Q+HxobA==", "requires": { "regenerator-runtime": "^0.14.0" }, @@ -25613,49 +25618,49 @@ } }, "@mui/base": { - "version": "5.0.0-beta.28", - "resolved": "https://registry.npmjs.org/@mui/base/-/base-5.0.0-beta.28.tgz", - "integrity": "sha512-KIoSc5sUFceeCaZTq5MQBapFzhHqMo4kj+4azWaCAjorduhcRQtN+BCgVHmo+gvEjix74bUfxwTqGifnu2fNTg==", + "version": "5.0.0-beta.30", + "resolved": "https://registry.npmjs.org/@mui/base/-/base-5.0.0-beta.30.tgz", + "integrity": "sha512-dc38W4W3K42atE9nSaOeoJ7/x9wGIfawdwC/UmMxMLlZ1iSsITQ8dQJaTATCbn98YvYPINK/EH541YA5enQIPQ==", "requires": { - "@babel/runtime": "^7.23.5", + "@babel/runtime": "^7.23.6", "@floating-ui/react-dom": "^2.0.4", - "@mui/types": "^7.2.11", - "@mui/utils": "^5.15.1", + "@mui/types": "^7.2.12", + "@mui/utils": "^5.15.3", "@popperjs/core": "^2.11.8", "clsx": "^2.0.0", "prop-types": "^15.8.1" }, "dependencies": { "clsx": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.0.0.tgz", - "integrity": "sha512-rQ1+kcj+ttHG0MKVGBUXwayCCF1oh39BF5COIpRzuCEv8Mwjv0XucrI2ExNTOn9IlLifGClWQcU9BrZORvtw6Q==" + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.1.0.tgz", + "integrity": "sha512-m3iNNWpd9rl3jvvcBnu70ylMdrXt8Vlq4HYadnU5fwcOtvkSQWPmj7amUcDT2qYI7risszBjI5AUIUox9D16pg==" } } }, "@mui/core-downloads-tracker": { - "version": "5.15.1", - "resolved": "https://registry.npmjs.org/@mui/core-downloads-tracker/-/core-downloads-tracker-5.15.1.tgz", - "integrity": "sha512-y/nUEsWHyBzaKYp9zLtqJKrLod/zMNEWpMj488FuQY9QTmqBiyUhI2uh7PVaLqLewXRtdmG6JV0b6T5exyuYRw==" + "version": "5.15.3", + "resolved": "https://registry.npmjs.org/@mui/core-downloads-tracker/-/core-downloads-tracker-5.15.3.tgz", + "integrity": "sha512-sWeihiVyxdJjpLkp8SHkTy9kt2M/o11M60G1MzwljGL2BXdM3Ktzqv5QaQHdi00y7Y1ulvtI3GOSxP2xU8mQJw==" }, "@mui/icons-material": { - "version": "5.15.1", - "resolved": "https://registry.npmjs.org/@mui/icons-material/-/icons-material-5.15.1.tgz", - "integrity": "sha512-VPJdBSyap6uOxCb5BLbWbkvd6aeJCp1pQZm8DcZBITCH0NOSv8Mz9c8Zvo8xr4Od7+xyWHUAgvRSL4047pL2WQ==", + "version": "5.15.2", + "resolved": "https://registry.npmjs.org/@mui/icons-material/-/icons-material-5.15.2.tgz", + "integrity": "sha512-Vs0Z6cd6ieTavMjqPvIJJfwsKaCLdRSErk5LjKdZlBqk7r2SR6roDyhVTQuZOeCzjEFj0qZ4iVPp2DJZRwuYbw==", "requires": { - "@babel/runtime": "^7.23.5" + "@babel/runtime": "^7.23.6" } }, "@mui/lab": { - "version": "5.0.0-alpha.157", - "resolved": "https://registry.npmjs.org/@mui/lab/-/lab-5.0.0-alpha.157.tgz", - "integrity": "sha512-gY7UM2kNSxiVLfsm0o6HG2G5rM2Vr47prJhDCazY+VG/NOSRc8CG7la6dpL9WDTJhotEZdWwfj1FOUxTonmuQA==", - "requires": { - "@babel/runtime": "^7.23.5", - "@mui/base": "5.0.0-beta.28", - "@mui/system": "^5.15.1", - "@mui/types": "^7.2.11", - "@mui/utils": "^5.15.1", + "version": "5.0.0-alpha.159", + "resolved": "https://registry.npmjs.org/@mui/lab/-/lab-5.0.0-alpha.159.tgz", + "integrity": "sha512-42Y8nf2/mDgYSLOw6PhOfHNV6P7tPcQkQEL0DTbY7a+gc+hXDsyVEzBMYST1MrV64EHTH68msfQm+k3CvLON/g==", + "requires": { + "@babel/runtime": "^7.23.6", + "@mui/base": "5.0.0-beta.30", + "@mui/system": "^5.15.3", + "@mui/types": "^7.2.12", + "@mui/utils": "^5.15.3", "clsx": "^2.0.0", "prop-types": "^15.8.1" }, @@ -25668,16 +25673,16 @@ } }, "@mui/material": { - "version": "5.15.1", - "resolved": "https://registry.npmjs.org/@mui/material/-/material-5.15.1.tgz", - "integrity": "sha512-WA5DVyvacxDakVyAhNqu/rRT28ppuuUFFw1bLpmRzrCJ4uw/zLTATcd4WB3YbB+7MdZNEGG/SJNWTDLEIyn3xQ==", - "requires": { - "@babel/runtime": "^7.23.5", - "@mui/base": "5.0.0-beta.28", - "@mui/core-downloads-tracker": "^5.15.1", - "@mui/system": "^5.15.1", - "@mui/types": "^7.2.11", - "@mui/utils": "^5.15.1", + "version": "5.15.3", + "resolved": "https://registry.npmjs.org/@mui/material/-/material-5.15.3.tgz", + "integrity": "sha512-DODBBMouyq1B5f3YkEWL9vO8pGCxuEGqtfpltF6peMJzz/78tJFyLQsDas9MNLC/8AdFu2BQdkK7wox5UBPTAA==", + "requires": { + "@babel/runtime": "^7.23.6", + "@mui/base": "5.0.0-beta.30", + "@mui/core-downloads-tracker": "^5.15.3", + "@mui/system": "^5.15.3", + "@mui/types": "^7.2.12", + "@mui/utils": "^5.15.3", "@types/react-transition-group": "^4.4.10", "clsx": "^2.0.0", "csstype": "^3.1.2", @@ -25687,43 +25692,43 @@ }, "dependencies": { "clsx": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.0.0.tgz", - "integrity": "sha512-rQ1+kcj+ttHG0MKVGBUXwayCCF1oh39BF5COIpRzuCEv8Mwjv0XucrI2ExNTOn9IlLifGClWQcU9BrZORvtw6Q==" + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.1.0.tgz", + "integrity": "sha512-m3iNNWpd9rl3jvvcBnu70ylMdrXt8Vlq4HYadnU5fwcOtvkSQWPmj7amUcDT2qYI7risszBjI5AUIUox9D16pg==" } } }, "@mui/private-theming": { - "version": "5.15.1", - "resolved": "https://registry.npmjs.org/@mui/private-theming/-/private-theming-5.15.1.tgz", - "integrity": "sha512-wTbzuy5KjSvCPE9UVJktWHJ0b/tD5biavY9wvF+OpYDLPpdXK52vc1hTDxSbdkHIFMkJExzrwO9GvpVAHZBnFQ==", + "version": "5.15.3", + "resolved": "https://registry.npmjs.org/@mui/private-theming/-/private-theming-5.15.3.tgz", + "integrity": "sha512-Q79MhVMmywC1l5bMsMZq5PsIudr1MNPJnx9/EqdMP0vpz5iNvFpnLmxsD7d8/hqTWgFAljI+LH3jX8MxlZH9Gw==", "requires": { - "@babel/runtime": "^7.23.5", - "@mui/utils": "^5.15.1", + "@babel/runtime": "^7.23.6", + "@mui/utils": "^5.15.3", "prop-types": "^15.8.1" } }, "@mui/styled-engine": { - "version": "5.15.1", - "resolved": "https://registry.npmjs.org/@mui/styled-engine/-/styled-engine-5.15.1.tgz", - "integrity": "sha512-7WDZTJLqGexWDjqE9oAgjU8ak6hEtUw2yQU7SIYID5kLVO2Nj/Wi/KicbLsXnTsJNvSqePIlUIWTBSXwWJCPZw==", + "version": "5.15.3", + "resolved": "https://registry.npmjs.org/@mui/styled-engine/-/styled-engine-5.15.3.tgz", + "integrity": "sha512-+d5XZCTeemOO/vBfWGEeHgTm8fjU1Psdgm+xAw+uegycO2EnoA/EfGSaG5UwZ6g3b66y48Mkxi35AggShMr88w==", "requires": { - "@babel/runtime": "^7.23.5", + "@babel/runtime": "^7.23.6", "@emotion/cache": "^11.11.0", "csstype": "^3.1.2", "prop-types": "^15.8.1" } }, "@mui/system": { - "version": "5.15.1", - "resolved": "https://registry.npmjs.org/@mui/system/-/system-5.15.1.tgz", - "integrity": "sha512-LAnP0ls69rqW9eBgI29phIx/lppv+WDGI7b3EJN7VZIqw0RezA0GD7NRpV12BgEYJABEii6z5Q9B5tg7dsX0Iw==", - "requires": { - "@babel/runtime": "^7.23.5", - "@mui/private-theming": "^5.15.1", - "@mui/styled-engine": "^5.15.1", - "@mui/types": "^7.2.11", - "@mui/utils": "^5.15.1", + "version": "5.15.3", + "resolved": "https://registry.npmjs.org/@mui/system/-/system-5.15.3.tgz", + "integrity": "sha512-ewVU4eRgo4VfNMGpO61cKlfWmH7l9s6rA8EknRzuMX3DbSLfmtW2WJJg6qPwragvpPIir0Pp/AdWVSDhyNy5Tw==", + "requires": { + "@babel/runtime": "^7.23.6", + "@mui/private-theming": "^5.15.3", + "@mui/styled-engine": "^5.15.3", + "@mui/types": "^7.2.12", + "@mui/utils": "^5.15.3", "clsx": "^2.0.0", "csstype": "^3.1.2", "prop-types": "^15.8.1" @@ -25737,17 +25742,17 @@ } }, "@mui/types": { - "version": "7.2.11", - "resolved": "https://registry.npmjs.org/@mui/types/-/types-7.2.11.tgz", - "integrity": "sha512-KWe/QTEsFFlFSH+qRYf3zoFEj3z67s+qAuSnMMg+gFwbxG7P96Hm6g300inQL1Wy///gSRb8juX7Wafvp93m3w==", + "version": "7.2.12", + "resolved": "https://registry.npmjs.org/@mui/types/-/types-7.2.12.tgz", + "integrity": "sha512-3kaHiNm9khCAo0pVe0RenketDSFoZGAlVZ4zDjB/QNZV0XiCj+sh1zkX0VVhQPgYJDlBEzAag+MHJ1tU3vf0Zw==", "requires": {} }, "@mui/utils": { - "version": "5.15.1", - "resolved": "https://registry.npmjs.org/@mui/utils/-/utils-5.15.1.tgz", - "integrity": "sha512-V1/d0E3Bju5YdB59HJf2G0tnHrFEvWLN+f8hAXp9+JSNy/LC2zKyqUfPPahflR6qsI681P8G9r4mEZte/SrrYA==", + "version": "5.15.3", + "resolved": "https://registry.npmjs.org/@mui/utils/-/utils-5.15.3.tgz", + "integrity": "sha512-mT3LiSt9tZWCdx1pl7q4Q5tNo6gdZbvJel286ZHGuj6LQQXjWNAh8qiF9d+LogvNUI+D7eLkTnj605d1zoazfg==", "requires": { - "@babel/runtime": "^7.23.5", + "@babel/runtime": "^7.23.6", "@types/prop-types": "^15.7.11", "prop-types": "^15.8.1", "react-is": "^18.2.0" @@ -26116,16 +26121,16 @@ } }, "@testing-library/jest-dom": { - "version": "6.1.5", - "resolved": "https://registry.npmjs.org/@testing-library/jest-dom/-/jest-dom-6.1.5.tgz", - "integrity": "sha512-3y04JLW+EceVPy2Em3VwNr95dOKqA8DhR0RJHhHKDZNYXcVXnEK7WIrpj4eYU8SVt/qYZ2aRWt/WgQ+grNES8g==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/@testing-library/jest-dom/-/jest-dom-6.2.0.tgz", + "integrity": "sha512-+BVQlJ9cmEn5RDMUS8c2+TU6giLvzaHZ8sU/x0Jj7fk+6/46wPdwlgOPcpxS17CjcanBi/3VmGMqVr2rmbUmNw==", "requires": { - "@adobe/css-tools": "^4.3.1", + "@adobe/css-tools": "^4.3.2", "@babel/runtime": "^7.9.2", "aria-query": "^5.0.0", "chalk": "^3.0.0", "css.escape": "^1.5.1", - "dom-accessibility-api": "^0.5.6", + "dom-accessibility-api": "^0.6.3", "lodash": "^4.17.15", "redent": "^3.0.0" }, @@ -26138,6 +26143,11 @@ "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" } + }, + "dom-accessibility-api": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/dom-accessibility-api/-/dom-accessibility-api-0.6.3.tgz", + "integrity": "sha512-7ZgogeTnjuHbo+ct10G9Ffp0mif17idi0IyWNVA/wcwcm7NPOD/WEHVP3n7n3MhXqxoIYm8d6MuZohYWIZ4T3w==" } } }, @@ -26169,9 +26179,9 @@ } }, "@testing-library/user-event": { - "version": "14.5.1", - "resolved": "https://registry.npmjs.org/@testing-library/user-event/-/user-event-14.5.1.tgz", - "integrity": "sha512-UCcUKrUYGj7ClomOo2SpNVvx4/fkd/2BbIHDCle8A0ax+P3bU7yJwDBDrS6ZwdTMARWTGODX1hEsCcO+7beJjg==", + "version": "14.5.2", + "resolved": "https://registry.npmjs.org/@testing-library/user-event/-/user-event-14.5.2.tgz", + "integrity": "sha512-YAh82Wh4TIrxYLmfGcixwD18oIjyC1pFQC2Y01F2lzV2HTMiYrI0nze0FD0ocB//CKS/7jIUgae+adPqxK5yCQ==", "requires": {} }, "@tootallnate/once": { @@ -26426,9 +26436,9 @@ "integrity": "sha512-Y4XFY5VJAuw0FgAqPNd6NNoV44jbq9Bz2L7Rh/J6jLTiHBSBJa9fxqQIvkIld4GsoDOcCbvzOUAbLPsSKKg+uA==" }, "@types/node": { - "version": "20.10.5", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.10.5.tgz", - "integrity": "sha512-nNPsNE65wjMxEKI93yOP+NPGGBJz/PoN3kZsVLee0XMiJolxSekEVD8wRwBUBqkwc7UWop0edW50yrCQW4CyRw==", + "version": "20.10.6", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.10.6.tgz", + "integrity": "sha512-Vac8H+NlRNNlAmDfGUP7b5h/KA+AtWIzuXy0E6OyP8f1tCLYAtPvKRRDJjAPqhpCb0t6U2j7/xqAuLEebW2kiw==", "requires": { "undici-types": "~5.26.4" } @@ -38942,9 +38952,9 @@ "integrity": "sha512-bKr1DkiNa2krS7qxNtdrtHAmzuYGFQLiQ13TsorsdT6ULTkPLKuu5+GsFpDlg6JFjUTwX2DyhMPG2be8uPrqsQ==" }, "web-vitals": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/web-vitals/-/web-vitals-3.5.0.tgz", - "integrity": "sha512-f5YnCHVG9Y6uLCePD4tY8bO/Ge15NPEQWtvm3tPzDKygloiqtb4SVqRHBcrIAqo2ztqX5XueqDn97zHF0LdT6w==" + "version": "3.5.1", + "resolved": "https://registry.npmjs.org/web-vitals/-/web-vitals-3.5.1.tgz", + "integrity": "sha512-xQ9lvIpfLxUj0eSmT79ZjRoU5wIRfIr7pNukL7ZE4EcWZSmfZQqOlhuAGfkVa3EFmzPHZhWhXfm2i5ys+THVPg==" }, "webidl-conversions": { "version": "6.1.0", diff --git a/package.json b/package.json index 5290a7baa..80db0d714 100644 --- a/package.json +++ b/package.json @@ -8,15 +8,15 @@ "@emotion/react": "^11.11.3", "@emotion/styled": "^11.11.0", "@minoru/react-dnd-treeview": "^3.4.4", - "@mui/icons-material": "^5.15.1", - "@mui/lab": "^5.0.0-alpha.157", - "@mui/material": "^5.15.1", + "@mui/icons-material": "^5.15.2", + "@mui/lab": "^5.0.0-alpha.159", + "@mui/material": "^5.15.3", "@mui/x-data-grid": "^6.18.6", - "@testing-library/jest-dom": "^6.1.5", + "@testing-library/jest-dom": "^6.2.0", "@testing-library/react": "^12.1.2", - "@testing-library/user-event": "^14.5.1", + "@testing-library/user-event": "^14.5.2", "@types/jest": "^29.5.11", - "@types/node": "^20.10.5", + "@types/node": "^20.10.6", "@types/react-dom": "^17.0.11", "@types/signals": "^1.0.4", "@types/throttle-debounce": "^5.0.2", @@ -50,7 +50,7 @@ "typescript": "^5.2.2", "use-interval": "^1.4.0", "usehooks-ts": "^2.9.1", - "web-vitals": "^3.5.0" + "web-vitals": "^3.5.1" }, "overrides": { "typescript": "^5.2.2" diff --git a/src/ThreeEditor/components/Sidebar/EditorSidebar.tsx b/src/ThreeEditor/components/Sidebar/EditorSidebar.tsx index a408fb1ad..baf36eb70 100644 --- a/src/ThreeEditor/components/Sidebar/EditorSidebar.tsx +++ b/src/ThreeEditor/components/Sidebar/EditorSidebar.tsx @@ -98,6 +98,12 @@ export function EditorSidebar(props: EditorSidebarProps) { }; const geometryTabElements = getGeometryTabElements(simulator, btnProps, editor); const scoringTabElements = getScoringTabElements(simulator, btnProps, editor); + const simulatorDescriptions = { + [SimulatorType.COMMON]: 'Common options for Fluka and Shieldhit', + [SimulatorType.FLUKA]: 'Fluka specific options', + [SimulatorType.SHIELDHIT]: 'Shieldhit specific options' + }; + return ( <> @@ -114,6 +120,9 @@ export function EditorSidebar(props: EditorSidebarProps) { + Simulator + + title={simulatorDescriptions[simulator]}> {simulator.charAt(0).toUpperCase() + simulator.slice(1)} ))} diff --git a/src/__tests__/FlukaConverter.test.ts b/src/__tests__/FlukaConverter.test.ts index 319369ec1..040350706 100644 --- a/src/__tests__/FlukaConverter.test.ts +++ b/src/__tests__/FlukaConverter.test.ts @@ -1,7 +1,7 @@ import { Builder, By, until, WebDriver } from 'selenium-webdriver'; import chrome from 'selenium-webdriver/chrome'; -describe('NavDrawer component', () => { +describe('Fluka Converter', () => { let driver: WebDriver; beforeAll(async () => { @@ -22,6 +22,16 @@ describe('NavDrawer component', () => { test('converter generates correct files', async () => { await driver.get('http://localhost:3000'); + // Wait for the application to load + expect( + await driver.wait( + until.elementLocated( + By.xpath("//div[@aria-label = 'Navigation drawer for the YAPTIDE application']") + ), + 5_000 + ) + ).toBeTruthy(); + //find the "Editor" button on the left menu and assure it is already selected const editorButton = await driver.findElement(By.xpath("//div[@aria-label = 'Editor']")); diff --git a/src/__tests__/ShieldhitConverter.test.ts b/src/__tests__/ShieldhitConverter.test.ts index 88eeadce4..a279ac3a3 100644 --- a/src/__tests__/ShieldhitConverter.test.ts +++ b/src/__tests__/ShieldhitConverter.test.ts @@ -2,7 +2,7 @@ import { readFileSync } from 'fs'; import { Builder, By, until, WebDriver } from 'selenium-webdriver'; import chrome from 'selenium-webdriver/chrome'; -describe('NavDrawer component', () => { +describe('ShieldhitConverter', () => { let driver: WebDriver; beforeAll(async () => { @@ -23,6 +23,16 @@ describe('NavDrawer component', () => { test('converter generates correct files', async () => { await driver.get('http://localhost:3000'); + // Wait for the application to load + expect( + await driver.wait( + until.elementLocated( + By.xpath("//div[@aria-label = 'Navigation drawer for the YAPTIDE application']") + ), + 5_000 + ) + ).toBeTruthy(); + //find the "Editor" button on the left menu and assure it is already selected const editorButton = await driver.findElement(By.xpath("//div[@aria-label = 'Editor']")); @@ -153,6 +163,13 @@ describe('NavDrawer component', () => { ) ).toBeTruthy(); + //find the "SHIELD-HIT12A" button and click it + const shieldhitButton = await driver.findElement(By.xpath("//button[@value = 'shieldhit']")); + await shieldhitButton.click(); + + //accept the "current data will be lost" alert + await driver.switchTo().alert().accept(); + //wait until the "generate from editor" button and click it (it takes some time for the button to change from "initializing") //xpath is used as again the id changes every time const generateButton = await driver.findElement( @@ -207,10 +224,15 @@ describe('NavDrawer component', () => { .getText() ).replace(regex, ''); - const expectedBeamText = readFileSync( + const expectedBeamTextFull = readFileSync( 'src/libs/converter/tests/shieldhit/resources/expected_shieldhit_output/beam.dat', 'utf-8' ).replace(regex, ''); + + // Hook to mitigate change in the beam.dat file of converter submodule + const expectedBeamText = expectedBeamTextFull.replace('JPART02IncidentparticletypeProtonnoheavyion', + 'JPART02Incidentparticletype'); + expect(expectedBeamText).not.toBe(''); expect(beamText).toContain(expectedBeamText); diff --git a/src/__tests__/TopasConverter.test.ts b/src/__tests__/TopasConverter.test.ts index 1abb806aa..60bcdba96 100644 --- a/src/__tests__/TopasConverter.test.ts +++ b/src/__tests__/TopasConverter.test.ts @@ -1,7 +1,7 @@ import { Builder, By, until, WebDriver } from 'selenium-webdriver'; import chrome from 'selenium-webdriver/chrome'; -describe('NavDrawer component', () => { +describe('TopasConverter', () => { let driver: WebDriver; beforeAll(async () => { @@ -19,9 +19,20 @@ describe('NavDrawer component', () => { }, 30_000); //this test checks if converter works correctly - opens an example and generates config files - test('converter generates correct files', async () => { + // expected to fail because Topas was temporarily removed from the project + xtest('converter generates correct files', async () => { await driver.get('http://localhost:3000'); + // Wait for the application to load + expect( + await driver.wait( + until.elementLocated( + By.xpath("//div[@aria-label = 'Navigation drawer for the YAPTIDE application']") + ), + 5_000 + ) + ).toBeTruthy(); + //find the "Editor" button on the left menu and assure it is already selected const editorButton = await driver.findElement(By.xpath("//div[@aria-label = 'Editor']")); diff --git a/src/libs/converter b/src/libs/converter index 5ac095e3c..9b3d296d4 160000 --- a/src/libs/converter +++ b/src/libs/converter @@ -1 +1 @@ -Subproject commit 5ac095e3caf9cc35b3c35c3f37c6f0cfc548716d +Subproject commit 9b3d296d419e9e200b10f8a87cce22da4762fea7 diff --git a/src/types/Particle.ts b/src/types/Particle.ts index 51ba2d707..f59efae3d 100644 --- a/src/types/Particle.ts +++ b/src/types/Particle.ts @@ -21,10 +21,6 @@ export const PARTICLE_TYPES = [ id: 4, name: 'Pion π+' }, - { - id: 6, - name: 'Anti-neutron' - }, { id: 7, name: 'Anti-proton'