diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 1f9a4633..7d67b5fa 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -25,6 +25,7 @@ "@types/node": "^20.11.30", "@vitejs/plugin-vue": "^5.0.4", "cypress": "^13.7.1", + "msw": "^2.2.13", "sass": "^1.72.0", "typescript": "^5.2.2", "vite": "^5.1.1", @@ -43,6 +44,24 @@ "node": ">=6.0.0" } }, + "node_modules/@bundled-es-modules/cookie": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@bundled-es-modules/cookie/-/cookie-2.0.0.tgz", + "integrity": "sha512-Or6YHg/kamKHpxULAdSqhGqnWFneIXu1NKvvfBBzKGwpVsYuFIQ5aBPHDnnoR3ghW1nvSkALd+EF9iMtY7Vjxw==", + "dev": true, + "dependencies": { + "cookie": "^0.5.0" + } + }, + "node_modules/@bundled-es-modules/statuses": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@bundled-es-modules/statuses/-/statuses-1.0.1.tgz", + "integrity": "sha512-yn7BklA5acgcBr+7w064fGV+SGIFySjCKpqjcWgBAIfrAkY+4GQTJJHQMeT3V/sgz23VTEVV8TtOmkvJAhFVfg==", + "dev": true, + "dependencies": { + "statuses": "^2.0.1" + } + }, "node_modules/@colors/colors": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/@colors/colors/-/colors-1.5.0.tgz", @@ -483,6 +502,79 @@ "node": ">=12" } }, + "node_modules/@inquirer/confirm": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@inquirer/confirm/-/confirm-3.1.0.tgz", + "integrity": "sha512-nH5mxoTEoqk6WpoBz80GMpDSm9jH5V9AF8n+JZAZfMzd9gHeEG9w1o3KawPRR72lfzpP+QxBHLkOKLEApwhDiQ==", + "dev": true, + "dependencies": { + "@inquirer/core": "^7.1.0", + "@inquirer/type": "^1.2.1" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@inquirer/core": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/@inquirer/core/-/core-7.1.0.tgz", + "integrity": "sha512-FRCiDiU54XHt5B/D8hX4twwZuzSP244ANHbu3R7CAsJfiv1dUOz24ePBgCZjygEjDUi6BWIJuk4eWLKJ7LATUw==", + "dev": true, + "dependencies": { + "@inquirer/type": "^1.2.1", + "@types/mute-stream": "^0.0.4", + "@types/node": "^20.11.26", + "@types/wrap-ansi": "^3.0.0", + "ansi-escapes": "^4.3.2", + "chalk": "^4.1.2", + "cli-spinners": "^2.9.2", + "cli-width": "^4.1.0", + "figures": "^3.2.0", + "mute-stream": "^1.0.0", + "run-async": "^3.0.0", + "signal-exit": "^4.1.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^6.2.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@inquirer/core/node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@inquirer/core/node_modules/wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@inquirer/type": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@inquirer/type/-/type-1.2.1.tgz", + "integrity": "sha512-xwMfkPAxeo8Ji/IxfUSqzRi0/+F2GIqJmpc5/thelgMGsjNZcjDDRBO9TLXT1s/hdx/mK5QbVIvgoLIFgXhTMQ==", + "dev": true, + "engines": { + "node": ">=18" + } + }, "node_modules/@intlify/core-base": { "version": "9.10.2", "resolved": "https://registry.npmjs.org/@intlify/core-base/-/core-base-9.10.2.tgz", @@ -541,10 +633,58 @@ "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==" }, + "node_modules/@mswjs/cookies": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@mswjs/cookies/-/cookies-1.1.0.tgz", + "integrity": "sha512-0ZcCVQxifZmhwNBoQIrystCb+2sWBY2Zw8lpfJBPCHGCA/HWqehITeCRVIv4VMy8MPlaHo2w2pTHFV2pFfqKPw==", + "dev": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/@mswjs/interceptors": { + "version": "0.26.14", + "resolved": "https://registry.npmjs.org/@mswjs/interceptors/-/interceptors-0.26.14.tgz", + "integrity": "sha512-q4S8RGjOUzv3A3gCawuKkUEcNJXjdPaSqoRHFvuZPWQnc7yOw702iGBRDMJoBK+l0KSv9XN8YP5ek6duRzrpqw==", + "dev": true, + "dependencies": { + "@open-draft/deferred-promise": "^2.2.0", + "@open-draft/logger": "^0.3.0", + "@open-draft/until": "^2.0.0", + "is-node-process": "^1.2.0", + "outvariant": "^1.2.1", + "strict-event-emitter": "^0.5.1" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@open-draft/deferred-promise": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@open-draft/deferred-promise/-/deferred-promise-2.2.0.tgz", + "integrity": "sha512-CecwLWx3rhxVQF6V4bAgPS5t+So2sTbPgAzafKkVizyi7tlwpcFpdFqq+wqF2OwNBmqFuu6tOyouTuxgpMfzmA==", + "dev": true + }, + "node_modules/@open-draft/logger": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/@open-draft/logger/-/logger-0.3.0.tgz", + "integrity": "sha512-X2g45fzhxH238HKO4xbSr7+wBS8Fvw6ixhTDuvLd5mqh6bJJCFAPwU9mPDxbcrRtfxv4u5IHCEH77BmxvXmmxQ==", + "dev": true, + "dependencies": { + "is-node-process": "^1.2.0", + "outvariant": "^1.4.0" + } + }, + "node_modules/@open-draft/until": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@open-draft/until/-/until-2.1.0.tgz", + "integrity": "sha512-U69T3ItWHvLwGg5eJ0n3I62nWuE6ilHlmz7zM0npLBRvPRd7e6NYmg54vvRtP5mZG7kZqZCFVdsTWo7BPtBujg==", + "dev": true + }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.13.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.13.0.tgz", - "integrity": "sha512-5ZYPOuaAqEH/W3gYsRkxQATBW3Ii1MfaT4EQstTnLKViLi2gLSQmlmtTpGucNP3sXEpOiI5tdGhjdE111ekyEg==", + "version": "4.13.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.13.2.tgz", + "integrity": "sha512-3XFIDKWMFZrMnao1mJhnOT1h2g0169Os848NhhmGweEcfJ4rCi+3yMCOLG4zA61rbJdkcrM/DjVZm9Hg5p5w7g==", "cpu": [ "arm" ], @@ -555,9 +695,9 @@ ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.13.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.13.0.tgz", - "integrity": "sha512-BSbaCmn8ZadK3UAQdlauSvtaJjhlDEjS5hEVVIN3A4bbl3X+otyf/kOJV08bYiRxfejP3DXFzO2jz3G20107+Q==", + "version": "4.13.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.13.2.tgz", + "integrity": "sha512-GdxxXbAuM7Y/YQM9/TwwP+L0omeE/lJAR1J+olu36c3LqqZEBdsIWeQ91KBe6nxwOnb06Xh7JS2U5ooWU5/LgQ==", "cpu": [ "arm64" ], @@ -568,9 +708,9 @@ ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.13.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.13.0.tgz", - "integrity": "sha512-Ovf2evVaP6sW5Ut0GHyUSOqA6tVKfrTHddtmxGQc1CTQa1Cw3/KMCDEEICZBbyppcwnhMwcDce9ZRxdWRpVd6g==", + "version": "4.13.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.13.2.tgz", + "integrity": "sha512-mCMlpzlBgOTdaFs83I4XRr8wNPveJiJX1RLfv4hggyIVhfB5mJfN4P8Z6yKh+oE4Luz+qq1P3kVdWrCKcMYrrA==", "cpu": [ "arm64" ], @@ -581,9 +721,9 @@ ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.13.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.13.0.tgz", - "integrity": "sha512-U+Jcxm89UTK592vZ2J9st9ajRv/hrwHdnvyuJpa5A2ngGSVHypigidkQJP+YiGL6JODiUeMzkqQzbCG3At81Gg==", + "version": "4.13.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.13.2.tgz", + "integrity": "sha512-yUoEvnH0FBef/NbB1u6d3HNGyruAKnN74LrPAfDQL3O32e3k3OSfLrPgSJmgb3PJrBZWfPyt6m4ZhAFa2nZp2A==", "cpu": [ "x64" ], @@ -594,9 +734,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.13.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.13.0.tgz", - "integrity": "sha512-8wZidaUJUTIR5T4vRS22VkSMOVooG0F4N+JSwQXWSRiC6yfEsFMLTYRFHvby5mFFuExHa/yAp9juSphQQJAijQ==", + "version": "4.13.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.13.2.tgz", + "integrity": "sha512-GYbLs5ErswU/Xs7aGXqzc3RrdEjKdmoCrgzhJWyFL0r5fL3qd1NPcDKDowDnmcoSiGJeU68/Vy+OMUluRxPiLQ==", "cpu": [ "arm" ], @@ -607,9 +747,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.13.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.13.0.tgz", - "integrity": "sha512-Iu0Kno1vrD7zHQDxOmvweqLkAzjxEVqNhUIXBsZ8hu8Oak7/5VTPrxOEZXYC1nmrBVJp0ZcL2E7lSuuOVaE3+w==", + "version": "4.13.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.13.2.tgz", + "integrity": "sha512-L1+D8/wqGnKQIlh4Zre9i4R4b4noxzH5DDciyahX4oOz62CphY7WDWqJoQ66zNR4oScLNOqQJfNSIAe/6TPUmQ==", "cpu": [ "arm64" ], @@ -620,9 +760,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.13.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.13.0.tgz", - "integrity": "sha512-C31QrW47llgVyrRjIwiOwsHFcaIwmkKi3PCroQY5aVq4H0A5v/vVVAtFsI1nfBngtoRpeREvZOkIhmRwUKkAdw==", + "version": "4.13.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.13.2.tgz", + "integrity": "sha512-tK5eoKFkXdz6vjfkSTCupUzCo40xueTOiOO6PeEIadlNBkadH1wNOH8ILCPIl8by/Gmb5AGAeQOFeLev7iZDOA==", "cpu": [ "arm64" ], @@ -632,10 +772,23 @@ "linux" ] }, + "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { + "version": "4.13.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.13.2.tgz", + "integrity": "sha512-zvXvAUGGEYi6tYhcDmb9wlOckVbuD+7z3mzInCSTACJ4DQrdSLPNUeDIcAQW39M3q6PDquqLWu7pnO39uSMRzQ==", + "cpu": [ + "ppc64le" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.13.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.13.0.tgz", - "integrity": "sha512-Oq90dtMHvthFOPMl7pt7KmxzX7E71AfyIhh+cPhLY9oko97Zf2C9tt/XJD4RgxhaGeAraAXDtqxvKE1y/j35lA==", + "version": "4.13.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.13.2.tgz", + "integrity": "sha512-C3GSKvMtdudHCN5HdmAMSRYR2kkhgdOfye4w0xzyii7lebVr4riCgmM6lRiSCnJn2w1Xz7ZZzHKuLrjx5620kw==", "cpu": [ "riscv64" ], @@ -645,10 +798,23 @@ "linux" ] }, + "node_modules/@rollup/rollup-linux-s390x-gnu": { + "version": "4.13.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.13.2.tgz", + "integrity": "sha512-l4U0KDFwzD36j7HdfJ5/TveEQ1fUTjFFQP5qIt9gBqBgu1G8/kCaq5Ok05kd5TG9F8Lltf3MoYsUMw3rNlJ0Yg==", + "cpu": [ + "s390x" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.13.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.13.0.tgz", - "integrity": "sha512-yUD/8wMffnTKuiIsl6xU+4IA8UNhQ/f1sAnQebmE/lyQ8abjsVyDkyRkWop0kdMhKMprpNIhPmYlCxgHrPoXoA==", + "version": "4.13.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.13.2.tgz", + "integrity": "sha512-xXMLUAMzrtsvh3cZ448vbXqlUa7ZL8z0MwHp63K2IIID2+DeP5iWIT6g1SN7hg1VxPzqx0xZdiDM9l4n9LRU1A==", "cpu": [ "x64" ], @@ -659,9 +825,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.13.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.13.0.tgz", - "integrity": "sha512-9RyNqoFNdF0vu/qqX63fKotBh43fJQeYC98hCaf89DYQpv+xu0D8QFSOS0biA7cGuqJFOc1bJ+m2rhhsKcw1hw==", + "version": "4.13.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.13.2.tgz", + "integrity": "sha512-M/JYAWickafUijWPai4ehrjzVPKRCyDb1SLuO+ZyPfoXgeCEAlgPkNXewFZx0zcnoIe3ay4UjXIMdXQXOZXWqA==", "cpu": [ "x64" ], @@ -672,9 +838,9 @@ ] }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.13.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.13.0.tgz", - "integrity": "sha512-46ue8ymtm/5PUU6pCvjlic0z82qWkxv54GTJZgHrQUuZnVH+tvvSP0LsozIDsCBFO4VjJ13N68wqrKSeScUKdA==", + "version": "4.13.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.13.2.tgz", + "integrity": "sha512-2YWwoVg9KRkIKaXSh0mz3NmfurpmYoBBTAXA9qt7VXk0Xy12PoOP40EFuau+ajgALbbhi4uTj3tSG3tVseCjuA==", "cpu": [ "arm64" ], @@ -685,9 +851,9 @@ ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.13.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.13.0.tgz", - "integrity": "sha512-P5/MqLdLSlqxbeuJ3YDeX37srC8mCflSyTrUsgbU1c/U9j6l2g2GiIdYaGD9QjdMQPMSgYm7hgg0551wHyIluw==", + "version": "4.13.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.13.2.tgz", + "integrity": "sha512-2FSsE9aQ6OWD20E498NYKEQLneShWes0NGMPQwxWOdws35qQXH+FplabOSP5zEe1pVjurSDOGEVCE2agFwSEsw==", "cpu": [ "ia32" ], @@ -698,9 +864,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.13.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.13.0.tgz", - "integrity": "sha512-UKXUQNbO3DOhzLRwHSpa0HnhhCgNODvfoPWv2FCXme8N/ANFfhIPMGuOT+QuKd16+B5yxZ0HdpNlqPvTMS1qfw==", + "version": "4.13.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.13.2.tgz", + "integrity": "sha512-7h7J2nokcdPePdKykd8wtc8QqqkqxIrUz7MHj6aNr8waBRU//NLDVnNjQnqQO6fqtjrtCdftpbTuOKAyrAQETQ==", "cpu": [ "x64" ], @@ -716,6 +882,12 @@ "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==", "dev": true }, + "node_modules/@types/cookie": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/@types/cookie/-/cookie-0.6.0.tgz", + "integrity": "sha512-4Kh9a6B2bQciAhf7FSuMRRkUWecJgJu9nPnx3yzpsfXX/c50REIqpHY4C82bXP90qrLtXtkDxTZosYO3UpOwlA==", + "dev": true + }, "node_modules/@types/estree": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", @@ -728,6 +900,15 @@ "integrity": "sha512-wkw9yd1kEXOPnvEeEV1Go1MmxtBJL0RR79aOTAApecWFVu7w0NNXNqhcWgvw2YgZDYadliXkl14pa3WXw5jlCQ==", "dev": true }, + "node_modules/@types/mute-stream": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/@types/mute-stream/-/mute-stream-0.0.4.tgz", + "integrity": "sha512-CPM9nzrCPPJHQNA9keH9CVkVI+WR5kMa+7XEs5jcGQ0VoAGnLv242w8lIVgwAEfmE4oufJRaTc9PNLQl0ioAow==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, "node_modules/@types/node": { "version": "20.11.30", "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.30.tgz", @@ -749,11 +930,23 @@ "integrity": "sha512-0vWLNK2D5MT9dg0iOo8GlKguPAU02QjmZitPEsXRuJXU/OGIOt9vT9Fc26wtYuavLxtO45v9PGleoL9Z0k1LHg==", "dev": true }, + "node_modules/@types/statuses": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@types/statuses/-/statuses-2.0.5.tgz", + "integrity": "sha512-jmIUGWrAiwu3dZpxntxieC+1n/5c3mjrImkmOSQ2NC5uP6cYO4aAZDdSmRcI5C1oiTmqlZGHC+/NmJrKogbP5A==", + "dev": true + }, "node_modules/@types/web-bluetooth": { "version": "0.0.20", "resolved": "https://registry.npmjs.org/@types/web-bluetooth/-/web-bluetooth-0.0.20.tgz", "integrity": "sha512-g9gZnnXVq7gM7v3tJCWV/qw7w+KeOlSHAhgF9RytFyifW6AF61hdT2ucrYhPq9hLs5JIryeupHV3qGk95dH9ow==" }, + "node_modules/@types/wrap-ansi": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@types/wrap-ansi/-/wrap-ansi-3.0.0.tgz", + "integrity": "sha512-ltIpx+kM7g/MLRZfkbL7EsCEjfzCcScLpkg37eXEtx5kmrAKBkTJwd1GIAjDSL8wTpM6Hzn5YO4pSb91BEwu1g==", + "dev": true + }, "node_modules/@types/yauzl": { "version": "2.10.3", "resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.10.3.tgz", @@ -1566,6 +1759,18 @@ "node": ">=8" } }, + "node_modules/cli-spinners": { + "version": "2.9.2", + "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.9.2.tgz", + "integrity": "sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==", + "dev": true, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/cli-table3": { "version": "0.6.4", "resolved": "https://registry.npmjs.org/cli-table3/-/cli-table3-0.6.4.tgz", @@ -1597,6 +1802,29 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/cli-width": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-4.1.0.tgz", + "integrity": "sha512-ouuZd4/dm2Sw5Gmqy6bGyNNNe1qt9RpmxveLSO7KcgsTnU7RXfsw+/bukWGo1abgBiMAic068rclZsO4IWmmxQ==", + "dev": true, + "engines": { + "node": ">= 12" + } + }, + "node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dev": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, "node_modules/color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", @@ -1656,6 +1884,15 @@ "integrity": "sha512-7CEBgcMjVmitjYo5q8JTJVra6X5mQ20uTThdK+0kR7UEaDrAWEQcRiBtWJzga4eRpP6afNwwLsX2SET2JhVB1Q==", "dev": true }, + "node_modules/cookie": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", + "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, "node_modules/core-util-is": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", @@ -1939,6 +2176,15 @@ "@esbuild/win32-x64": "0.20.2" } }, + "node_modules/escalade": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", + "integrity": "sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", @@ -2148,6 +2394,15 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true, + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, "node_modules/get-func-name": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.2.tgz", @@ -2254,6 +2509,15 @@ "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", "dev": true }, + "node_modules/graphql": { + "version": "16.8.1", + "resolved": "https://registry.npmjs.org/graphql/-/graphql-16.8.1.tgz", + "integrity": "sha512-59LZHPdGZVh695Ud9lRzPBVTtlX9ZCV150Er2W43ro37wVof0ctenSaskPPjN7lVTIN8mSZt8PHUNKZuNQUuxw==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.16.0 || ^16.0.0 || >=17.0.0" + } + }, "node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -2320,6 +2584,12 @@ "he": "bin/he" } }, + "node_modules/headers-polyfill": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/headers-polyfill/-/headers-polyfill-4.0.3.tgz", + "integrity": "sha512-IScLbePpkvO846sIwOtOTDjutRMWdXdJmXdMvk6gCBHxFO8d+QKOQedyZSxFTTFYRSmlgSTDtXqqq4pcenBXLQ==", + "dev": true + }, "node_modules/http-signature": { "version": "1.3.6", "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.3.6.tgz", @@ -2457,6 +2727,12 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/is-node-process": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/is-node-process/-/is-node-process-1.2.0.tgz", + "integrity": "sha512-Vg4o6/fqPxIjtxgUH5QLJhwZ7gW5diGCVlXpuUfELC62CuxM1iHcRe51f2W1FDy04Ai4KJkagKjx3XaqyfRKXw==", + "dev": true + }, "node_modules/is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", @@ -2526,9 +2802,9 @@ } }, "node_modules/js-tokens": { - "version": "8.0.3", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-8.0.3.tgz", - "integrity": "sha512-UfJMcSJc+SEXEl9lH/VLHSZbThQyLpw1vLO1Lb+j4RWDvG3N2f7yj3PVQA3cmkTBNldJ9eFnM+xEXxHIXrYiJw==", + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-9.0.0.tgz", + "integrity": "sha512-WriZw1luRMlmV3LGJaR6QOJjWwgLUTf89OwT2lUOyjX2dJGBwgmIkbcz+7WFZjrZM635JOIR517++e/67CP9dQ==", "dev": true }, "node_modules/jsbn": { @@ -2778,9 +3054,9 @@ } }, "node_modules/minimatch": { - "version": "9.0.3", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", - "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", + "version": "9.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.4.tgz", + "integrity": "sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==", "dev": true, "dependencies": { "brace-expansion": "^2.0.1" @@ -2827,12 +3103,76 @@ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true }, + "node_modules/msw": { + "version": "2.2.13", + "resolved": "https://registry.npmjs.org/msw/-/msw-2.2.13.tgz", + "integrity": "sha512-ljFf1xZsU0b4zv1l7xzEmC6OZA6yD06hcx0H+dc8V0VypaP3HGYJa1rMLjQbBWl32ptGhcfwcPCWDB1wjmsftw==", + "dev": true, + "hasInstallScript": true, + "dependencies": { + "@bundled-es-modules/cookie": "^2.0.0", + "@bundled-es-modules/statuses": "^1.0.1", + "@inquirer/confirm": "^3.0.0", + "@mswjs/cookies": "^1.1.0", + "@mswjs/interceptors": "^0.26.14", + "@open-draft/until": "^2.1.0", + "@types/cookie": "^0.6.0", + "@types/statuses": "^2.0.4", + "chalk": "^4.1.2", + "graphql": "^16.8.1", + "headers-polyfill": "^4.0.2", + "is-node-process": "^1.2.0", + "outvariant": "^1.4.2", + "path-to-regexp": "^6.2.0", + "strict-event-emitter": "^0.5.1", + "type-fest": "^4.9.0", + "yargs": "^17.7.2" + }, + "bin": { + "msw": "cli/index.js" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/mswjs" + }, + "peerDependencies": { + "typescript": ">= 4.7.x" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/msw/node_modules/type-fest": { + "version": "4.14.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.14.0.tgz", + "integrity": "sha512-on5/Cw89wwqGZQu+yWO0gGMGu8VNxsaW9SB2HE8yJjllEk7IDTwnSN1dUVldYILhYPN5HzD7WAaw2cc/jBfn0Q==", + "dev": true, + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/muggle-string": { "version": "0.3.1", "resolved": "https://registry.npmjs.org/muggle-string/-/muggle-string-0.3.1.tgz", "integrity": "sha512-ckmWDJjphvd/FvZawgygcUeQCxzvohjFO5RxTjj4eq8kw359gFF3E1brjfI+viLMxss5JrHTDRHZvu2/tuy0Qg==", "dev": true }, + "node_modules/mute-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-1.0.0.tgz", + "integrity": "sha512-avsJQhyd+680gKXyG/sQc0nXaC6rBkPOfyHYcFb9+hdkqQkR9bdnkJ0AMZhke0oesPqIO+mFFJ+IdBc7mst4IA==", + "dev": true, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, "node_modules/nanoid": { "version": "3.3.7", "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", @@ -2910,6 +3250,12 @@ "integrity": "sha512-o6E5qJV5zkAbIDNhGSIlyOhScKXgQrSRMilfph0clDfM0nEnBOlKlH4sWDmG95BW/CvwNz0vmm7dJVtU2KlMiA==", "dev": true }, + "node_modules/outvariant": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/outvariant/-/outvariant-1.4.2.tgz", + "integrity": "sha512-Ou3dJ6bA/UJ5GVHxah4LnqDwZRwAmWxrG3wtrHrbGnP4RnLCtA64A4F+ae7Y8ww660JaddSoArUR5HjipWSHAQ==", + "dev": true + }, "node_modules/p-limit": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-5.0.0.tgz", @@ -2955,6 +3301,12 @@ "node": ">=8" } }, + "node_modules/path-to-regexp": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-6.2.1.tgz", + "integrity": "sha512-JLyh7xT1kizaEvcaXOQwOc2/Yhw6KZOvPf1S8401UyLk86CU79LN3vl7ztXGm/pZ+YjoyAJ4rxmHwbkBXJX+yw==", + "dev": true + }, "node_modules/pathe": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/pathe/-/pathe-1.1.2.tgz", @@ -3239,6 +3591,15 @@ "throttleit": "^1.0.0" } }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/requires-port": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", @@ -3265,9 +3626,9 @@ "dev": true }, "node_modules/rollup": { - "version": "4.13.0", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.13.0.tgz", - "integrity": "sha512-3YegKemjoQnYKmsBlOHfMLVPPA5xLkQ8MHLLSw/fBrFaVkEayL51DilPpNNLq1exr98F2B1TzrV0FUlN3gWRPg==", + "version": "4.13.2", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.13.2.tgz", + "integrity": "sha512-MIlLgsdMprDBXC+4hsPgzWUasLO9CE4zOkj/u6j+Z6j5A4zRY+CtiXAdJyPtgCsc42g658Aeh1DlrdVEJhsL2g==", "dev": true, "dependencies": { "@types/estree": "1.0.5" @@ -3280,22 +3641,33 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.13.0", - "@rollup/rollup-android-arm64": "4.13.0", - "@rollup/rollup-darwin-arm64": "4.13.0", - "@rollup/rollup-darwin-x64": "4.13.0", - "@rollup/rollup-linux-arm-gnueabihf": "4.13.0", - "@rollup/rollup-linux-arm64-gnu": "4.13.0", - "@rollup/rollup-linux-arm64-musl": "4.13.0", - "@rollup/rollup-linux-riscv64-gnu": "4.13.0", - "@rollup/rollup-linux-x64-gnu": "4.13.0", - "@rollup/rollup-linux-x64-musl": "4.13.0", - "@rollup/rollup-win32-arm64-msvc": "4.13.0", - "@rollup/rollup-win32-ia32-msvc": "4.13.0", - "@rollup/rollup-win32-x64-msvc": "4.13.0", + "@rollup/rollup-android-arm-eabi": "4.13.2", + "@rollup/rollup-android-arm64": "4.13.2", + "@rollup/rollup-darwin-arm64": "4.13.2", + "@rollup/rollup-darwin-x64": "4.13.2", + "@rollup/rollup-linux-arm-gnueabihf": "4.13.2", + "@rollup/rollup-linux-arm64-gnu": "4.13.2", + "@rollup/rollup-linux-arm64-musl": "4.13.2", + "@rollup/rollup-linux-powerpc64le-gnu": "4.13.2", + "@rollup/rollup-linux-riscv64-gnu": "4.13.2", + "@rollup/rollup-linux-s390x-gnu": "4.13.2", + "@rollup/rollup-linux-x64-gnu": "4.13.2", + "@rollup/rollup-linux-x64-musl": "4.13.2", + "@rollup/rollup-win32-arm64-msvc": "4.13.2", + "@rollup/rollup-win32-ia32-msvc": "4.13.2", + "@rollup/rollup-win32-x64-msvc": "4.13.2", "fsevents": "~2.3.2" } }, + "node_modules/run-async": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-3.0.0.tgz", + "integrity": "sha512-540WwVDOMxA6dN6We19EcT9sc3hkXPw5mzRNGM3FkdN/vtE9NFvj5lFAPNwUDmJjXidm3v7TC1cTE7t17Ulm1Q==", + "dev": true, + "engines": { + "node": ">=0.12.0" + } + }, "node_modules/rxjs": { "version": "7.8.1", "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz", @@ -3484,12 +3856,27 @@ "integrity": "sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==", "dev": true }, + "node_modules/statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "dev": true, + "engines": { + "node": ">= 0.8" + } + }, "node_modules/std-env": { "version": "3.7.0", "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.7.0.tgz", "integrity": "sha512-JPbdCEQLj1w5GilpiHAx3qJvFndqybBysA3qUOnznweH4QbNYUsW/ea8QzSrnh0vNsezMMw5bcVool8lM0gwzg==", "dev": true }, + "node_modules/strict-event-emitter": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/strict-event-emitter/-/strict-event-emitter-0.5.1.tgz", + "integrity": "sha512-vMgjE/GGEPEFnhFub6pa4FmJBRBVOLpIII2hvCZ8Kzb7K0hlHo7mQv6xYrBvCL2LtAIBwFUK8wvuJgTVSQ5MFQ==", + "dev": true + }, "node_modules/string-width": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", @@ -3526,12 +3913,12 @@ } }, "node_modules/strip-literal": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-literal/-/strip-literal-2.0.0.tgz", - "integrity": "sha512-f9vHgsCWBq2ugHAkGMiiYY+AYG0D/cbloKKg0nhaaaSNsujdGIpVXCNsrJpCKr5M0f4aI31mr13UjY6GAuXCKA==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/strip-literal/-/strip-literal-2.1.0.tgz", + "integrity": "sha512-Op+UycaUt/8FbN/Z2TWPBLge3jWrP3xj10f3fnYxf052bKuS3EKs1ZQcVGjnEMdsNVAM+plXRdmjrZ/KgG3Skw==", "dev": true, "dependencies": { - "js-tokens": "^8.0.2" + "js-tokens": "^9.0.0" }, "funding": { "url": "https://github.com/sponsors/antfu" @@ -3574,9 +3961,9 @@ "dev": true }, "node_modules/tinypool": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/tinypool/-/tinypool-0.8.2.tgz", - "integrity": "sha512-SUszKYe5wgsxnNOVlBYO6IC+8VGWdVGZWAqUxp3UErNBtptZvWbwyUOyzNL59zigz2rCA92QiL3wvG+JDSdJdQ==", + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/tinypool/-/tinypool-0.8.3.tgz", + "integrity": "sha512-Ud7uepAklqRH1bvwy22ynrliC7Dljz7Tm8M/0RBUW+YRa4YHhZ6e4PpgE+fu1zr/WqB1kbeuVrdfeuyIBpy4tw==", "dev": true, "engines": { "node": ">=14.0.0" @@ -3758,13 +4145,13 @@ } }, "node_modules/vite": { - "version": "5.2.5", - "resolved": "https://registry.npmjs.org/vite/-/vite-5.2.5.tgz", - "integrity": "sha512-a+rTAqkMmJ2hQpC6dfAyyc5M0YLH3BGZKLpA6pU9AhzlcK1YZS8P/ov9OcdHxaf+j0sM0DIh/txH7ydTHUpISg==", + "version": "5.2.7", + "resolved": "https://registry.npmjs.org/vite/-/vite-5.2.7.tgz", + "integrity": "sha512-k14PWOKLI6pMaSzAuGtT+Cf0YmIx12z9YGon39onaJNy8DLBfBJrzg9FQEmkAM5lpHBZs9wksWAsyF/HkpEwJA==", "dev": true, "dependencies": { "esbuild": "^0.20.1", - "postcss": "^8.4.36", + "postcss": "^8.4.38", "rollup": "^4.13.0" }, "bin": { @@ -4167,12 +4554,48 @@ "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", "dev": true }, + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true, + "engines": { + "node": ">=10" + } + }, "node_modules/yallist": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", "dev": true }, + "node_modules/yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "dev": true, + "dependencies": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "dev": true, + "engines": { + "node": ">=12" + } + }, "node_modules/yauzl": { "version": "2.10.0", "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", diff --git a/frontend/package.json b/frontend/package.json index 12635ca3..08d9679a 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -30,6 +30,7 @@ "@types/node": "^20.11.30", "@vitejs/plugin-vue": "^5.0.4", "cypress": "^13.7.1", + "msw": "^2.2.13", "sass": "^1.72.0", "typescript": "^5.2.2", "vite": "^5.1.1", diff --git a/frontend/src/composables/services/groups.service.ts b/frontend/src/composables/services/groups.service.ts index 63a65d5d..1d0e7153 100644 --- a/frontend/src/composables/services/groups.service.ts +++ b/frontend/src/composables/services/groups.service.ts @@ -22,8 +22,8 @@ export function useGroup() { await getList(endpoint, groups, Group.fromJSON); } - async function createGroup(group_data: Group, group_id: string) { - const endpoint = endpoints.groups.byProject.replace('{group_id}', group_id); + async function createGroup(group_data: Group, project_id: string) { + const endpoint = endpoints.groups.byProject.replace('{project_id}', project_id); await create(endpoint, { score: group_data.score diff --git a/frontend/src/test/unit/course.test.ts b/frontend/src/test/unit/course.test.ts deleted file mode 100644 index 573b8cf9..00000000 --- a/frontend/src/test/unit/course.test.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { describe, it, expect } from 'vitest' - -import { Course } from '@/types/Course.ts' - -// "describe" bundles tests about 1 specific thing; here we're testing course -// aka a test suite -describe("course", (): void => { - // "it" is used to specify tests - // you can also import "test" instead of "it", because it's the exact same - // but with "it", it's easy to read => it (referring to the course) returns correct course year - it("returns correct course year", (): void => { - const course: Course = new Course("1", "course", "description", 2003) - // use expect for assertions - // after expect, there are a multitude of possible functions such as: - // toBe, toEqual, toContain - // check https://vitest.dev/api/expect.html for all possibilities - expect(course.getCourseYear()).toBe("2003 - 2004") - // assert can also be used instead, if you like its syntax more - // check out https://vitest.dev/api/assert.html for more info - }) -}) \ No newline at end of file diff --git a/frontend/src/test/unit/course_service.test.ts b/frontend/src/test/unit/course_service.test.ts new file mode 100644 index 00000000..a8f97652 --- /dev/null +++ b/frontend/src/test/unit/course_service.test.ts @@ -0,0 +1,115 @@ +import { describe, it, expect } from 'vitest' +import { Course } from '@/types/Course.ts' + +import { useCourses } from '@/composables/services/courses.service.ts' + +const { + courses, + course, + + getCourseByID, + getCourses, + getCoursesByStudent, + + createCourse, + cloneCourse, + deleteCourse +} = useCourses(); + +// "describe" bundles tests about 1 specific thing; here we're testing course +// aka a test suite +describe("course", (): void => { + // "it" is used to specify tests + // you can also import "test" instead of "it", because it's the exact same + // but with "it", it's easy to read => it (referring to the course) returns correct course year + it("returns correct course year", (): void => { + const course: Course = new Course("1", "course", "description", 2003) + // use expect for assertions + // after expect, there are a multitude of possible functions such as: + // toBe, toEqual, toContain + // check https://vitest.dev/api/expect.html for all possibilities + expect(course.getCourseYear()).toBe("2003 - 2004") + // assert can also be used instead, if you like its syntax more + // check out https://vitest.dev/api/assert.html for more info + }) + + it("gets course data by id", async () => { + await getCourseByID("1") + expect(course.value).not.toBeNull() + expect(course.value?.name).toBe("Math") + expect(course.value?.parent_course).toBeNull() + expect(course.value?.academic_startyear).toBe(2023) + expect(course.value?.description).toBe("Math course") + expect(course.value?.students).toEqual([]) + expect(course.value?.teachers).toEqual([]) + expect(course.value?.assistants).toEqual([]) + expect(course.value?.projects).toEqual([]) + }) + + it("gets courses data", async () => { + await getCourses() + expect(courses.value).not.toBeNull() + expect(courses.value?.[0]?.name).toBe("Math") + expect(courses.value?.[0]?.parent_course).toBeNull() + expect(courses.value?.[0]?.academic_startyear).toBe(2023) + expect(courses.value?.[0]?.description).toBe("Math course") + expect(courses.value?.[0]?.students).toEqual([]) + expect(courses.value?.[0]?.teachers).toEqual([]) + expect(courses.value?.[0]?.assistants).toEqual([]) + expect(courses.value?.[0]?.projects).toEqual([]) + + expect(courses.value?.[1]?.name).toBe("Sel2") + expect(courses.value?.[1]?.parent_course).toBe("3") + expect(courses.value?.[1]?.academic_startyear).toBe(2023) + expect(courses.value?.[1]?.description).toBe("Software course") + expect(courses.value?.[1]?.students).toEqual([]) + expect(courses.value?.[1]?.teachers).toEqual([]) + expect(courses.value?.[1]?.assistants).toEqual([]) + expect(courses.value?.[1]?.projects).toEqual([]) + + expect(courses.value?.[2]?.name).toBe("Sel1") + expect(courses.value?.[2]?.parent_course).toBeNull() + expect(courses.value?.[2]?.academic_startyear).toBe(2022) + expect(courses.value?.[2]?.description).toBe("Software course") + expect(courses.value?.[2]?.students).toEqual([]) + expect(courses.value?.[2]?.teachers).toEqual([]) + expect(courses.value?.[2]?.assistants).toEqual([]) + expect(courses.value?.[2]?.projects).toEqual([]) + + expect(courses.value?.[3]?.name).toBe("Math") + expect(courses.value?.[3]?.parent_course).toBe("1") + expect(courses.value?.[3]?.academic_startyear).toBe(2024) + expect(courses.value?.[3]?.description).toBe("Math course") + expect(courses.value?.[3]?.students).toEqual([]) + expect(courses.value?.[3]?.teachers).toEqual([]) + expect(courses.value?.[3]?.assistants).toEqual([]) + expect(courses.value?.[3]?.projects).toEqual([]) + + expect(courses.value?.[4]?.name).toBe("Math") + expect(courses.value?.[4]?.parent_course).toBe("12") + expect(courses.value?.[4]?.academic_startyear).toBe(2025) + expect(courses.value?.[4]?.description).toBe("Math course") + expect(courses.value?.[4]?.students).toEqual([]) + expect(courses.value?.[4]?.teachers).toEqual([]) + expect(courses.value?.[4]?.assistants).toEqual([]) + expect(courses.value?.[4]?.projects).toEqual([]) + + expect(courses.value?.[5]?.name).toBe("Club brugge") + expect(courses.value?.[5]?.parent_course).toBeNull() + expect(courses.value?.[5]?.academic_startyear).toBe(2023) + expect(courses.value?.[5]?.description).toBeNull() + expect(courses.value?.[5]?.students).toEqual([]) + expect(courses.value?.[5]?.teachers).toEqual([]) + expect(courses.value?.[5]?.assistants).toEqual([]) + expect(courses.value?.[5]?.projects).toEqual([]) + + expect(courses.value?.[6]?.name).toBe("vergeet barbara") + expect(courses.value?.[6]?.parent_course).toBeNull() + expect(courses.value?.[6]?.academic_startyear).toBe(2023) + expect(courses.value?.[6]?.description).toBeNull() + expect(courses.value?.[6]?.students).toEqual([]) + expect(courses.value?.[6]?.teachers).toEqual([]) + expect(courses.value?.[6]?.assistants).toEqual([]) + expect(courses.value?.[6]?.projects).toEqual([]) + }) +}) \ No newline at end of file diff --git a/frontend/src/test/unit/faculty_service.test.ts b/frontend/src/test/unit/faculty_service.test.ts new file mode 100644 index 00000000..520f4da2 --- /dev/null +++ b/frontend/src/test/unit/faculty_service.test.ts @@ -0,0 +1,31 @@ +import {describe, it, expect, beforeEach} from 'vitest' +import { useFaculty } from '@/composables/services/faculties.service.ts' + +const { + faculties, + faculty, + getFacultyByID, + getFacultys, + + createFaculty, + deleteFaculty +} = useFaculty(); + +describe("faculty", (): void => { + it("gets faculty data by id", async () => { + await getFacultyByID("wetenschappen") + expect(faculty.value).not.toBeNull() + expect(faculty.value?.name).toBe("wetenschappen") + }) + + it("gets faculties data", async () => { + await getFacultys() + expect(faculties).not.toBeNull() + expect(Array.isArray(faculties.value)).toBe(true) + expect(faculties.value?.length).toBe(2); + expect(faculties.value?.[0]).not.toBeNull() + expect(faculties.value?.[0].name).toBe("wetenschappen") + expect(faculties.value?.[1]).not.toBeNull() + expect(faculties.value?.[1].name).toBe("voetbal") + }) +}) \ No newline at end of file diff --git a/frontend/src/test/unit/group_service.test.ts b/frontend/src/test/unit/group_service.test.ts new file mode 100644 index 00000000..917107fe --- /dev/null +++ b/frontend/src/test/unit/group_service.test.ts @@ -0,0 +1,56 @@ +import {describe, it, expect, beforeEach} from 'vitest' +import { useGroup } from '@/composables/services/groups.service.ts' + +const { + groups, + group, + getGroupByID, + getGroupsByProject, + getGroupsByStudent, + + createGroup, + deleteGroup +} = useGroup(); + +describe("group", (): void => { + it("gets group data by id", async () => { + await getGroupByID("0") + expect(group.value).not.toBeNull() + expect(group.value?.score).toBe(20) + expect(group.value?.id).toBe("0") + expect(group.value?.project).toBeNull() + expect(group.value?.students).toEqual([]); + expect(group.value?.submissions).toEqual([]); + }) + + it("gets groups data by project", async () => { + await getGroupsByProject("0") + // console.log(groups.value) + // Ensure group data is not null + expect(groups.value).not.toBeNull(); + expect(Array.isArray(groups.value)).toBe(true) + expect(groups.value?.length).toBe(2) + + expect(groups.value?.[0]).not.toBeNull() + expect(groups.value?.[0]?.score).toBe(20) + expect(groups.value?.[0]?.id).toBe("0") + expect(groups.value?.[0]?.project).toBeNull() + expect(groups.value?.[0]?.students).toEqual([]) + expect(groups.value?.[0]?.submissions).toEqual([]) + + expect(groups.value?.[1]).not.toBeNull() + expect(groups.value?.[1]?.score).toBe(18) + expect(groups.value?.[1]?.id).toBe("1") + expect(groups.value?.[1]?.project).toBeNull() + expect(groups.value?.[1]?.students).toEqual([]); + expect(groups.value?.[1]?.submissions).toEqual([]); + }) + + /* + it("create group", async () => { + let gr = new Group("3",10) + await createGroup(gr, "0") + console.log(group.value) + }) + */ +}) \ No newline at end of file diff --git a/frontend/src/test/unit/project_service.test.ts b/frontend/src/test/unit/project_service.test.ts new file mode 100644 index 00000000..53519d65 --- /dev/null +++ b/frontend/src/test/unit/project_service.test.ts @@ -0,0 +1,78 @@ +import {describe, it, expect, beforeEach} from 'vitest' +import { useProject } from '@/composables/services/project.service.ts' + +const { + projects, + project, + getProjectByID, + getProjectsByCourse, + getProjectsByCourseAndDeadline, + getProjectsByStudent, + + createProject, + deleteProject +} = useProject(); + +describe("project", (): void => { + it("gets project data by id", async () => { + await getProjectByID("0") + expect(project.value).not.toBeNull() + expect(project.value?.name).toBe("sel2") + expect(project.value?.course).toBeNull() + expect(project.value?.description).toBe("this is a test") + expect(project.value?.visible).toBe(true) + expect(project.value?.archived).toBe(false) + expect(project.value?.locked_groups).toBe(false) + expect(project.value?.start_date).toStrictEqual(new Date("July 21, 2024 01:15:00")) + expect(project.value?.deadline).toStrictEqual(new Date("July 23, 2024 01:15:00")) + expect(project.value?.max_score).toBe(100) + expect(project.value?.score_visible).toBe(true) + expect(project.value?.group_size).toBe(8) + expect(project.value?.course).toBeNull() + expect(project.value?.structure_checks).toEqual([]) + expect(project.value?.extra_checks).toEqual([]) + expect(project.value?.groups).toEqual([]) + expect(project.value?.submissions).toEqual([]) + }) + + it("gets projects data", async () => { + await getProjectsByCourse("1") + expect(projects).not.toBeNull() + expect(Array.isArray(projects.value)).toBe(true) + expect(projects.value?.length).toBe(2); + expect(projects.value).not.toBeNull() + expect(projects.value?.[0]?.name).toBe("sel2") + expect(projects.value?.[0]?.course).toBeNull() + expect(projects.value?.[0]?.description).toBe("this is a test") + expect(projects.value?.[0]?.visible).toBe(true) + expect(projects.value?.[0]?.archived).toBe(false) + expect(projects.value?.[0]?.locked_groups).toBe(false) + expect(projects.value?.[0]?.start_date).toStrictEqual(new Date("July 21, 2024 01:15:00")) + expect(projects.value?.[0]?.deadline).toStrictEqual(new Date("July 23, 2024 01:15:00")) + expect(projects.value?.[0]?.max_score).toBe(100) + expect(projects.value?.[0]?.score_visible).toBe(true) + expect(projects.value?.[0]?.group_size).toBe(8) + expect(projects.value?.[0]?.course).toBeNull() + expect(projects.value?.[0]?.structure_checks).toEqual([]) + expect(projects.value?.[0]?.extra_checks).toEqual([]) + expect(projects.value?.[0]?.groups).toEqual([]) + expect(projects.value?.[0]?.submissions).toEqual([]) + + expect(projects.value?.[1]?.name).toBe("sel3") + expect(projects.value?.[1]?.course).toBeNull() + expect(projects.value?.[1]?.description).toBe("make a project") + expect(projects.value?.[1]?.visible).toBe(true) + expect(projects.value?.[1]?.archived).toBe(false) + expect(projects.value?.[1]?.locked_groups).toBe(false) + expect(projects.value?.[1]?.start_date).toStrictEqual(new Date("July 21, 2024 01:15:00")) + expect(projects.value?.[1]?.deadline).toStrictEqual(new Date("July 23, 2024 01:15:00")) + expect(projects.value?.[1]?.max_score).toBe(20) + expect(projects.value?.[1]?.score_visible).toBe(false) + expect(projects.value?.[1]?.group_size).toBe(3) + expect(projects.value?.[1]?.course).toBeNull() + expect(projects.value?.[1]?.structure_checks).toEqual([]) + expect(projects.value?.[1]?.extra_checks).toEqual([]) + expect(projects.value?.[1]?.groups).toEqual([]) + expect(projects.value?.[1]?.submissions).toEqual([]) + }) +}) \ No newline at end of file diff --git a/frontend/src/test/unit/setup.ts b/frontend/src/test/unit/setup.ts new file mode 100644 index 00000000..4d95aef9 --- /dev/null +++ b/frontend/src/test/unit/setup.ts @@ -0,0 +1,258 @@ +import { afterAll, afterEach, beforeAll } from 'vitest' +import { setupServer } from 'msw/node' +import { HttpResponse, http } from 'msw' + +import { endpoints } from '@/config/endpoints.ts' + +const baseUrl = "http://localhost" + +const groups = [ + { + id: "0", + score: 20, + project:"0", + }, + { + id: "1", + score: 18, + project:"0" + } +] + +const projects = [ + { + id: "0", + course:"1", + name: "sel2", + description: "this is a test", + visible: true, + archived: false, + locked_groups: false, + start_date: new Date("July 21, 2024 01:15:00"), + deadline: new Date("July 23, 2024 01:15:00"), + max_score: 100, + score_visible: true, + group_size: 8 + }, + { + id: 1, + course: "1", + name: "sel3", + description: "make a project", + visible: true, + archived: false, + locked_groups: false, + start_date: new Date("July 21, 2024 01:15:00"), + deadline: new Date("July 23, 2024 01:15:00"), + max_score: 20, + score_visible: false, + group_size: 3 + } +] + +const courses = [ + { + "id": "1", + "teachers": [], + "assistants": [], + "students": [], + "projects": [], + "parent_course": null, + "name": "Math", + "academic_startyear": 2023, + "description": "Math course" + }, + { + "id": "2", + "teachers": [], + "assistants": [], + "students": [], + "projects": [], + "parent_course": "3", + "name": "Sel2", + "academic_startyear": 2023, + "description": "Software course" + }, + { + "id": "3", + "teachers": [], + "assistants": [], + "students": [], + "projects": [], + "parent_course": null, + "name": "Sel1", + "academic_startyear": 2022, + "description": "Software course" + }, + { + "id": "12", + "teachers": [], + "assistants": [], + "students": [], + "projects": [], + "parent_course": "1", + "name": "Math", + "academic_startyear": 2024, + "description": "Math course" + }, + { + "id": "13", + "teachers": [], + "assistants": [], + "students": [], + "projects": [], + "parent_course": "12", + "name": "Math", + "academic_startyear": 2025, + "description": "Math course" + }, + { + "id": "14", + "teachers": [], + "assistants": [], + "students": [], + "projects": [], + "parent_course": null, + "name": "Club brugge", + "academic_startyear": 2023, + "description": null + }, + { + "id": "15", + "teachers": [], + "assistants": [], + "students": [], + "projects": [], + "parent_course": null, + "name": "vergeet barbara", + "academic_startyear": 2023, + "description": null + } +] + +const faculties = [ + {name: "wetenschappen"}, + {name: "voetbal"} +] + +const students = [ + { + id: "1", + last_login: null, + username: "jdoe", + is_staff: false, + email: "John.Doe@hotmail.com", + first_name: "John", + last_name: "Doe", + last_enrolled: 2023, + create_time: new Date("July 21, 2024 01:15:00"), + student_id: null + }, + { + id: "2", + last_login: null, + username: "bverhae", + is_staff: false, + email: "Bartje.Verhaege@gmail.com", + first_name: "Bartje", + last_name: "Verhaege", + last_enrolled: 2023, + create_time: new Date("July 21, 2024 01:15:00"), + student_id: null + }, + { + id: "000201247011", + last_login: new Date("July 30, 2024 01:15:00"), + username: "tverslyp", + is_staff: true, + email: "Tybo.Verslype@UGent.be", + first_name: "Tybo", + last_name: "Verslype", + last_enrolled: 2023, + create_time: new Date("July 21, 2024 01:15:00"), + student_id: "02012470" + }, + { + id: "3", + last_login: null, + username: "somtin", + is_staff: false, + email: "somtin.somtin@gmail.com", + first_name: "somtin", + last_name: "somtin", + last_enrolled: 2023, + create_time: new Date("July 21, 2024 01:15:00"), + student_id: null + } +] + +export const restHandlers = [ + http.get(baseUrl + endpoints.groups.retrieve.replace('{id}', ':id'), + ({ params }) => { + return HttpResponse.json(groups.find(x => x.id == params.id)) + } + ), + http.get(baseUrl + endpoints.students.retrieve.replace('{id}', ':id'), + ({ params }) => { + return HttpResponse.json(students.find(x => x.id == params.id)) + } + ), + http.get(baseUrl + endpoints.projects.retrieve.replace('{id}', ':id'), + ({ params }) => { + return HttpResponse.json(projects.find(x => x.id == params.id)) + } + ), + http.get(baseUrl + endpoints.courses.retrieve.replace('{id}', ':id'), + ({ params }) => { + return HttpResponse.json(courses.find(x => x.id == params.id)) + } + ), + http.get(baseUrl + endpoints.groups.byProject.replace('{project_id}', ':id'), + ({ params }) => { + return HttpResponse.json(groups.filter(x => x.project == params.id)) + } + ), + http.get(baseUrl + endpoints.projects.byCourse.replace('{course_id}', ':id'), + ({ params }) => { + return HttpResponse.json(projects.filter(x => x.course == params.id)) + } + ), + http.get(baseUrl + endpoints.faculties.retrieve.replace('{name}', ':name'), + ({ params }) => { + return HttpResponse.json(faculties.find(x => x.name == params.name)) + } + ), + http.get(baseUrl + endpoints.faculties.index, + ({}) => { + return HttpResponse.json(faculties) + } + ), + http.get(baseUrl + endpoints.courses.index, + ({}) => { + return HttpResponse.json(courses) + } + ), + http.get(baseUrl + endpoints.students.index, + ({}) => { + return HttpResponse.json(students) + } + ) + + /* + http.post(baseUrl + endpoints.groups.byProject.replace('{project_id}', ':id'), + ({ params }) => { + const newGroup = params.body; // Assuming the request body contains the new group data + groups.push(newGroup); + return HttpResponse.json(newGroup); + } + ) + */ +] + +const server = setupServer(...restHandlers) + +beforeAll(() => server.listen({ onUnhandledRequest: "error" })) + +afterAll(() => server.close()) + +afterEach(() => server.resetHandlers()) \ No newline at end of file diff --git a/frontend/src/test/unit/student_service.test.ts b/frontend/src/test/unit/student_service.test.ts new file mode 100644 index 00000000..151047a7 --- /dev/null +++ b/frontend/src/test/unit/student_service.test.ts @@ -0,0 +1,100 @@ +import {describe, it, expect, beforeEach} from 'vitest' +import { useStudents } from '@/composables/services/students.service.ts' + +const { + students, + student, + + response, + + getStudentByID, + getStudents, + getStudentsByCourse, + getStudentsByGroup, + + createStudent, + deleteStudent, + + studentJoinCourse, + studentLeaveCourse, + studentJoinGroup, + studentLeaveGroup +} = useStudents(); + +describe("students", (): void => { + it("gets student data by id", async () => { + await getStudentByID("1") + expect(student.value).not.toBeNull() + expect(student.value?.username).toBe("jdoe") + expect(student.value?.is_staff).toBe(false) + expect(student.value?.email).toBe("John.Doe@hotmail.com") + expect(student.value?.first_name).toBe("John") + expect(student.value?.last_name).toBe("Doe") + expect(student.value?.last_enrolled).toBe(2023) + expect(student.value?.student_id).toBeNull() + // expect(student.value?.last_login).toBeNull() + // expect(student.value?.create_time).toEqual(new Date("July 21, 2024 01:15:00")) + expect(student.value?.courses).toEqual([]) + expect(student.value?.groups).toEqual([]) + expect(student.value?.faculties).toEqual([]) + }) + + it("gets students data", async () => { + await getStudents() + expect(students).not.toBeNull() + expect(Array.isArray(students.value)).toBe(true) + expect(students.value?.length).toBe(4); + + expect(students.value?.[0]?.username).toBe("jdoe") + expect(students.value?.[0]?.is_staff).toBe(false) + expect(students.value?.[0]?.email).toBe("John.Doe@hotmail.com") + expect(students.value?.[0]?.first_name).toBe("John") + expect(students.value?.[0]?.last_name).toBe("Doe") + expect(students.value?.[0]?.last_enrolled).toBe(2023) + expect(students.value?.[0]?.student_id).toBeNull() + // expect(students.value?.[0]?.last_login).toBeNull() + // expect(students.value?.[0]?.create_time).toEqual(new Date("July 21, 2024 01:15:00")) + expect(students.value?.[0]?.courses).toEqual([]) + expect(students.value?.[0]?.groups).toEqual([]) + expect(students.value?.[0]?.faculties).toEqual([]) + + expect(students.value?.[1]?.username).toBe("bverhae") + expect(students.value?.[1]?.is_staff).toBe(false) + expect(students.value?.[1]?.email).toBe("Bartje.Verhaege@gmail.com") + expect(students.value?.[1]?.first_name).toBe("Bartje") + expect(students.value?.[1]?.last_name).toBe("Verhaege") + expect(students.value?.[1]?.last_enrolled).toBe(2023) + expect(students.value?.[1]?.student_id).toBeNull() + // expect(students.value?.[1]?.last_login).toBeNull() + // expect(students.value?.[1]?.create_time).toEqual(new Date("July 21, 2024 01:15:00")) + expect(students.value?.[1]?.courses).toEqual([]) + expect(students.value?.[1]?.groups).toEqual([]) + expect(students.value?.[1]?.faculties).toEqual([]) + + expect(students.value?.[2]?.username).toBe("tverslyp") + expect(students.value?.[2]?.is_staff).toBe(true) + expect(students.value?.[2]?.email).toBe("Tybo.Verslype@UGent.be") + expect(students.value?.[2]?.first_name).toBe("Tybo") + expect(students.value?.[2]?.last_name).toBe("Verslype") + expect(students.value?.[2]?.last_enrolled).toBe(2023) + expect(students.value?.[2]?.student_id).toBe("02012470") + // expect(students.value?.[2]?.last_login).toEqual(new Date("July 30, 2024 01:15:00")) + // expect(students.value?.[2]?.create_time).toEqual(new Date("July 21, 2024 01:15:00")) + expect(students.value?.[2]?.courses).toEqual([]) + expect(students.value?.[2]?.groups).toEqual([]) + expect(students.value?.[2]?.faculties).toEqual([]) + + expect(students.value?.[3]?.username).toBe("somtin") + expect(students.value?.[3]?.is_staff).toBe(false) + expect(students.value?.[3]?.email).toBe("somtin.somtin@gmail.com") + expect(students.value?.[3]?.first_name).toBe("somtin") + expect(students.value?.[3]?.last_name).toBe("somtin") + expect(students.value?.[3]?.last_enrolled).toBe(2023) + expect(students.value?.[3]?.student_id).toBeNull() + // expect(students.value?.[3]?.last_login).toBeNull() + // expect(students.value?.[3]?.create_time).toEqual(new Date("July 21, 2024 01:15:00")) + expect(students.value?.[3]?.courses).toEqual([]) + expect(students.value?.[3]?.groups).toEqual([]) + expect(students.value?.[3]?.faculties).toEqual([]) + }) +}) \ No newline at end of file diff --git a/frontend/src/types/Course.ts b/frontend/src/types/Course.ts index b2ba5380..bd5ed19b 100644 --- a/frontend/src/types/Course.ts +++ b/frontend/src/types/Course.ts @@ -1,9 +1,19 @@ +import { Assistant } from "./Assistant"; +import { Project } from "./Projects"; +import { Student } from "./Student"; +import { Teacher } from "./Teacher"; + export class Course { constructor( public id: string, public name: string, - public description: string, - public academic_startyear: number + public description: string|null, + public academic_startyear: number, + public parent_course: Course|null = null, + public teachers: Teacher[] = [], + public assistants: Assistant[] = [], + public students: Student[] = [], + public projects: Project[] = [] ) { } @@ -25,7 +35,8 @@ export class Course { course.id, course.name, course.description, - course.academic_startyear + course.academic_startyear, + course.parent_course ); } } \ No newline at end of file diff --git a/frontend/src/types/Group.ts b/frontend/src/types/Group.ts index ba50509f..a3c44a8c 100644 --- a/frontend/src/types/Group.ts +++ b/frontend/src/types/Group.ts @@ -6,7 +6,7 @@ export class Group { constructor( public id: string, public score: number = -1, - public projects: Project[] = [], + public project: Project|null = null, public students: Student[] = [], public submissions: Submission[] = [] ) { @@ -28,7 +28,7 @@ export class Group { return new Group( group.id, group.score, - group.projects, + group.project, group.students, group.submissions ); diff --git a/frontend/src/types/Projects.ts b/frontend/src/types/Projects.ts index 1afca8f1..62224c89 100644 --- a/frontend/src/types/Projects.ts +++ b/frontend/src/types/Projects.ts @@ -18,16 +18,11 @@ export class Project { public score_visible: boolean, public group_size: number, - public course: Course = new Course( - "-1", - "default", - "this is a default project given in the service because it isnt initiated", - 0 - ), //TODO check + public course: Course|null = null, public structure_checks: StructureCheck[] = [], public extra_checks: ExtraCheck[] = [], public groups: Group[] = [], - public submissions: Submission = new Submission("0",0,new Date(), false), //TODO check + public submissions: Submission[] = [] ) { } diff --git a/frontend/src/types/StructureCheck.ts b/frontend/src/types/StructureCheck.ts index b065ce9f..54b724ff 100644 --- a/frontend/src/types/StructureCheck.ts +++ b/frontend/src/types/StructureCheck.ts @@ -7,18 +7,7 @@ export class StructureCheck { public name: string, public obligated_extensions: File_extension[] = [], public blocked_extensions: File_extension[] = [], - public project: Project = new Project( - "0", - "default", - "this is a default project given in the service because it isnt initiated", - false, - true, - true, - new Date(), - new Date(), - 0, - false, - 0) // TODO check + public project: Project|null = null ) { } diff --git a/frontend/src/types/Submission.ts b/frontend/src/types/Submission.ts index 12aba485..63c96f73 100644 --- a/frontend/src/types/Submission.ts +++ b/frontend/src/types/Submission.ts @@ -6,7 +6,7 @@ export class Submission { public submission_number: number, public submission_time: Date, public structure_checks_passed: boolean, - public group: Group = new Group("0"), + public group: Group|null = null, public files: File[] = [], //TODO check public extra_checks_results : any[] = [], // TODO diff --git a/frontend/vite.config.ts b/frontend/vite.config.ts index 90fb59c4..49ad0edb 100644 --- a/frontend/vite.config.ts +++ b/frontend/vite.config.ts @@ -1,3 +1,4 @@ +/// import vue from '@vitejs/plugin-vue'; import { resolve } from 'path'; import { defineConfig } from 'vite'; @@ -24,5 +25,8 @@ export default defineConfig({ path: "/hmr", port: 443 } + }, + test: { + setupFiles: "./src/test/unit/setup.ts" } });