From 11caf61f437aed361e202e8d182de14a93263e97 Mon Sep 17 00:00:00 2001 From: Ivan Vasilov Date: Wed, 8 Jan 2025 21:29:45 +0100 Subject: [PATCH] chore: Delete the `tests` package (#32527) * Remove the tests package. * Remove all workspace configs for the tests package. --- package.json | 4 - pnpm-lock.yaml | 720 +++++++----------- pnpm-workspace.yaml | 1 - tests/.jest/jest-custom-reporter.ts | 194 ----- tests/.jest/jest-env.ts | 14 - tests/.jest/teardown.ts | 25 - tests/.prettierignore | 4 - tests/.prettierrc | 7 - tests/README.md | 18 - tests/data/func.ts | 12 - tests/features/javascript/authAdmin.spec.ts | 319 -------- .../javascript/authentication.spec.ts | 330 -------- tests/features/javascript/functions.spec.ts | 42 - tests/features/javascript/hooks.ts | 211 ----- tests/features/javascript/postgrest.spec.ts | 86 --- tests/features/javascript/realtime.spec.ts | 316 -------- tests/features/javascript/rpc.spec.ts | 134 ---- tests/features/javascript/storage.spec.ts | 424 ----------- tests/features/python/authentication.py | 44 -- tests/features/templates/authentication.ts | 50 -- tests/features/templates/enums.ts | 11 - tests/jest.config.ts | 24 - tests/package.json | 39 - tests/supabase/.gitignore | 3 - tests/supabase/config.toml | 71 -- tests/supabase/migrations/data.sql | 50 -- tests/tsconfig.json | 29 - 27 files changed, 255 insertions(+), 2927 deletions(-) delete mode 100644 tests/.jest/jest-custom-reporter.ts delete mode 100644 tests/.jest/jest-env.ts delete mode 100644 tests/.jest/teardown.ts delete mode 100644 tests/.prettierignore delete mode 100644 tests/.prettierrc delete mode 100644 tests/README.md delete mode 100644 tests/data/func.ts delete mode 100644 tests/features/javascript/authAdmin.spec.ts delete mode 100644 tests/features/javascript/authentication.spec.ts delete mode 100644 tests/features/javascript/functions.spec.ts delete mode 100644 tests/features/javascript/hooks.ts delete mode 100644 tests/features/javascript/postgrest.spec.ts delete mode 100644 tests/features/javascript/realtime.spec.ts delete mode 100644 tests/features/javascript/rpc.spec.ts delete mode 100644 tests/features/javascript/storage.spec.ts delete mode 100644 tests/features/python/authentication.py delete mode 100644 tests/features/templates/authentication.ts delete mode 100644 tests/features/templates/enums.ts delete mode 100644 tests/jest.config.ts delete mode 100644 tests/package.json delete mode 100644 tests/supabase/.gitignore delete mode 100644 tests/supabase/config.toml delete mode 100644 tests/supabase/migrations/data.sql delete mode 100644 tests/tsconfig.json diff --git a/package.json b/package.json index f92f9268c5..20584e4137 100644 --- a/package.json +++ b/package.json @@ -22,10 +22,6 @@ "typecheck": "turbo --continue typecheck", "test:prettier": "prettier -c '{apps,packages}/**/*.{js,jsx,ts,tsx,css,md,mdx,json}'", "format": "prettier --write '{apps,packages}/**/*.{js,jsx,ts,tsx,css,md,mdx,json}'", - "docker:dev": "cd docker && docker compose -f docker-compose.yml -f ./dev/docker-compose.dev.yml up --renew-anon-volumes", - "docker:up": "cd docker && docker compose up", - "docker:down": "cd docker && docker compose -f docker-compose.yml -f ./dev/docker-compose.dev.yml down --remove-orphans", - "docker:remove": "cd docker && docker compose -f docker-compose.yml -f ./dev/docker-compose.dev.yml rm -vfs", "test:docs": "turbo run test --filter=docs", "test:ui": "turbo run test --filter=ui", "test:ui-patterns": "turbo run test --filter=ui-patterns", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9aa4d09034..5def67e2b7 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1917,57 +1917,6 @@ importers: specifier: ^1.41.2 version: 1.41.2 - tests: - devDependencies: - '@faker-js/faker': - specifier: ^6.1.2 - version: 6.3.1 - '@supabase/supabase-js': - specifier: ^2.44.3 - version: 2.44.3 - '@testdeck/jest': - specifier: ^0.3.3 - version: 0.3.3 - '@types/jest': - specifier: ^29.5.4 - version: 29.5.5 - '@types/node': - specifier: ^20.0.0 - version: 20.12.11 - '@typescript-eslint/eslint-plugin': - specifier: ^6.19.1 - version: 6.19.1(@typescript-eslint/parser@6.19.1(eslint@8.57.0(supports-color@8.1.1))(supports-color@8.1.1)(typescript@5.5.2))(eslint@8.57.0(supports-color@8.1.1))(supports-color@8.1.1)(typescript@5.5.2) - '@typescript-eslint/parser': - specifier: ^6.19.1 - version: 6.19.1(eslint@8.57.0(supports-color@8.1.1))(supports-color@8.1.1)(typescript@5.5.2) - allure-commandline: - specifier: ^2.17.2 - version: 2.24.0 - allure-js-commons: - specifier: ^2.0.0-beta.14 - version: 2.8.1 - cross-fetch: - specifier: ^3.1.5 - version: 3.1.5(encoding@0.1.13) - jest: - specifier: ^29.7.0 - version: 29.7.0(@types/node@20.12.11)(supports-color@8.1.1) - jest-allure2-adapter: - specifier: ^0.3.12 - version: 0.3.12 - jest-environment-jsdom: - specifier: ^29.7.0 - version: 29.7.0(supports-color@8.1.1) - postgres: - specifier: ^3.0.5 - version: 3.3.5 - ts-jest: - specifier: ^29.1.1 - version: 29.1.2(@babel/core@7.24.7(supports-color@8.1.1))(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.24.7(supports-color@8.1.1))(supports-color@8.1.1))(jest@29.7.0(@types/node@20.12.11)(supports-color@8.1.1))(typescript@5.5.2) - typescript: - specifier: ~5.5.0 - version: 5.5.2 - packages: '@aashutoshrathi/word-wrap@1.2.6': @@ -2798,10 +2747,6 @@ packages: '@exodus/schemasafe@1.3.0': resolution: {integrity: sha512-5Aap/GaRupgNx/feGBwLLTVv8OQFfv3pq2lPRzPg9R+IOBnDgghTGW7l7EuVXOvg5cc/xSAlRW8rBrjIC3Nvqw==} - '@faker-js/faker@6.3.1': - resolution: {integrity: sha512-8YXBE2ZcU/pImVOHX7MWrSR/X5up7t6rPWZlk34RwZEcdr3ua6X+32pSd6XuOQRN+vbuvYNfA6iey8NbrjuMFQ==} - engines: {node: '>=14.0.0', npm: '>=6.0.0'} - '@fal-works/esbuild-plugin-global-externals@2.1.2': resolution: {integrity: sha512-cEee/Z+I12mZcFJshKcCqC8tuX5hG3s+d+9nZ3LabqKF1vKdF41B92pJVCBggjAGORAeOzyyDDKrZwIkLffeOQ==} @@ -5082,12 +5027,6 @@ packages: peerDependencies: react: ^18.0.0 - '@testdeck/core@0.3.3': - resolution: {integrity: sha512-yu1yh7yluqnNDLe6Z18/y7kcmxBBEdfZAg3msG8covKkYPRbsCVr1+HmxReqJMKgeoh/UoEW1pi9Sz0fb/GYVQ==} - - '@testdeck/jest@0.3.3': - resolution: {integrity: sha512-BbycIJiFMp12HUQGqi/Fp3NaWDohbG5NLmN0DyV7DVIanfHRpKDjoB/ALVkpaioCSs+VpoNvqxWaC3QnZhcJQQ==} - '@testing-library/dom@10.1.0': resolution: {integrity: sha512-wdsYKy5zupPyLCW2Je5DLHSxSfbIp6h80WoHOQc+RPtmPGA52O9x5MJEkv92Sjonpq+poOAtUKhh1kBGAXBrNA==} engines: {node: '>=18'} @@ -5173,9 +5112,6 @@ packages: '@types/acorn@4.0.6': resolution: {integrity: sha512-veQTnWP+1D/xbxVrPC3zHnCZRjSrKfhbMUlEA43iMZLu7EsnTtkJklIuwrCPbOi8YkvDQAiW05VQQFvvz9oieQ==} - '@types/allure-js-commons@0.0.1': - resolution: {integrity: sha512-PuKCD4zeoF7Z6tKP0paOKmiMv3zXP2fKj/NiUylxDwBV1AL0PsD6AsbkieuEuRfbFUbG4C28RnmcSu9rPMWWjQ==} - '@types/animejs@3.1.12': resolution: {integrity: sha512-fpdH+ZtlO0kqjTOqRaBdsEmvpRNOayI8k4EVkEtitL5l6wducDOXk0rgQgfZqWf/ZX9DzXrHf257S5i9xTcISQ==} @@ -5390,9 +5326,6 @@ packages: '@types/js-yaml@4.0.6': resolution: {integrity: sha512-ACTuifTSIIbyksx2HTon3aFtCKWcID7/h3XEmRpDYdMCXxPbl+m9GteOJeaAkiAta/NJaSFuA7ahZ0NkwajDSw==} - '@types/jsdom@20.0.1': - resolution: {integrity: sha512-d0r18sZPmMQr1eG35u12FZfhIXNrnsPU/g5wvRKCUf/tOGilKKwYMYGqh33BNR6ba+2gkHw1EUiHoN3mn7E5IQ==} - '@types/json-logic-js@1.2.1': resolution: {integrity: sha512-g/g+wj/7sgazpiCHiyAtndoNiy/LodLkNG4I9MILAl0UinKKwv3GiPKbtvcE1hIoezQqgDamXfx8Lht62/hHqw==} @@ -5451,9 +5384,6 @@ packages: '@types/node-fetch@2.6.6': resolution: {integrity: sha512-95X8guJYhfqiuVVhRFxVQcf4hW/2bCuoPwDasMf/531STFoNoWTT7YDnWdXHEZKqAGUigmpG31r2FE70LwnzJw==} - '@types/node@10.17.60': - resolution: {integrity: sha512-F0KIgDJfy2nA3zMLmWGKxcH2ZVEtCZXHHdOQs2gSaQ27+lNeEfGxzkIw90aXswATX7AZ33tahPbzy6KAfUreVw==} - '@types/node@14.18.63': resolution: {integrity: sha512-fAtCfv4jJg+ExtXhvCkCqUKZ+4ok/JQk01qDKhL5BDDoS3AxKXhV5/MAVUZyQnSEd2GT92fkgZl0pz0Q0AzcIQ==} @@ -5556,10 +5486,6 @@ packages: '@types/statuses@2.0.5': resolution: {integrity: sha512-jmIUGWrAiwu3dZpxntxieC+1n/5c3mjrImkmOSQ2NC5uP6cYO4aAZDdSmRcI5C1oiTmqlZGHC+/NmJrKogbP5A==} - '@types/strip-ansi@5.2.1': - resolution: {integrity: sha512-1l5iM0LBkVU8JXxnIoBqNvg+yyOXxPeN6DNoD+7A9AN1B8FhYPSeIXgyNqwIqg1uzipTgVC2hmuDzB0u9qw/PA==} - deprecated: This is a stub types definition. strip-ansi provides its own type definitions, so you do not need this installed. - '@types/stylis@4.2.0': resolution: {integrity: sha512-n4sx2bqL0mW1tvDf/loQ+aMX7GQD3lc3fkCMC55VFNDu/vBOabO+LTIeXKM14xK0ppk5TUGcWRjiSpIlUpghKw==} @@ -5602,27 +5528,6 @@ packages: '@types/zxcvbn@4.4.2': resolution: {integrity: sha512-T7SEL8b/eN7AEhHQ8oFt7c6Y+l3p8OpH7KwJIe+5oBOPLMMioPeMsUTB3huNgEnXhiittV8Ohdw21Jg8E/f70Q==} - '@typescript-eslint/eslint-plugin@6.19.1': - resolution: {integrity: sha512-roQScUGFruWod9CEyoV5KlCYrubC/fvG8/1zXuT0WTcxX87GnMMmnksMwSg99lo1xiKrBzw2icsJPMAw1OtKxg==} - engines: {node: ^16.0.0 || >=18.0.0} - peerDependencies: - '@typescript-eslint/parser': ^6.0.0 || ^6.0.0-alpha - eslint: ^7.0.0 || ^8.0.0 - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - - '@typescript-eslint/parser@6.19.1': - resolution: {integrity: sha512-WEfX22ziAh6pRE9jnbkkLGp/4RhTpffr2ZK5bJ18M8mIfA8A+k97U9ZyaXCEJRlmMHh7R9MJZWXp/r73DzINVQ==} - engines: {node: ^16.0.0 || >=18.0.0} - peerDependencies: - eslint: ^7.0.0 || ^8.0.0 - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - '@typescript-eslint/parser@7.2.0': resolution: {integrity: sha512-5FKsVcHTk6TafQKQbuIVkXq58Fnbkd2wDL4LB7AURN7RUOu1utVP+G8+6u3ZhEroW3DF6hyo3ZEXxgKgp4KeCg==} engines: {node: ^16.0.0 || >=18.0.0} @@ -5633,41 +5538,14 @@ packages: typescript: optional: true - '@typescript-eslint/scope-manager@6.19.1': - resolution: {integrity: sha512-4CdXYjKf6/6aKNMSly/BP4iCSOpvMmqtDzRtqFyyAae3z5kkqEjKndR5vDHL8rSuMIIWP8u4Mw4VxLyxZW6D5w==} - engines: {node: ^16.0.0 || >=18.0.0} - '@typescript-eslint/scope-manager@7.2.0': resolution: {integrity: sha512-Qh976RbQM/fYtjx9hs4XkayYujB/aPwglw2choHmf3zBjB4qOywWSdt9+KLRdHubGcoSwBnXUH2sR3hkyaERRg==} engines: {node: ^16.0.0 || >=18.0.0} - '@typescript-eslint/type-utils@6.19.1': - resolution: {integrity: sha512-0vdyld3ecfxJuddDjACUvlAeYNrHP/pDeQk2pWBR2ESeEzQhg52DF53AbI9QCBkYE23lgkhLCZNkHn2hEXXYIg==} - engines: {node: ^16.0.0 || >=18.0.0} - peerDependencies: - eslint: ^7.0.0 || ^8.0.0 - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - - '@typescript-eslint/types@6.19.1': - resolution: {integrity: sha512-6+bk6FEtBhvfYvpHsDgAL3uo4BfvnTnoge5LrrCj2eJN8g3IJdLTD4B/jK3Q6vo4Ql/Hoip9I8aB6fF+6RfDqg==} - engines: {node: ^16.0.0 || >=18.0.0} - '@typescript-eslint/types@7.2.0': resolution: {integrity: sha512-XFtUHPI/abFhm4cbCDc5Ykc8npOKBSJePY3a3s+lwumt7XWJuzP5cZcfZ610MIPHjQjNsOLlYK8ASPaNG8UiyA==} engines: {node: ^16.0.0 || >=18.0.0} - '@typescript-eslint/typescript-estree@6.19.1': - resolution: {integrity: sha512-aFdAxuhzBFRWhy+H20nYu19+Km+gFfwNO4TEqyszkMcgBDYQjmPJ61erHxuT2ESJXhlhrO7I5EFIlZ+qGR8oVA==} - engines: {node: ^16.0.0 || >=18.0.0} - peerDependencies: - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - '@typescript-eslint/typescript-estree@7.2.0': resolution: {integrity: sha512-cyxS5WQQCoBwSakpMrvMXuMDEbhOo9bNHHrNcEWis6XHx6KF518tkF1wBvKIn/tpq5ZpUYK7Bdklu8qY0MsFIA==} engines: {node: ^16.0.0 || >=18.0.0} @@ -5677,16 +5555,6 @@ packages: typescript: optional: true - '@typescript-eslint/utils@6.19.1': - resolution: {integrity: sha512-JvjfEZuP5WoMqwh9SPAPDSHSg9FBHHGhjPugSRxu5jMfjvBpq5/sGTD+9M9aQ5sh6iJ8AY/Kk/oUYVEMAPwi7w==} - engines: {node: ^16.0.0 || >=18.0.0} - peerDependencies: - eslint: ^7.0.0 || ^8.0.0 - - '@typescript-eslint/visitor-keys@6.19.1': - resolution: {integrity: sha512-gkdtIO+xSO/SmI0W68DBg4u1KElmIUo3vXzgHyGPs6cxgB0sa3TlptRAAE0hUY1hM6FcDKEv7aIwiTGm76cXfQ==} - engines: {node: ^16.0.0 || >=18.0.0} - '@typescript-eslint/visitor-keys@7.2.0': resolution: {integrity: sha512-c6EIQRHhcpl6+tO8EMR+kjkkV+ugUNXOmeASA1rlzkd8EPIriavpWoiEz1HR/VLhbVIdhqnV6E7JZm00cBDx2A==} engines: {node: ^16.0.0 || >=18.0.0} @@ -5976,13 +5844,6 @@ packages: ajv@8.12.0: resolution: {integrity: sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==} - allure-commandline@2.24.0: - resolution: {integrity: sha512-UuLnq9dOaYAoCCr/hxtxFgDor2/CME3z2Ka2Fj2wN8lRT+v60F+zDN+okrYi77+zFJg4cmCM3jWhEWC9QKja1w==} - hasBin: true - - allure-js-commons@2.8.1: - resolution: {integrity: sha512-Rc6ZQQW3OwX77GrgnQ5vcfDFI6WZteeodfCIgY0fBxUZPQFa14dWbFvLxoMSFV1zUFABtYzkQD7r/2+bfPWb6w==} - animejs@3.2.2: resolution: {integrity: sha512-Ao95qWLpDPXXM+WrmwcKbl6uNlC5tjnowlaRYtuVDHHoygjtIPfDUoK9NthrlZsQSKjZXlmji2TrBUAVbiH0LQ==} @@ -6245,10 +6106,6 @@ packages: engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} hasBin: true - bs-logger@0.2.6: - resolution: {integrity: sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog==} - engines: {node: '>= 6'} - bser@2.1.1: resolution: {integrity: sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==} @@ -6642,9 +6499,6 @@ packages: resolution: {integrity: sha512-ULYhWIonJzlScCCQrPUG5uMXzXxSixty4djud9SS37DoNxDdkeRocxzHuAo4ImRBUK+mAuU5X9TSwEDccnnuPg==} hasBin: true - cross-fetch@3.1.5: - resolution: {integrity: sha512-lvb1SBsI0Z7GDwmuid+mU3kWVBwTVUbe7S0H52yaaAdQOXq2YktTCZdlAcNKFzE6QtRz0snpw9bNiPeOIkkQvw==} - cross-spawn@6.0.6: resolution: {integrity: sha512-VqCUuhcd1iB+dsv8gxPttb5iZh/D0iubSP21g36KXdEuf6I5JiioesUVjpCdHV9MZRUfVFlvwtIUyPfxo5trtw==} engines: {node: '>=4.8'} @@ -8418,9 +8272,6 @@ packages: engines: {node: '>=10'} hasBin: true - jest-allure2-adapter@0.3.12: - resolution: {integrity: sha512-WE4Gk5k7G5kyTr4an0KTaCbHaNGqEo9LatbHL4rRywWH1cWFXlahARpuy73PFxBG8Qt/fPm+7TC/sSBA9S7b+g==} - jest-changed-files@29.7.0: resolution: {integrity: sha512-fEArFiwf1BpQ+4bXSprcDc3/x4HSzL4al2tozwVpDFpsxALjLYdyiIK4e5Vz66GQJIbXJ82+35PtysofptNX2w==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -8463,15 +8314,6 @@ packages: resolution: {integrity: sha512-gns+Er14+ZrEoC5fhOfYCY1LOHHr0TI+rQUHZS8Ttw2l7gl+80eHc/gFf2Ktkw0+SIACDTeWvpFcv3B04VembQ==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - jest-environment-jsdom@29.7.0: - resolution: {integrity: sha512-k9iQbsf9OyOfdzWH8HDmrRT0gSIcX+FLNW7IQq94tFX0gynPwqDTW0Ho6iMVNjGz/nb+l/vW3dWM2bbLLpkbXA==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - peerDependencies: - canvas: ^2.5.0 - peerDependenciesMeta: - canvas: - optional: true - jest-environment-node@29.7.0: resolution: {integrity: sha512-DOSwCRqXirTOyheM+4d5YZOrWcdu0LNZ87ewUoywbcb2XR4wKgqiG8vNeYwhjFMbEkfju7wx2GYH0P2gevGvFw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -8592,12 +8434,6 @@ packages: resolution: {integrity: sha512-X2BB11YZtrRqY4EnQcLX5Rh373zbK4alC1FW7D7MBhL2gtcC17cTnr6DmfHZeS0s2rTHjUTMMHfG7gO8SSdw+g==} engines: {node: '>=0.10.0'} - js-md5@0.7.3: - resolution: {integrity: sha512-ZC41vPSTLKGwIRjqDh8DfXoCrdQIyBgspJVPXHBGu4nZlAEvG3nf+jO9avM9RmLiGakg7vz974ms99nEV0tmTQ==} - - js-sha1@0.6.0: - resolution: {integrity: sha512-01gwBFreYydzmU9BmZxpVk6svJJHrVxEN3IOiGl6VO93bVKYETJ0sIth6DASI6mIFdt7NmfX9UiByRzsYHGU9w==} - js-tiktoken@1.0.10: resolution: {integrity: sha512-ZoSxbGjvGyMT13x6ACo9ebhDha/0FHdKA+OsQcMOWcm1Zs7r90Rhk5lhERLzji+3rA7EKpXCgwXcM5fF3DMpdA==} @@ -8852,9 +8688,6 @@ packages: lodash.isstring@4.0.1: resolution: {integrity: sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw==} - lodash.memoize@4.1.2: - resolution: {integrity: sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag==} - lodash.merge@4.6.2: resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} @@ -8943,9 +8776,6 @@ packages: resolution: {integrity: sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==} engines: {node: '>=10'} - make-error@1.3.6: - resolution: {integrity: sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==} - make-fetch-happen@13.0.1: resolution: {integrity: sha512-cKTUFc/rbKUd/9meOvgrpJ2WrNzymt6jfRDdwg5UCnVzv9dTpEj9JS5m3wtziXVCjluIXyL8pcaukYqezIzZQA==} engines: {node: ^16.14.0 || >=18.0.0} @@ -9694,15 +9524,6 @@ packages: resolution: {integrity: sha512-ofRW94Ab0T4AOh5Fk8t0h8OBWrmjb0SSB20xh1H8YnPV9EJ+f5AMoYSUQ2zgJ4Iq2HAK0I2l5/Nequ8YzFS3Hg==} engines: {node: 4.x || >=6.0.0} - node-fetch@2.6.7: - resolution: {integrity: sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==} - engines: {node: 4.x || >=6.0.0} - peerDependencies: - encoding: ^0.1.0 - peerDependenciesMeta: - encoding: - optional: true - node-fetch@2.7.0: resolution: {integrity: sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==} engines: {node: 4.x || >=6.0.0} @@ -10257,9 +10078,6 @@ packages: resolution: {integrity: sha512-9ZhXKM/rw350N1ovuWHbGxnGh/SNJ4cnxHiM0rxE4VN41wsg8P8zWn9hv/buK00RP4WvlOyr/RBDiptyxVbkZQ==} engines: {node: '>=0.10.0'} - postgres@3.3.5: - resolution: {integrity: sha512-+JD93VELV9gHkqpV5gdL5/70HdGtEw4/XE1S4BC8f1mcPmdib3K5XsKVbnR1XcAyC41zOnifJ+9YRKxdIsXiUw==} - prelude-ls@1.2.1: resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} engines: {node: '>= 0.8.0'} @@ -10346,10 +10164,6 @@ packages: proper-lockfile@4.1.2: resolution: {integrity: sha512-TjNPblN4BwAWMXU8s9AEz4JmQxnD1NNL7bNOY/AKUzyamc379FWASUhc/K1pL2noVb+XmZKLL68cjzLsiOAMaA==} - properties@1.2.1: - resolution: {integrity: sha512-qYNxyMj1JeW54i/EWEFsM1cVwxJbtgPp8+0Wg9XjNaK6VE/c4oRi6PNu5p7w1mNXEIQIjV5Wwn8v8Gz82/QzdQ==} - engines: {node: '>=0.10'} - property-expr@2.0.5: resolution: {integrity: sha512-IJUkICM5dP5znhCckHSv30Q4b5/JA5enCtkRHYaOVOAocnH/1BQEYTC5NMfT3AVl/iXKdr3aqQbQn9DxyWknwA==} @@ -11784,27 +11598,6 @@ packages: ts-interface-checker@0.1.13: resolution: {integrity: sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==} - ts-jest@29.1.2: - resolution: {integrity: sha512-br6GJoH/WUX4pu7FbZXuWGKGNDuU7b8Uj77g/Sp7puZV6EXzuByl6JrECvm0MzVzSTkSHWTihsXt+5XYER5b+g==} - engines: {node: ^16.10.0 || ^18.0.0 || >=20.0.0} - hasBin: true - peerDependencies: - '@babel/core': '>=7.0.0-beta.0 <8' - '@jest/types': ^29.0.0 - babel-jest: ^29.0.0 - esbuild: '*' - jest: ^29.0.0 - typescript: '>=4.3 <6' - peerDependenciesMeta: - '@babel/core': - optional: true - '@jest/types': - optional: true - babel-jest: - optional: true - esbuild: - optional: true - ts-morph@22.0.0: resolution: {integrity: sha512-M9MqFGZREyeb5fTl6gNHKZLqBQA0TjA1lea+CR48R8EBTDuWrNqW6ccC5QvjNR4s6wDumD3LTCjOFSp9iwlzaw==} @@ -12159,9 +11952,6 @@ packages: resolution: {integrity: sha512-6Z7Ma2aVEWisaL6TvBCy7P8rm2LQoPv6dJ7ecIaIixHcwfbJ0x7mWdbcwlIM5IGQxPZSFYeqRCqlOOeKoJYMkw==} engines: {node: '>= 4'} - uuid-by-string@3.0.7: - resolution: {integrity: sha512-9xf+GAcwzLLGL2Z2Vb7hmi7jWIAKSiuaI5cLFsKw1IIlm7S5VpqvdJ5S7N36hqdy0v7DAwnnENJVAeev57/H1A==} - uuid@7.0.3: resolution: {integrity: sha512-DPSke0pXhTZgoF/d+WSt2QaKMCFSfx7QegxEWT+JOuHF5aWrKEn0G+ztjuJg/gG8/ItK+rbPCD/yNv8yyih6Cg==} hasBin: true @@ -13196,71 +12986,85 @@ snapshots: dependencies: '@babel/core': 7.24.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.24.8 + optional: true '@babel/plugin-syntax-bigint@7.8.3(@babel/core@7.24.7(supports-color@8.1.1))': dependencies: '@babel/core': 7.24.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.24.8 + optional: true '@babel/plugin-syntax-class-properties@7.12.13(@babel/core@7.24.7(supports-color@8.1.1))': dependencies: '@babel/core': 7.24.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.24.8 + optional: true '@babel/plugin-syntax-import-meta@7.10.4(@babel/core@7.24.7(supports-color@8.1.1))': dependencies: '@babel/core': 7.24.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.24.8 + optional: true '@babel/plugin-syntax-json-strings@7.8.3(@babel/core@7.24.7(supports-color@8.1.1))': dependencies: '@babel/core': 7.24.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.24.8 + optional: true '@babel/plugin-syntax-jsx@7.24.7(@babel/core@7.24.7(supports-color@8.1.1))': dependencies: '@babel/core': 7.24.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.24.8 + optional: true '@babel/plugin-syntax-logical-assignment-operators@7.10.4(@babel/core@7.24.7(supports-color@8.1.1))': dependencies: '@babel/core': 7.24.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.24.8 + optional: true '@babel/plugin-syntax-nullish-coalescing-operator@7.8.3(@babel/core@7.24.7(supports-color@8.1.1))': dependencies: '@babel/core': 7.24.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.24.8 + optional: true '@babel/plugin-syntax-numeric-separator@7.10.4(@babel/core@7.24.7(supports-color@8.1.1))': dependencies: '@babel/core': 7.24.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.24.8 + optional: true '@babel/plugin-syntax-object-rest-spread@7.8.3(@babel/core@7.24.7(supports-color@8.1.1))': dependencies: '@babel/core': 7.24.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.24.8 + optional: true '@babel/plugin-syntax-optional-catch-binding@7.8.3(@babel/core@7.24.7(supports-color@8.1.1))': dependencies: '@babel/core': 7.24.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.24.8 + optional: true '@babel/plugin-syntax-optional-chaining@7.8.3(@babel/core@7.24.7(supports-color@8.1.1))': dependencies: '@babel/core': 7.24.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.24.8 + optional: true '@babel/plugin-syntax-top-level-await@7.14.5(@babel/core@7.24.7(supports-color@8.1.1))': dependencies: '@babel/core': 7.24.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.24.8 + optional: true '@babel/plugin-syntax-typescript@7.24.7(@babel/core@7.24.7(supports-color@8.1.1))': dependencies: '@babel/core': 7.24.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.24.8 + optional: true '@babel/plugin-transform-react-jsx-self@7.24.5(@babel/core@7.24.7(supports-color@8.1.1))': dependencies: @@ -13303,7 +13107,8 @@ snapshots: '@babel/helper-validator-identifier': 7.24.7 to-fast-properties: 2.0.0 - '@bcoe/v8-coverage@0.2.3': {} + '@bcoe/v8-coverage@0.2.3': + optional: true '@bundled-es-modules/cookie@2.0.1': dependencies: @@ -13756,8 +13561,6 @@ snapshots: '@exodus/schemasafe@1.3.0': {} - '@faker-js/faker@6.3.1': {} - '@fal-works/esbuild-plugin-global-externals@2.1.2': {} '@fastify/busboy@2.1.0': {} @@ -13928,17 +13731,20 @@ snapshots: get-package-type: 0.1.0 js-yaml: 3.14.1 resolve-from: 5.0.0 + optional: true - '@istanbuljs/schema@0.1.3': {} + '@istanbuljs/schema@0.1.3': + optional: true '@jest/console@29.7.0': dependencies: '@jest/types': 29.6.3 - '@types/node': 20.12.11 + '@types/node': 22.7.5 chalk: 4.1.2 jest-message-util: 29.7.0 jest-util: 29.7.0 slash: 3.0.0 + optional: true '@jest/core@29.7.0(supports-color@8.1.1)': dependencies: @@ -13947,14 +13753,14 @@ snapshots: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0(supports-color@8.1.1) '@jest/types': 29.6.3 - '@types/node': 20.12.11 + '@types/node': 22.7.5 ansi-escapes: 4.3.2 chalk: 4.1.2 ci-info: 3.8.0 exit: 0.1.2 graceful-fs: 4.2.11 jest-changed-files: 29.7.0 - jest-config: 29.7.0(@types/node@20.12.11)(supports-color@8.1.1) + jest-config: 29.7.0(@types/node@22.7.5)(supports-color@8.1.1) jest-haste-map: 29.7.0 jest-message-util: 29.7.0 jest-regex-util: 29.6.3 @@ -13974,17 +13780,20 @@ snapshots: - babel-plugin-macros - supports-color - ts-node + optional: true '@jest/environment@29.7.0': dependencies: '@jest/fake-timers': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.12.11 + '@types/node': 22.7.5 jest-mock: 29.7.0 + optional: true '@jest/expect-utils@29.7.0': dependencies: jest-get-type: 29.6.3 + optional: true '@jest/expect@29.7.0(supports-color@8.1.1)': dependencies: @@ -13992,15 +13801,17 @@ snapshots: jest-snapshot: 29.7.0(supports-color@8.1.1) transitivePeerDependencies: - supports-color + optional: true '@jest/fake-timers@29.7.0': dependencies: '@jest/types': 29.6.3 '@sinonjs/fake-timers': 10.3.0 - '@types/node': 20.12.11 + '@types/node': 22.7.5 jest-message-util: 29.7.0 jest-mock: 29.7.0 jest-util: 29.7.0 + optional: true '@jest/globals@29.7.0(supports-color@8.1.1)': dependencies: @@ -14010,6 +13821,7 @@ snapshots: jest-mock: 29.7.0 transitivePeerDependencies: - supports-color + optional: true '@jest/reporters@29.7.0(supports-color@8.1.1)': dependencies: @@ -14019,7 +13831,7 @@ snapshots: '@jest/transform': 29.7.0(supports-color@8.1.1) '@jest/types': 29.6.3 '@jridgewell/trace-mapping': 0.3.25 - '@types/node': 20.12.11 + '@types/node': 22.7.5 chalk: 4.1.2 collect-v8-coverage: 1.0.2 exit: 0.1.2 @@ -14039,6 +13851,7 @@ snapshots: v8-to-istanbul: 9.1.0 transitivePeerDependencies: - supports-color + optional: true '@jest/schemas@29.6.3': dependencies: @@ -14049,6 +13862,7 @@ snapshots: '@jridgewell/trace-mapping': 0.3.25 callsites: 3.1.0 graceful-fs: 4.2.11 + optional: true '@jest/test-result@29.7.0': dependencies: @@ -14056,6 +13870,7 @@ snapshots: '@jest/types': 29.6.3 '@types/istanbul-lib-coverage': 2.0.4 collect-v8-coverage: 1.0.2 + optional: true '@jest/test-sequencer@29.7.0': dependencies: @@ -14063,6 +13878,7 @@ snapshots: graceful-fs: 4.2.11 jest-haste-map: 29.7.0 slash: 3.0.0 + optional: true '@jest/transform@29.7.0(supports-color@8.1.1)': dependencies: @@ -14083,15 +13899,17 @@ snapshots: write-file-atomic: 4.0.2 transitivePeerDependencies: - supports-color + optional: true '@jest/types@29.6.3': dependencies: '@jest/schemas': 29.6.3 '@types/istanbul-lib-coverage': 2.0.4 '@types/istanbul-reports': 3.0.2 - '@types/node': 20.12.11 + '@types/node': 22.7.5 '@types/yargs': 17.0.26 chalk: 4.1.2 + optional: true '@jridgewell/gen-mapping@0.3.5': dependencies: @@ -16246,10 +16064,12 @@ snapshots: '@sinonjs/commons@3.0.0': dependencies: type-detect: 4.0.8 + optional: true '@sinonjs/fake-timers@10.3.0': dependencies: '@sinonjs/commons': 3.0.0 + optional: true '@smithy/abort-controller@2.0.15': dependencies: @@ -16657,12 +16477,6 @@ snapshots: '@tanstack/query-core': 5.13.4 react: 18.2.0 - '@testdeck/core@0.3.3': {} - - '@testdeck/jest@0.3.3': - dependencies: - '@testdeck/core': 0.3.3 - '@testing-library/dom@10.1.0': dependencies: '@babel/code-frame': 7.24.7 @@ -16760,7 +16574,8 @@ snapshots: '@tootallnate/once@1.1.2': {} - '@tootallnate/once@2.0.0': {} + '@tootallnate/once@2.0.0': + optional: true '@trysound/sax@0.2.0': {} @@ -16777,8 +16592,6 @@ snapshots: dependencies: '@types/estree': 1.0.5 - '@types/allure-js-commons@0.0.1': {} - '@types/animejs@3.1.12': {} '@types/aria-query@5.0.2': {} @@ -16998,7 +16811,8 @@ snapshots: '@types/graceful-fs@4.1.7': dependencies: - '@types/node': 20.12.11 + '@types/node': 22.7.5 + optional: true '@types/hast@2.3.6': dependencies: @@ -17013,31 +16827,29 @@ snapshots: '@types/react': 18.3.3 hoist-non-react-statics: 3.3.2 - '@types/istanbul-lib-coverage@2.0.4': {} + '@types/istanbul-lib-coverage@2.0.4': + optional: true '@types/istanbul-lib-report@3.0.1': dependencies: '@types/istanbul-lib-coverage': 2.0.4 + optional: true '@types/istanbul-reports@3.0.2': dependencies: '@types/istanbul-lib-report': 3.0.1 + optional: true '@types/jest@29.5.5': dependencies: expect: 29.7.0 pretty-format: 29.7.0 + optional: true '@types/js-cookie@2.2.7': {} '@types/js-yaml@4.0.6': {} - '@types/jsdom@20.0.1': - dependencies: - '@types/node': 20.12.11 - '@types/tough-cookie': 4.0.5 - parse5: 7.1.2 - '@types/json-logic-js@1.2.1': {} '@types/json-schema@7.0.13': {} @@ -17095,8 +16907,6 @@ snapshots: '@types/node': 20.12.11 form-data: 4.0.0 - '@types/node@10.17.60': {} - '@types/node@14.18.63': {} '@types/node@18.18.13': @@ -17220,16 +17030,13 @@ snapshots: '@types/sqlstring@2.3.0': {} - '@types/stack-utils@2.0.1': {} + '@types/stack-utils@2.0.1': + optional: true '@types/stats.js@0.17.3': {} '@types/statuses@2.0.5': {} - '@types/strip-ansi@5.2.1': - dependencies: - strip-ansi: 7.1.0 - '@types/stylis@4.2.0': {} '@types/tern@0.23.5': @@ -17263,47 +17070,16 @@ snapshots: dependencies: '@types/node': 20.12.11 - '@types/yargs-parser@21.0.1': {} + '@types/yargs-parser@21.0.1': + optional: true '@types/yargs@17.0.26': dependencies: '@types/yargs-parser': 21.0.1 + optional: true '@types/zxcvbn@4.4.2': {} - '@typescript-eslint/eslint-plugin@6.19.1(@typescript-eslint/parser@6.19.1(eslint@8.57.0(supports-color@8.1.1))(supports-color@8.1.1)(typescript@5.5.2))(eslint@8.57.0(supports-color@8.1.1))(supports-color@8.1.1)(typescript@5.5.2)': - dependencies: - '@eslint-community/regexpp': 4.9.1 - '@typescript-eslint/parser': 6.19.1(eslint@8.57.0(supports-color@8.1.1))(supports-color@8.1.1)(typescript@5.5.2) - '@typescript-eslint/scope-manager': 6.19.1 - '@typescript-eslint/type-utils': 6.19.1(eslint@8.57.0(supports-color@8.1.1))(supports-color@8.1.1)(typescript@5.5.2) - '@typescript-eslint/utils': 6.19.1(eslint@8.57.0(supports-color@8.1.1))(supports-color@8.1.1)(typescript@5.5.2) - '@typescript-eslint/visitor-keys': 6.19.1 - debug: 4.3.7(supports-color@8.1.1) - eslint: 8.57.0(supports-color@8.1.1) - graphemer: 1.4.0 - ignore: 5.2.4 - natural-compare: 1.4.0 - semver: 7.6.3 - ts-api-utils: 1.0.3(typescript@5.5.2) - optionalDependencies: - typescript: 5.5.2 - transitivePeerDependencies: - - supports-color - - '@typescript-eslint/parser@6.19.1(eslint@8.57.0(supports-color@8.1.1))(supports-color@8.1.1)(typescript@5.5.2)': - dependencies: - '@typescript-eslint/scope-manager': 6.19.1 - '@typescript-eslint/types': 6.19.1 - '@typescript-eslint/typescript-estree': 6.19.1(supports-color@8.1.1)(typescript@5.5.2) - '@typescript-eslint/visitor-keys': 6.19.1 - debug: 4.3.7(supports-color@8.1.1) - eslint: 8.57.0(supports-color@8.1.1) - optionalDependencies: - typescript: 5.5.2 - transitivePeerDependencies: - - supports-color - '@typescript-eslint/parser@7.2.0(eslint@8.57.0(supports-color@8.1.1))(supports-color@8.1.1)(typescript@5.5.2)': dependencies: '@typescript-eslint/scope-manager': 7.2.0 @@ -17317,47 +17093,13 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/scope-manager@6.19.1': - dependencies: - '@typescript-eslint/types': 6.19.1 - '@typescript-eslint/visitor-keys': 6.19.1 - '@typescript-eslint/scope-manager@7.2.0': dependencies: '@typescript-eslint/types': 7.2.0 '@typescript-eslint/visitor-keys': 7.2.0 - '@typescript-eslint/type-utils@6.19.1(eslint@8.57.0(supports-color@8.1.1))(supports-color@8.1.1)(typescript@5.5.2)': - dependencies: - '@typescript-eslint/typescript-estree': 6.19.1(supports-color@8.1.1)(typescript@5.5.2) - '@typescript-eslint/utils': 6.19.1(eslint@8.57.0(supports-color@8.1.1))(supports-color@8.1.1)(typescript@5.5.2) - debug: 4.3.7(supports-color@8.1.1) - eslint: 8.57.0(supports-color@8.1.1) - ts-api-utils: 1.0.3(typescript@5.5.2) - optionalDependencies: - typescript: 5.5.2 - transitivePeerDependencies: - - supports-color - - '@typescript-eslint/types@6.19.1': {} - '@typescript-eslint/types@7.2.0': {} - '@typescript-eslint/typescript-estree@6.19.1(supports-color@8.1.1)(typescript@5.5.2)': - dependencies: - '@typescript-eslint/types': 6.19.1 - '@typescript-eslint/visitor-keys': 6.19.1 - debug: 4.3.7(supports-color@8.1.1) - globby: 11.1.0 - is-glob: 4.0.3 - minimatch: 9.0.3 - semver: 7.6.3 - ts-api-utils: 1.0.3(typescript@5.5.2) - optionalDependencies: - typescript: 5.5.2 - transitivePeerDependencies: - - supports-color - '@typescript-eslint/typescript-estree@7.2.0(supports-color@8.1.1)(typescript@5.5.2)': dependencies: '@typescript-eslint/types': 7.2.0 @@ -17373,25 +17115,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@6.19.1(eslint@8.57.0(supports-color@8.1.1))(supports-color@8.1.1)(typescript@5.5.2)': - dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0(supports-color@8.1.1)) - '@types/json-schema': 7.0.13 - '@types/semver': 7.5.3 - '@typescript-eslint/scope-manager': 6.19.1 - '@typescript-eslint/types': 6.19.1 - '@typescript-eslint/typescript-estree': 6.19.1(supports-color@8.1.1)(typescript@5.5.2) - eslint: 8.57.0(supports-color@8.1.1) - semver: 7.6.3 - transitivePeerDependencies: - - supports-color - - typescript - - '@typescript-eslint/visitor-keys@6.19.1': - dependencies: - '@typescript-eslint/types': 6.19.1 - eslint-visitor-keys: 3.4.3 - '@typescript-eslint/visitor-keys@7.2.0': dependencies: '@typescript-eslint/types': 7.2.0 @@ -17664,7 +17387,8 @@ snapshots: '@zip.js/zip.js@2.7.30': {} - abab@2.0.6: {} + abab@2.0.6: + optional: true abbrev@1.1.1: {} @@ -17678,6 +17402,7 @@ snapshots: dependencies: acorn: 8.11.3 acorn-walk: 8.3.2 + optional: true acorn-import-attributes@1.9.5(acorn@8.11.3): dependencies: @@ -17763,12 +17488,6 @@ snapshots: require-from-string: 2.0.2 uri-js: 4.4.1 - allure-commandline@2.24.0: {} - - allure-js-commons@2.8.1: - dependencies: - properties: 1.2.1 - animejs@3.2.2: {} ansi-colors@4.1.3: {} @@ -17979,6 +17698,7 @@ snapshots: slash: 3.0.0 transitivePeerDependencies: - supports-color + optional: true babel-plugin-istanbul@6.1.1(supports-color@8.1.1): dependencies: @@ -17989,6 +17709,7 @@ snapshots: test-exclude: 6.0.0 transitivePeerDependencies: - supports-color + optional: true babel-plugin-jest-hoist@29.6.3: dependencies: @@ -17996,6 +17717,7 @@ snapshots: '@babel/types': 7.24.7 '@types/babel__core': 7.20.5 '@types/babel__traverse': 7.20.2 + optional: true babel-preset-current-node-syntax@1.0.1(@babel/core@7.24.7(supports-color@8.1.1)): dependencies: @@ -18012,12 +17734,14 @@ snapshots: '@babel/plugin-syntax-optional-catch-binding': 7.8.3(@babel/core@7.24.7(supports-color@8.1.1)) '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/core@7.24.7(supports-color@8.1.1)) '@babel/plugin-syntax-top-level-await': 7.14.5(@babel/core@7.24.7(supports-color@8.1.1)) + optional: true babel-preset-jest@29.6.3(@babel/core@7.24.7(supports-color@8.1.1)): dependencies: '@babel/core': 7.24.7(supports-color@8.1.1) babel-plugin-jest-hoist: 29.6.3 babel-preset-current-node-syntax: 1.0.1(@babel/core@7.24.7(supports-color@8.1.1)) + optional: true bail@2.0.2: {} @@ -18066,13 +17790,10 @@ snapshots: node-releases: 2.0.18 update-browserslist-db: 1.1.0(browserslist@4.23.3) - bs-logger@0.2.6: - dependencies: - fast-json-stable-stringify: 2.1.0 - bser@2.1.1: dependencies: node-int64: 0.4.0 + optional: true btoa-lite@1.0.0: {} @@ -18150,9 +17871,11 @@ snapshots: camelcase-css@2.0.1: {} - camelcase@5.3.1: {} + camelcase@5.3.1: + optional: true - camelcase@6.3.0: {} + camelcase@6.3.0: + optional: true camelize@1.0.1: {} @@ -18217,7 +17940,8 @@ snapshots: snake-case: 3.0.4 tslib: 2.6.2 - char-regex@1.0.2: {} + char-regex@1.0.2: + optional: true character-entities-html4@2.1.0: {} @@ -18274,7 +17998,8 @@ snapshots: chrome-trace-event@1.0.3: {} - ci-info@3.8.0: {} + ci-info@3.8.0: + optional: true cjs-module-lexer@1.2.3: {} @@ -18324,7 +18049,8 @@ snapshots: - '@types/react' - '@types/react-dom' - co@4.6.0: {} + co@4.6.0: + optional: true cobe@0.6.3: dependencies: @@ -18354,7 +18080,8 @@ snapshots: collapse-white-space@2.1.0: {} - collect-v8-coverage@1.0.2: {} + collect-v8-coverage@1.0.2: + optional: true color-convert@1.9.3: dependencies: @@ -18479,7 +18206,8 @@ snapshots: - markdown-wasm - supports-color - convert-source-map@1.9.0: {} + convert-source-map@1.9.0: + optional: true convert-source-map@2.0.0: {} @@ -18523,6 +18251,7 @@ snapshots: - babel-plugin-macros - supports-color - ts-node + optional: true cron-parser@4.9.0: dependencies: @@ -18530,12 +18259,6 @@ snapshots: cronstrue@2.50.0: {} - cross-fetch@3.1.5(encoding@0.1.13): - dependencies: - node-fetch: 2.6.7(encoding@0.1.13) - transitivePeerDependencies: - - encoding - cross-spawn@6.0.6: dependencies: nice-try: 1.0.5 @@ -18603,13 +18326,16 @@ snapshots: dependencies: css-tree: 2.2.1 - cssom@0.3.8: {} + cssom@0.3.8: + optional: true - cssom@0.5.0: {} + cssom@0.5.0: + optional: true cssstyle@2.3.0: dependencies: cssom: 0.3.8 + optional: true csstype@3.1.2: {} @@ -18694,6 +18420,7 @@ snapshots: abab: 2.0.6 whatwg-mimetype: 3.0.0 whatwg-url: 11.0.0 + optional: true data-view-buffer@1.0.1: dependencies: @@ -18737,7 +18464,8 @@ snapshots: decimal.js-light@2.5.1: {} - decimal.js@10.4.3: {} + decimal.js@10.4.3: + optional: true decko@1.2.0: {} @@ -18745,7 +18473,8 @@ snapshots: dependencies: character-entities: 2.0.2 - dedent@1.5.1: {} + dedent@1.5.1: + optional: true deep-eql@4.1.3: dependencies: @@ -18811,7 +18540,8 @@ snapshots: detect-libc@2.0.3: {} - detect-newline@3.1.0: {} + detect-newline@3.1.0: + optional: true detect-node-es@1.1.0: {} @@ -18871,6 +18601,7 @@ snapshots: domexception@4.0.0: dependencies: webidl-conversions: 7.0.0 + optional: true domhandler@5.0.3: dependencies: @@ -18911,7 +18642,8 @@ snapshots: electron-to-chromium@1.5.13: {} - emittery@0.13.1: {} + emittery@0.13.1: + optional: true emoji-regex@10.3.0: {} @@ -19115,7 +18847,8 @@ snapshots: escape-string-regexp@1.0.5: {} - escape-string-regexp@2.0.0: {} + escape-string-regexp@2.0.0: + optional: true escape-string-regexp@4.0.0: {} @@ -19128,6 +18861,7 @@ snapshots: esutils: 2.0.3 optionalDependencies: source-map: 0.6.1 + optional: true eslint-barrel-file-utils-android-arm-eabi@0.0.10: optional: true @@ -19487,6 +19221,7 @@ snapshots: onetime: 5.1.2 signal-exit: 3.0.7 strip-final-newline: 2.0.0 + optional: true execa@8.0.1: dependencies: @@ -19500,7 +19235,8 @@ snapshots: signal-exit: 4.1.0 strip-final-newline: 3.0.0 - exit@0.1.2: {} + exit@0.1.2: + optional: true expand-range@1.8.2: dependencies: @@ -19515,6 +19251,7 @@ snapshots: jest-matcher-utils: 29.7.0 jest-message-util: 29.7.0 jest-util: 29.7.0 + optional: true exponential-backoff@3.1.1: {} @@ -19573,6 +19310,7 @@ snapshots: fb-watchman@2.0.2: dependencies: bser: 2.1.1 + optional: true fetch-blob@3.2.0: dependencies: @@ -19609,6 +19347,7 @@ snapshots: dependencies: locate-path: 5.0.0 path-exists: 4.0.0 + optional: true find-up@5.0.0: dependencies: @@ -19771,13 +19510,15 @@ snapshots: get-nonce@1.0.1: {} - get-package-type@0.1.0: {} + get-package-type@0.1.0: + optional: true get-port-please@3.1.1: {} get-stdin@8.0.0: {} - get-stream@6.0.1: {} + get-stream@6.0.1: + optional: true get-stream@8.0.1: {} @@ -20201,6 +19942,7 @@ snapshots: html-encoding-sniffer@3.0.0: dependencies: whatwg-encoding: 2.0.0 + optional: true html-escaper@2.0.2: {} @@ -20234,6 +19976,7 @@ snapshots: debug: 4.3.7(supports-color@8.1.1) transitivePeerDependencies: - supports-color + optional: true http-proxy-agent@7.0.2(supports-color@8.1.1): dependencies: @@ -20258,7 +20001,8 @@ snapshots: transitivePeerDependencies: - supports-color - human-signals@2.1.0: {} + human-signals@2.1.0: + optional: true human-signals@5.0.0: {} @@ -20273,6 +20017,7 @@ snapshots: iconv-lite@0.6.3: dependencies: safer-buffer: 2.1.2 + optional: true ieee754@1.2.1: {} @@ -20300,6 +20045,7 @@ snapshots: dependencies: pkg-dir: 4.2.0 resolve-cwd: 3.0.0 + optional: true imurmurhash@0.1.4: {} @@ -20430,7 +20176,8 @@ snapshots: is-fullwidth-code-point@3.0.0: {} - is-generator-fn@2.1.0: {} + is-generator-fn@2.1.0: + optional: true is-generator-function@1.0.10: dependencies: @@ -20478,7 +20225,8 @@ snapshots: is-plain-object@5.0.0: {} - is-potential-custom-element-name@1.0.1: {} + is-potential-custom-element-name@1.0.1: + optional: true is-primitive@3.0.1: {} @@ -20548,7 +20296,8 @@ snapshots: isobject@3.0.1: {} - istanbul-lib-coverage@3.2.0: {} + istanbul-lib-coverage@3.2.0: + optional: true istanbul-lib-instrument@5.2.1(supports-color@8.1.1): dependencies: @@ -20559,6 +20308,7 @@ snapshots: semver: 6.3.1 transitivePeerDependencies: - supports-color + optional: true istanbul-lib-instrument@6.0.0(supports-color@8.1.1): dependencies: @@ -20569,12 +20319,14 @@ snapshots: semver: 7.6.3 transitivePeerDependencies: - supports-color + optional: true istanbul-lib-report@3.0.1: dependencies: istanbul-lib-coverage: 3.2.0 make-dir: 4.0.0 supports-color: 7.2.0 + optional: true istanbul-lib-source-maps@4.0.1(supports-color@8.1.1): dependencies: @@ -20583,11 +20335,13 @@ snapshots: source-map: 0.6.1 transitivePeerDependencies: - supports-color + optional: true istanbul-reports@3.1.6: dependencies: html-escaper: 2.0.2 istanbul-lib-report: 3.0.1 + optional: true iterator.prototype@1.1.2: dependencies: @@ -20620,20 +20374,12 @@ snapshots: filelist: 1.0.4 minimatch: 3.1.2 - jest-allure2-adapter@0.3.12: - dependencies: - '@types/allure-js-commons': 0.0.1 - '@types/node': 10.17.60 - '@types/strip-ansi': 5.2.1 - allure-js-commons: 2.8.1 - strip-ansi: 6.0.1 - uuid-by-string: 3.0.7 - jest-changed-files@29.7.0: dependencies: execa: 5.1.1 jest-util: 29.7.0 p-limit: 3.1.0 + optional: true jest-circus@29.7.0(supports-color@8.1.1): dependencies: @@ -20641,7 +20387,7 @@ snapshots: '@jest/expect': 29.7.0(supports-color@8.1.1) '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.12.11 + '@types/node': 22.7.5 chalk: 4.1.2 co: 4.6.0 dedent: 1.5.1 @@ -20660,6 +20406,7 @@ snapshots: transitivePeerDependencies: - babel-plugin-macros - supports-color + optional: true jest-cli@29.7.0(@types/node@20.12.11)(supports-color@8.1.1): dependencies: @@ -20679,6 +20426,7 @@ snapshots: - babel-plugin-macros - supports-color - ts-node + optional: true jest-config@29.7.0(@types/node@20.12.11)(supports-color@8.1.1): dependencies: @@ -20709,6 +20457,38 @@ snapshots: transitivePeerDependencies: - babel-plugin-macros - supports-color + optional: true + + jest-config@29.7.0(@types/node@22.7.5)(supports-color@8.1.1): + dependencies: + '@babel/core': 7.24.7(supports-color@8.1.1) + '@jest/test-sequencer': 29.7.0 + '@jest/types': 29.6.3 + babel-jest: 29.7.0(@babel/core@7.24.7(supports-color@8.1.1))(supports-color@8.1.1) + chalk: 4.1.2 + ci-info: 3.8.0 + deepmerge: 4.3.1 + glob: 7.2.3 + graceful-fs: 4.2.11 + jest-circus: 29.7.0(supports-color@8.1.1) + jest-environment-node: 29.7.0 + jest-get-type: 29.6.3 + jest-regex-util: 29.6.3 + jest-resolve: 29.7.0 + jest-runner: 29.7.0(supports-color@8.1.1) + jest-util: 29.7.0 + jest-validate: 29.7.0 + micromatch: 4.0.8 + parse-json: 5.2.0 + pretty-format: 29.7.0 + slash: 3.0.0 + strip-json-comments: 3.1.1 + optionalDependencies: + '@types/node': 22.7.5 + transitivePeerDependencies: + - babel-plugin-macros + - supports-color + optional: true jest-diff@29.7.0: dependencies: @@ -20716,10 +20496,12 @@ snapshots: diff-sequences: 29.6.3 jest-get-type: 29.6.3 pretty-format: 29.7.0 + optional: true jest-docblock@29.7.0: dependencies: detect-newline: 3.1.0 + optional: true jest-each@29.7.0: dependencies: @@ -20728,38 +20510,26 @@ snapshots: jest-get-type: 29.6.3 jest-util: 29.7.0 pretty-format: 29.7.0 - - jest-environment-jsdom@29.7.0(supports-color@8.1.1): - dependencies: - '@jest/environment': 29.7.0 - '@jest/fake-timers': 29.7.0 - '@jest/types': 29.6.3 - '@types/jsdom': 20.0.1 - '@types/node': 20.12.11 - jest-mock: 29.7.0 - jest-util: 29.7.0 - jsdom: 20.0.3(supports-color@8.1.1) - transitivePeerDependencies: - - bufferutil - - supports-color - - utf-8-validate + optional: true jest-environment-node@29.7.0: dependencies: '@jest/environment': 29.7.0 '@jest/fake-timers': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.12.11 + '@types/node': 22.7.5 jest-mock: 29.7.0 jest-util: 29.7.0 + optional: true - jest-get-type@29.6.3: {} + jest-get-type@29.6.3: + optional: true jest-haste-map@29.7.0: dependencies: '@jest/types': 29.6.3 '@types/graceful-fs': 4.1.7 - '@types/node': 20.12.11 + '@types/node': 22.7.5 anymatch: 3.1.3 fb-watchman: 2.0.2 graceful-fs: 4.2.11 @@ -20770,11 +20540,13 @@ snapshots: walker: 1.0.8 optionalDependencies: fsevents: 2.3.3 + optional: true jest-leak-detector@29.7.0: dependencies: jest-get-type: 29.6.3 pretty-format: 29.7.0 + optional: true jest-matcher-utils@29.7.0: dependencies: @@ -20782,6 +20554,7 @@ snapshots: jest-diff: 29.7.0 jest-get-type: 29.6.3 pretty-format: 29.7.0 + optional: true jest-message-util@29.7.0: dependencies: @@ -20794,18 +20567,22 @@ snapshots: pretty-format: 29.7.0 slash: 3.0.0 stack-utils: 2.0.6 + optional: true jest-mock@29.7.0: dependencies: '@jest/types': 29.6.3 - '@types/node': 20.12.11 + '@types/node': 22.7.5 jest-util: 29.7.0 + optional: true jest-pnp-resolver@1.2.3(jest-resolve@29.7.0): optionalDependencies: jest-resolve: 29.7.0 + optional: true - jest-regex-util@29.6.3: {} + jest-regex-util@29.6.3: + optional: true jest-resolve-dependencies@29.7.0(supports-color@8.1.1): dependencies: @@ -20813,6 +20590,7 @@ snapshots: jest-snapshot: 29.7.0(supports-color@8.1.1) transitivePeerDependencies: - supports-color + optional: true jest-resolve@29.7.0: dependencies: @@ -20825,6 +20603,7 @@ snapshots: resolve: 1.22.8 resolve.exports: 2.0.2 slash: 3.0.0 + optional: true jest-runner@29.7.0(supports-color@8.1.1): dependencies: @@ -20833,7 +20612,7 @@ snapshots: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0(supports-color@8.1.1) '@jest/types': 29.6.3 - '@types/node': 20.12.11 + '@types/node': 22.7.5 chalk: 4.1.2 emittery: 0.13.1 graceful-fs: 4.2.11 @@ -20851,6 +20630,7 @@ snapshots: source-map-support: 0.5.13 transitivePeerDependencies: - supports-color + optional: true jest-runtime@29.7.0(supports-color@8.1.1): dependencies: @@ -20861,7 +20641,7 @@ snapshots: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0(supports-color@8.1.1) '@jest/types': 29.6.3 - '@types/node': 20.12.11 + '@types/node': 22.7.5 chalk: 4.1.2 cjs-module-lexer: 1.2.3 collect-v8-coverage: 1.0.2 @@ -20878,6 +20658,7 @@ snapshots: strip-bom: 4.0.0 transitivePeerDependencies: - supports-color + optional: true jest-snapshot@29.7.0(supports-color@8.1.1): dependencies: @@ -20903,15 +20684,17 @@ snapshots: semver: 7.6.3 transitivePeerDependencies: - supports-color + optional: true jest-util@29.7.0: dependencies: '@jest/types': 29.6.3 - '@types/node': 20.12.11 + '@types/node': 22.7.5 chalk: 4.1.2 ci-info: 3.8.0 graceful-fs: 4.2.11 picomatch: 2.3.1 + optional: true jest-validate@29.7.0: dependencies: @@ -20921,30 +20704,33 @@ snapshots: jest-get-type: 29.6.3 leven: 3.1.0 pretty-format: 29.7.0 + optional: true jest-watcher@29.7.0: dependencies: '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.12.11 + '@types/node': 22.7.5 ansi-escapes: 4.3.2 chalk: 4.1.2 emittery: 0.13.1 jest-util: 29.7.0 string-length: 4.0.2 + optional: true jest-worker@27.5.1: dependencies: - '@types/node': 20.12.11 + '@types/node': 22.7.5 merge-stream: 2.0.0 supports-color: 8.1.1 jest-worker@29.7.0: dependencies: - '@types/node': 20.12.11 + '@types/node': 22.7.5 jest-util: 29.7.0 merge-stream: 2.0.0 supports-color: 8.1.1 + optional: true jest@29.7.0(@types/node@20.12.11)(supports-color@8.1.1): dependencies: @@ -20957,6 +20743,7 @@ snapshots: - babel-plugin-macros - supports-color - ts-node + optional: true jiti@1.20.0: {} @@ -20973,10 +20760,6 @@ snapshots: js-levenshtein@1.1.6: {} - js-md5@0.7.3: {} - - js-sha1@0.6.0: {} - js-tiktoken@1.0.10: dependencies: base64-js: 1.5.1 @@ -21036,6 +20819,7 @@ snapshots: - bufferutil - supports-color - utf-8-validate + optional: true jsesc@2.5.2: {} @@ -21130,7 +20914,8 @@ snapshots: kind-of@6.0.3: {} - kleur@3.0.3: {} + kleur@3.0.3: + optional: true kleur@4.1.5: {} @@ -21144,7 +20929,8 @@ snapshots: dependencies: set-getter: 0.1.1 - leven@3.1.0: {} + leven@3.1.0: + optional: true levn@0.4.1: dependencies: @@ -21217,6 +21003,7 @@ snapshots: locate-path@5.0.0: dependencies: p-locate: 4.1.0 + optional: true locate-path@6.0.0: dependencies: @@ -21263,8 +21050,6 @@ snapshots: lodash.isstring@4.0.1: {} - lodash.memoize@4.1.2: {} - lodash.merge@4.6.2: {} lodash.once@4.1.1: {} @@ -21347,8 +21132,7 @@ snapshots: make-dir@4.0.0: dependencies: semver: 7.6.3 - - make-error@1.3.6: {} + optional: true make-fetch-happen@13.0.1(supports-color@8.1.1): dependencies: @@ -21392,6 +21176,7 @@ snapshots: makeerror@1.0.12: dependencies: tmpl: 1.0.5 + optional: true mark.js@8.11.1: {} @@ -22388,7 +22173,8 @@ snapshots: dependencies: mime-db: 1.52.0 - mimic-fn@2.1.0: {} + mimic-fn@2.1.0: + optional: true mimic-fn@4.0.0: {} @@ -22694,12 +22480,6 @@ snapshots: dependencies: http2-client: 1.3.5 - node-fetch@2.6.7(encoding@0.1.13): - dependencies: - whatwg-url: 5.0.0 - optionalDependencies: - encoding: 0.1.13 - node-fetch@2.7.0(encoding@0.1.13): dependencies: whatwg-url: 5.0.0 @@ -22743,7 +22523,8 @@ snapshots: - bluebird - supports-color - node-int64@0.4.0: {} + node-int64@0.4.0: + optional: true node-readfiles@0.2.0: dependencies: @@ -22796,6 +22577,7 @@ snapshots: npm-run-path@4.0.1: dependencies: path-key: 3.1.1 + optional: true npm-run-path@5.3.0: dependencies: @@ -22828,7 +22610,8 @@ snapshots: mitt: 3.0.1 next: 14.2.21(@babel/core@7.24.7(supports-color@8.1.1))(@opentelemetry/api@1.9.0)(@playwright/test@1.41.2)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(sass@1.72.0) - nwsapi@2.2.7: {} + nwsapi@2.2.7: + optional: true oas-kit-common@1.0.8: dependencies: @@ -22923,6 +22706,7 @@ snapshots: onetime@5.1.2: dependencies: mimic-fn: 2.1.0 + optional: true onetime@6.0.0: dependencies: @@ -22986,6 +22770,7 @@ snapshots: p-limit@2.3.0: dependencies: p-try: 2.2.0 + optional: true p-limit@3.1.0: dependencies: @@ -22998,6 +22783,7 @@ snapshots: p-locate@4.1.0: dependencies: p-limit: 2.3.0 + optional: true p-locate@5.0.0: dependencies: @@ -23007,7 +22793,8 @@ snapshots: dependencies: aggregate-error: 3.1.0 - p-try@2.2.0: {} + p-try@2.2.0: + optional: true package-json-from-dist@1.0.1: {} @@ -23062,6 +22849,7 @@ snapshots: error-ex: 1.3.2 json-parse-even-better-errors: 2.3.1 lines-and-columns: 1.2.4 + optional: true parse-numeric-range@1.3.0: {} @@ -23212,6 +23000,7 @@ snapshots: pkg-dir@4.2.0: dependencies: find-up: 4.1.0 + optional: true pkg-types@1.2.0: dependencies: @@ -23308,8 +23097,6 @@ snapshots: dependencies: xtend: 4.0.2 - postgres@3.3.5: {} - prelude-ls@1.2.1: {} prettier-plugin-sql-cst@0.11.1: @@ -23371,6 +23158,7 @@ snapshots: dependencies: kleur: 3.0.3 sisteransi: 1.0.5 + optional: true prop-types@15.8.1: dependencies: @@ -23384,8 +23172,6 @@ snapshots: retry: 0.12.0 signal-exit: 3.0.7 - properties@1.2.1: {} - property-expr@2.0.5: {} property-information@5.6.0: @@ -23419,7 +23205,8 @@ snapshots: punycode@2.3.0: {} - pure-rand@6.0.4: {} + pure-rand@6.0.4: + optional: true querystringify@2.2.0: {} @@ -24214,14 +24001,17 @@ snapshots: resolve-cwd@3.0.0: dependencies: resolve-from: 5.0.0 + optional: true resolve-from@4.0.0: {} - resolve-from@5.0.0: {} + resolve-from@5.0.0: + optional: true resolve-pkg-maps@1.0.0: {} - resolve.exports@2.0.2: {} + resolve.exports@2.0.2: + optional: true resolve@1.22.8: dependencies: @@ -24311,7 +24101,8 @@ snapshots: es-errors: 1.3.0 is-regex: 1.1.4 - safer-buffer@2.1.2: {} + safer-buffer@2.1.2: + optional: true sass@1.72.0: dependencies: @@ -24335,6 +24126,7 @@ snapshots: saxes@6.0.0: dependencies: xmlchars: 2.2.0 + optional: true scheduler@0.20.2: dependencies: @@ -24498,7 +24290,8 @@ snapshots: mrmime: 2.0.0 totalist: 3.0.1 - sisteransi@1.0.5: {} + sisteransi@1.0.5: + optional: true slash@3.0.0: {} @@ -24553,6 +24346,7 @@ snapshots: dependencies: buffer-from: 1.1.2 source-map: 0.6.1 + optional: true source-map-support@0.5.21: dependencies: @@ -24637,6 +24431,7 @@ snapshots: stack-utils@2.0.6: dependencies: escape-string-regexp: 2.0.0 + optional: true stackback@0.0.2: {} @@ -24677,6 +24472,7 @@ snapshots: dependencies: char-regex: 1.0.2 strip-ansi: 6.0.1 + optional: true string-width@4.2.3: dependencies: @@ -24759,11 +24555,13 @@ snapshots: strip-bom@3.0.0: {} - strip-bom@4.0.0: {} + strip-bom@4.0.0: + optional: true strip-color@0.1.0: {} - strip-final-newline@2.0.0: {} + strip-final-newline@2.0.0: + optional: true strip-final-newline@3.0.0: {} @@ -24934,7 +24732,8 @@ snapshots: dependencies: vue: 3.3.9(typescript@5.5.2) - symbol-tree@3.2.4: {} + symbol-tree@3.2.4: + optional: true tailwind-merge@1.14.0: {} @@ -25015,6 +24814,7 @@ snapshots: '@istanbuljs/schema': 0.1.3 glob: 7.2.3 minimatch: 3.1.2 + optional: true text-table@0.2.0: {} @@ -25065,7 +24865,8 @@ snapshots: tinyspy@3.0.2: {} - tmpl@1.0.5: {} + tmpl@1.0.5: + optional: true to-fast-properties@2.0.0: {} @@ -25112,6 +24913,7 @@ snapshots: tr46@3.0.0: dependencies: punycode: 2.3.0 + optional: true tree-dump@1.0.1(tslib@2.6.2): dependencies: @@ -25129,23 +24931,6 @@ snapshots: ts-interface-checker@0.1.13: {} - ts-jest@29.1.2(@babel/core@7.24.7(supports-color@8.1.1))(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.24.7(supports-color@8.1.1))(supports-color@8.1.1))(jest@29.7.0(@types/node@20.12.11)(supports-color@8.1.1))(typescript@5.5.2): - dependencies: - bs-logger: 0.2.6 - fast-json-stable-stringify: 2.1.0 - jest: 29.7.0(@types/node@20.12.11)(supports-color@8.1.1) - jest-util: 29.7.0 - json5: 2.2.3 - lodash.memoize: 4.1.2 - make-error: 1.3.6 - semver: 7.6.3 - typescript: 5.5.2 - yargs-parser: 21.1.1 - optionalDependencies: - '@babel/core': 7.24.7(supports-color@8.1.1) - '@jest/types': 29.6.3 - babel-jest: 29.7.0(@babel/core@7.24.7(supports-color@8.1.1))(supports-color@8.1.1) - ts-morph@22.0.0: dependencies: '@ts-morph/common': 0.23.0 @@ -25526,11 +25311,6 @@ snapshots: utility-types@3.11.0: {} - uuid-by-string@3.0.7: - dependencies: - js-md5: 0.7.3 - js-sha1: 0.6.0 - uuid@7.0.3: {} uuid@8.3.2: {} @@ -25549,6 +25329,7 @@ snapshots: '@jridgewell/trace-mapping': 0.3.25 '@types/istanbul-lib-coverage': 2.0.4 convert-source-map: 1.9.0 + optional: true validate-npm-package-license@3.0.4: dependencies: @@ -25786,10 +25567,12 @@ snapshots: w3c-xmlserializer@4.0.0: dependencies: xml-name-validator: 4.0.0 + optional: true walker@1.0.8: dependencies: makeerror: 1.0.12 + optional: true warning@4.0.3: dependencies: @@ -25808,7 +25591,8 @@ snapshots: webidl-conversions@3.0.1: {} - webidl-conversions@7.0.0: {} + webidl-conversions@7.0.0: + optional: true webpack-bundle-analyzer@4.10.1: dependencies: @@ -25897,13 +25681,16 @@ snapshots: whatwg-encoding@2.0.0: dependencies: iconv-lite: 0.6.3 + optional: true - whatwg-mimetype@3.0.0: {} + whatwg-mimetype@3.0.0: + optional: true whatwg-url@11.0.0: dependencies: tr46: 3.0.0 webidl-conversions: 7.0.0 + optional: true whatwg-url@5.0.0: dependencies: @@ -25995,6 +25782,7 @@ snapshots: dependencies: imurmurhash: 0.1.4 signal-exit: 3.0.7 + optional: true write-file-atomic@5.0.1: dependencies: @@ -26009,14 +25797,16 @@ snapshots: dependencies: eventemitter3: 2.0.3 - xml-name-validator@4.0.0: {} + xml-name-validator@4.0.0: + optional: true xml-reader@2.4.3: dependencies: eventemitter3: 2.0.3 xml-lexer: 0.2.2 - xmlchars@2.2.0: {} + xmlchars@2.2.0: + optional: true xtend@4.0.2: {} diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index a99e64db0a..cb315b73f4 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -1,7 +1,6 @@ packages: - "apps/*" - "packages/*" - - "tests" - "playwright-tests" catalog: diff --git a/tests/.jest/jest-custom-reporter.ts b/tests/.jest/jest-custom-reporter.ts deleted file mode 100644 index 28b5a2bf09..0000000000 --- a/tests/.jest/jest-custom-reporter.ts +++ /dev/null @@ -1,194 +0,0 @@ -/* eslint-disable @typescript-eslint/ban-types */ -import { AllureReporterApi, jasmine_, registerAllureReporter } from 'jest-allure2-adapter' -import { ContentType, Severity } from 'allure-js-commons' - -// eslint-disable-next-line @typescript-eslint/ban-types -type TestDecorator = ( - target: object, - property: string, - descriptor: PropertyDescriptor -) => PropertyDescriptor -export class JasmineAllureReporter implements jasmine_.CustomReporter { - allure: AllureReporterApi - - constructor(allure: AllureReporterApi) { - this.allure = allure - } - - suiteStarted(suite?: jasmine_.CustomReporterResult): void { - this.allure.startGroup(suite.description) - // some actions here on suite started - } - - suiteDone(): void { - // some actions here on suite end - this.allure.endGroup() - } - - specStarted(spec: jasmine_.CustomReporterResult): void { - this.allure.startTest(spec) - // some actions here on test started - } - - specDone(spec: jasmine_.CustomReporterResult): void { - // some actions here on spec end - this.allure.endTest(spec) - } -} - -registerAllureReporter(undefined, (allure) => new JasmineAllureReporter(allure)) - -declare global { - // eslint-disable-next-line @typescript-eslint/no-namespace - namespace NodeJS { - interface Global { - reporter: AllureReporterApi - } - } -} - -function getAllure(): AllureReporterApi { - // @ts-ignore - we are checking if reporter is defined - if (!global.reporter) { - throw new Error('Unable to find Allure implementation') - } - // @ts-ignore - we know that reporter is an AllureReporterApi - return global.reporter -} - -export function step(nameFn: string | ((arg: T) => string)): TestDecorator { - return (target: object, propertyKey: string, descriptor: PropertyDescriptor) => { - const original: object = descriptor.value - let callable: (args: T) => void = () => { - /* */ - } - - if (typeof original === 'function') { - descriptor.value = function (...args: [T]) { - try { - const value: string = typeof nameFn === 'function' ? nameFn.apply(this, args) : nameFn - callable = () => getAllure().step(value, () => original.apply(this, args)) - // tslint:disable-next-line:no-console - console.info(`Step: ${value || nameFn}`) - } catch (e) { - // tslint:disable-next-line:no-console - console.error(`[ERROR] Failed to apply decorator: ${e}`) - } - return callable.apply(this, args) - } - } - return descriptor - } -} - -export function attachment(name: string, type: ContentType) { - return ( - _target: object, - _propertyKey: string, - descriptor: PropertyDescriptor - ): PropertyDescriptor => { - const original: object = descriptor.value - let callable: (args: T) => void = () => { - /* */ - } - - if (typeof original === 'function') { - descriptor.value = async function (...args: [T]) { - try { - const content: Buffer | string = await original.apply(this, args) - callable = () => - getAllure().step(name, () => { - getAllure().attachment(type.toString(), content, type) - }) - } catch (e) { - // tslint:disable-next-line:no-console - console.error(`[ERROR] Failed to apply decorator: ${e}`) - } - return callable.apply(this, args) - } - } - return descriptor - } -} - -export function attach(name: string, content: string | Buffer, type: ContentType): void { - getAllure().step(name, () => { - getAllure().attachment(type.toString(), content, type) - }) -} - -export function log(name: string, description?: string): void { - console.info(description ? `${name}: ${description}` : name) - getAllure().step(name, () => { - if (description) { - getAllure().step(description, () => { - /* */ - }) - } - }) -} - -export function feature(featureFn: string | ((arg: T) => string)): TestDecorator { - return processDecorator(featureFn, (name) => getAllure().feature(name)) -} - -export function story(storyFn: string | ((arg: T) => string)): TestDecorator { - return processDecorator(storyFn, (name) => getAllure().story(name)) -} - -export function severity( - severityFn: Severity | string | ((arg: T) => string | Severity) -): TestDecorator { - return processDecorator(severityFn, (name: Severity) => getAllure().severity(name)) -} - -export function tag(tagFn: string | ((arg: T) => string)): TestDecorator { - return processDecorator(tagFn, (name) => getAllure().tag(name)) -} - -export function owner(ownerFn: string | ((arg: T) => string)): TestDecorator { - return processDecorator(ownerFn, (name) => getAllure().owner(name)) -} - -export function description(descriptionFn: string | ((arg: T) => string)): TestDecorator { - return processDecorator(descriptionFn, (text) => getAllure().description(text)) -} - -function processDecorator( - parameterFn: string | ((arg: T) => string), - reporterFn: (arg: string) => void -): TestDecorator { - return (target: object, property: string, descriptor: PropertyDescriptor) => { - return processDescriptor(parameterFn, reporterFn, descriptor) - } -} - -function processDescriptor( - parameterFn: string | ((arg: T) => string), - reporterFn: (arg: string) => void, - descriptor: PropertyDescriptor -): PropertyDescriptor { - const original: object = descriptor.value - if (typeof original === 'function') { - descriptor.value = function (...args: [T]) { - try { - const value: string = - typeof parameterFn === 'function' ? parameterFn.apply(this, args) : parameterFn - reporterFn(value) - } catch (e) { - // tslint:disable-next-line:no-console - console.error(`[ERROR] Failed to apply decorator: ${e}`) - } - return original.apply(this, args) - } - } - - for (const prop of Object.keys(original)) { - if (original.hasOwnProperty(prop) && prop.startsWith('__testdeck_')) { - // @ts-ignore - we know that prop exists - descriptor.value[prop] = original[prop] - } - } - - return descriptor -} diff --git a/tests/.jest/jest-env.ts b/tests/.jest/jest-env.ts deleted file mode 100644 index 73d770155e..0000000000 --- a/tests/.jest/jest-env.ts +++ /dev/null @@ -1,14 +0,0 @@ -export default () => { - process.env.SUPABASE_DB_HOST = process.env.SUPABASE_DB_HOST ?? 'localhost' - process.env.SUPABASE_DB_PORT = process.env.SUPABASE_DB_PORT ?? '5432' - process.env.SUPABASE_DB_PASS = - process.env.SUPABASE_DB_PASS ?? 'your-super-secret-and-long-postgres-password' - process.env.SUPABASE_GOTRUE = process.env.SUPABASE_GOTRUE ?? 'http://localhost:8000/auth/v1' - process.env.SUPABASE_URL = process.env.SUPABASE_URL ?? 'http://localhost:8000' - process.env.SUPABASE_KEY_ANON = - process.env.SUPABASE_KEY_ANON ?? - 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyAgCiAgICAicm9sZSI6ICJhbm9uIiwKICAgICJpc3MiOiAic3VwYWJhc2UtZGVtbyIsCiAgICAiaWF0IjogMTY0MTc2OTIwMCwKICAgICJleHAiOiAxNzk5NTM1NjAwCn0.dc_X5iR_VP_qT0zsiyj_I_OZ2T9FtRU2BBNWN8Bu4GE' - process.env.SUPABASE_KEY_ADMIN = - process.env.SUPABASE_KEY_ADMIN ?? - 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyAgCiAgICAicm9sZSI6ICJzZXJ2aWNlX3JvbGUiLAogICAgImlzcyI6ICJzdXBhYmFzZS1kZW1vIiwKICAgICJpYXQiOiAxNjQxNzY5MjAwLAogICAgImV4cCI6IDE3OTk1MzU2MDAKfQ.DaYlNEoUrrEn2Ig7tqibS-PHK5vgusbcbo7X36XVt4Q' -} diff --git a/tests/.jest/teardown.ts b/tests/.jest/teardown.ts deleted file mode 100644 index afb2b1cb2c..0000000000 --- a/tests/.jest/teardown.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { createClient, User, UserResponse } from '@supabase/supabase-js' - -const removeAllUsers = async () => { - const sb = createClient( - process.env.SUPABASE_URL as string, - process.env.SUPABASE_KEY_ADMIN as string - ) - - const { - data: { users }, - } = await sb.auth.admin.listUsers() - - const promises: Promise[] = [] - users.map((u) => { - sb.from('profiles') - .delete() - .match({ id: u.id }) - .then(() => promises.push(sb.auth.admin.deleteUser(u.id))) - }) - await Promise.all(promises) -} - -export default async () => { - await removeAllUsers() -} diff --git a/tests/.prettierignore b/tests/.prettierignore deleted file mode 100644 index 915d0dfbc0..0000000000 --- a/tests/.prettierignore +++ /dev/null @@ -1,4 +0,0 @@ -api -node_modules -package-lock.json -docker* diff --git a/tests/.prettierrc b/tests/.prettierrc deleted file mode 100644 index 8df6df7757..0000000000 --- a/tests/.prettierrc +++ /dev/null @@ -1,7 +0,0 @@ -{ - "trailingComma": "es5", - "tabWidth": 2, - "semi": false, - "singleQuote": true, - "printWidth": 100 -} diff --git a/tests/README.md b/tests/README.md deleted file mode 100644 index 901abed64d..0000000000 --- a/tests/README.md +++ /dev/null @@ -1,18 +0,0 @@ -## Tests - -These tests can be run with Docker. - -We can use either [allure-commandline](https://github.com/allure-framework/allure2) as it is open source and as an github action to host reports with history on GitHub Pages. - -Or use their paid version if we want a bit more groove and possibility to manage test cases not only as code but also manually: . It can be self-hosted or cloud. Not sure that we need it now, but we can always migrate seamlessly to it if we would need it. - -### Steps - -In the parent folder: - -- `npm run docker:dev` -- `npm run test` - -### Clean up - -- `npm run docker:remove` diff --git a/tests/data/func.ts b/tests/data/func.ts deleted file mode 100644 index 3780915068..0000000000 --- a/tests/data/func.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { serve } from 'https://deno.land/std@0.131.0/http/server.ts' - -console.log('Hello from Functions!') - -serve(async (req) => { - const { name } = await req.json() - const data = { - message: `Hello ${name}!`, - } - - return new Response(JSON.stringify(data), { headers: { 'Content-Type': 'application/json' } }) -}) diff --git a/tests/features/javascript/authAdmin.spec.ts b/tests/features/javascript/authAdmin.spec.ts deleted file mode 100644 index 57b55cf495..0000000000 --- a/tests/features/javascript/authAdmin.spec.ts +++ /dev/null @@ -1,319 +0,0 @@ -import { params, retries, suite, test } from '@testdeck/jest' -import { faker } from '@faker-js/faker' -import { Severity } from 'allure-js-commons' - -import { AdminUserAttributes, AuthError, SupabaseClient, UserResponse } from '@supabase/supabase-js' - -import { FEATURE } from '../templates/enums' -import { description, feature, log, severity, step } from '../../.jest/jest-custom-reporter' -import { Hooks } from './hooks' - -@suite('auth_admin') -class AuthenticationAPI extends Hooks { - @feature(FEATURE.AUTH_ADMIN) - @severity(Severity.NORMAL) - @description('When you create user then it has to be in auth db schema') - @test - async 'create user via admin api'() { - const { user, error } = await this.createUserAsAdmin() - expect(error).toBeNull() - expect(user).not.toBeNull() - } - - @feature(FEATURE.AUTH_ADMIN) - @severity(Severity.NORMAL) - @description('When you create user then he can sign in') - @test - async 'user created by admin can login'() { - const { user, error } = await this.createUserAsAdmin() - expect(error).toBeNull() - expect(user).not.toBeNull() - - const supabase = this.createSupaClient(process.env.SUPABASE_URL, process.env.SUPABASE_KEY_ADMIN) - - const { - data: { user: createdUser }, - error: getErr, - } = await supabase.auth.signInWithPassword({ - email: user.email, - password: user.password, - }) - expect(getErr).toBeNull() - expect(createdUser).not.toBeNull() - expect(createdUser.id).toBe(user.id) - } - - @feature(FEATURE.AUTH_ADMIN) - @severity(Severity.CRITICAL) - @description('When you try to create user with anon key then you should get error') - @test - async 'admin create user with anon key should fail'() { - const fakeUser = { - email: faker.internet.exampleEmail(), - password: faker.internet.password(), - email_confirm: true, - } - const supabase = this.createSupaClient(process.env.SUPABASE_URL, process.env.SUPABASE_KEY_ANON) - - const { - error, - data: { user }, - } = await supabase.auth.admin.createUser(fakeUser) - expect(user).toBeNull() - expect(error).not.toBeNull() - } - - @feature(FEATURE.AUTH_ADMIN) - @severity(Severity.CRITICAL) - @description('When you try to create user as logged in user then you should get error') - @test - async 'admin create user with logged in user should fail'() { - const { user } = await this.createUserAsAdmin() - - const supabase = this.createSupaClient(process.env.SUPABASE_URL, process.env.SUPABASE_KEY_ANON) - const { error: signInError } = await supabase.auth.signInWithPassword({ - email: user.email, - password: user.password, - }) - expect(signInError).toBeNull() - - const fakeUser = { - email: faker.internet.exampleEmail(), - password: faker.internet.password(), - } - const { - error, - data: { user: newUser }, - } = await supabase.auth.admin.createUser(fakeUser) - expect(newUser).toBeNull() - expect(error).not.toBeNull() - } - - @feature(FEATURE.AUTH_ADMIN) - @severity(Severity.NORMAL) - @description('When you list users then you should get all users') - @test - async 'list users with service key'() { - const { user: user1 } = await this.createUserAsAdmin() - const { user: user2 } = await this.createUserAsAdmin() - - const supabase = this.createSupaClient(process.env.SUPABASE_URL, process.env.SUPABASE_KEY_ADMIN) - const { - data: { users }, - error, - } = await supabase.auth.admin.listUsers() - - expect(error).toBeNull() - expect(users).not.toBeNull() - expect(users.length).toBeGreaterThanOrEqual(2) - expect(users.map((u) => u.id)).toEqual(expect.arrayContaining([user1.id, user2.id])) - } - - @feature(FEATURE.AUTH_ADMIN) - @severity(Severity.CRITICAL) - @description('When you try to list user with anon key then you should get error') - @test - async 'list users with anon key should fail'() { - await this.createUserAsAdmin() - await this.createUserAsAdmin() - - const supabase = this.createSupaClient(process.env.SUPABASE_URL, process.env.SUPABASE_KEY_ANON) - const { - data: { users }, - error, - } = await supabase.auth.admin.listUsers() - - expect(error).not.toBeNull() - expect(users).toHaveLength(0) - } - - @feature(FEATURE.AUTH_ADMIN) - @severity(Severity.CRITICAL) - @description('When you try to list user as logged in user then you should get error') - @test - async 'list users as logged in user should fail'() { - const { user } = await this.createUserAsAdmin() - await this.createUserAsAdmin() - - const supabase = this.createSupaClient(process.env.SUPABASE_URL, process.env.SUPABASE_KEY_ANON) - const { error: signInError } = await supabase.auth.signInWithPassword({ - email: user.email, - password: user.password, - }) - expect(signInError).toBeNull() - - const { - data: { users }, - error, - } = await supabase.auth.admin.listUsers() - expect(error).not.toBeNull() - expect(users).toHaveLength(0) - } - - @feature(FEATURE.AUTH_ADMIN) - @severity(Severity.NORMAL) - @description('When you get provider url then corresponding auth provider url should be returned') - @params.skip({ provider: 'google', options: {}, expectedURL: 'todo' }) - @params.skip({ - provider: 'google', - options: { redirectTo: 'todo', scopes: 'todo' }, - expectedURL: 'todo', - }) - @params.skip({ provider: 'twitter', options: {}, expectedURL: 'todo' }) - // ... - async 'get url for provider'() { - // todo - } - - @feature(FEATURE.AUTH_ADMIN) - @severity(Severity.NORMAL) - @description('When you get user by id he has to be returned') - @test - async 'get user should work'() { - const { user } = await this.createUserAsAdmin() - - const supabase = this.createSupaClient(process.env.SUPABASE_URL, process.env.SUPABASE_KEY_ADMIN) - const { - data: { user: foundUser }, - error, - } = await supabase.auth.admin.getUserById(user.id) - - expect(error).toBeNull() - expect(foundUser).not.toBeNull() - expect(foundUser.id).toBe(user.id) - expect(foundUser.email).toBe(user.email) - } - - @feature(FEATURE.AUTH_ADMIN) - @severity(Severity.NORMAL) - @description('When you update user then this user has to be updated') - @test - async 'update user should work'() { - const { user } = await this.createUserAsAdmin() - - const supabase = this.createSupaClient(process.env.SUPABASE_URL, process.env.SUPABASE_KEY_ADMIN) - - const updatedUser = { - email: faker.internet.exampleEmail(), - phone: faker.phone.phoneNumber('!#!##!######'), - } - let { - data: { user: resultUser }, - error, - } = await this.updateWithRetries(supabase, user.id, updatedUser) - - expect(error).toBeNull() - expect(resultUser).not.toBeNull() - expect(resultUser.id).toBe(user.id) - expect(resultUser.email).toBe(updatedUser.email) - expect(resultUser.phone).toBe(updatedUser.phone) - } - - @feature(FEATURE.AUTH_ADMIN) - @severity(Severity.NORMAL) - @description('When you delete user then this user has to be removed') - @test - async 'delete user should work'() { - const { user } = await this.createUserAsAdmin() - - const supabase = this.createSupaClient(process.env.SUPABASE_URL, process.env.SUPABASE_KEY_ADMIN) - const { - data: { user: deletedUser }, - error, - } = await supabase.auth.admin.deleteUser(user.id) - expect(error).toBeNull() - - const { - data: { user: foundUser }, - error: getError, - } = await supabase.auth.admin.getUserById(user.id) - expect(getError).not.toBeNull() - expect(foundUser).toBeNull() - } - - @feature(FEATURE.AUTH_ADMIN) - @severity(Severity.CRITICAL) - @description('When you delete user with anon key you have to receive an error') - @test - async 'delete user with anon key should fail'() { - const { user } = await this.createUserAsAdmin() - const { user: villain } = await this.createUserAsAdmin() - - const supabase = this.createSupaClient(process.env.SUPABASE_URL, process.env.SUPABASE_KEY_ANON) - await supabase.auth.signInWithPassword({ - email: villain.email, - password: villain.password, - }) - - const { - data: { user: deletedUser }, - error, - } = await supabase.auth.admin.deleteUser(user.id) - - expect(error).not.toBeNull() - expect(deletedUser).toBeNull() - - const sbAdmin = this.createSupaClient(process.env.SUPABASE_URL, process.env.SUPABASE_KEY_ADMIN) - const { - data: { user: foundUser }, - error: getError, - } = await sbAdmin.auth.admin.getUserById(user.id) - expect(getError).toBeNull() - expect(foundUser).not.toBeNull() - expect(foundUser.email).toBe(user.email) - } - - @step('Create a user as admin') - async createUserAsAdmin(data: AdminUserAttributes = undefined): Promise<{ - user: { - email: string - password: string - username: string - id: string - } - error: AuthError - }> { - const supabase = this.createSupaClient(process.env.SUPABASE_URL, process.env.SUPABASE_KEY_ADMIN) - - let fakeUser: AdminUserAttributes - if (data) { - fakeUser = data - } else { - fakeUser = { - email: faker.internet.exampleEmail(), - password: faker.internet.password(), - email_confirm: true, - } - } - - const { - error, - data: { user }, - } = await supabase.auth.admin.createUser(fakeUser) - - return { - error: error, - user: { - email: user?.email, - password: fakeUser.password, - username: faker.internet.userName(), - id: user?.id, - }, - } - } - - @step('Update user with retries') - async updateWithRetries(supabase: SupabaseClient, uid: string, attributes: AdminUserAttributes) { - let result: UserResponse - for (let i = 1; i < 5; i++) { - result = await supabase.auth.admin.updateUserById(uid, attributes) - - if (result.error && result.error.name === 'AuthRetryableFetchError') { - await new Promise((resolve) => setTimeout(resolve, 1000 * i)) - } else { - break - } - } - return result - } -} diff --git a/tests/features/javascript/authentication.spec.ts b/tests/features/javascript/authentication.spec.ts deleted file mode 100644 index c63af999c2..0000000000 --- a/tests/features/javascript/authentication.spec.ts +++ /dev/null @@ -1,330 +0,0 @@ -import { suite, test, timeout } from '@testdeck/jest' -import { faker } from '@faker-js/faker' -import { Severity } from 'allure-js-commons' - -import { AuthChangeEvent, Session } from '@supabase/supabase-js' - -import { FEATURE } from '../templates/enums' -import { description, feature, log, severity, step } from '../../.jest/jest-custom-reporter' -import { Hooks } from './hooks' - -@suite('authentication') -class Authentication extends Hooks { - @feature(FEATURE.AUTHENTICATION) - @severity(Severity.BLOCKER) - @description('When user sign up then corresponding user in auth schema should be created') - @test - async 'signup should create user'() { - const supabase = this.createSupaClient(process.env.SUPABASE_URL, process.env.SUPABASE_KEY_ANON) - - const fakeUser = { - email: faker.internet.exampleEmail(), - password: faker.internet.password(), - username: faker.internet.userName(), - } - const { - data: { user, session }, - error: signUpError, - } = await this.signUp(supabase, fakeUser) - - expect(signUpError).toBeNull() - expect(user).toBeDefined() - expect(user.email).toEqual(fakeUser.email.toLowerCase()) - expect(session).toBeDefined() - - const [createdUser] = await this.selectUser(user) - expect(createdUser.email).toEqual(fakeUser.email.toLowerCase()) - } - - @feature(FEATURE.AUTHENTICATION) - @severity(Severity.BLOCKER) - @description('When user sign up then he should not be logged in until he confirms his email') - @test - async 'sing up new user and sign in'() { - // sign up user - const supabase = this.createSupaClient(process.env.SUPABASE_URL, process.env.SUPABASE_KEY_ANON) - - const fakeUser = { - email: faker.internet.exampleEmail(), - password: faker.internet.password(), - username: faker.internet.userName(), - } - const { - data: { user, session: emptySession }, - error: signUpError, - } = await this.signUp(supabase, fakeUser) - - expect(signUpError).toBeNull() - expect(user).toBeDefined() - expect(user.email).toEqual(fakeUser.email.toLowerCase()) - expect(emptySession).not.toBeNull() - - const { - data: { session }, - error: signInError, - } = await supabase.auth.signInWithPassword({ - email: fakeUser.email, - password: fakeUser.password, - }) - expect(signInError).toBeNull() - expect(session).toBeDefined() - await supabase.auth.setSession(session) - - // check if user is signed in - const { - data: [profile], - error: errorInsert, - } = await this.insertProfile(supabase, user, fakeUser) - expect(errorInsert).toBeNull() - expect(profile.username).toMatch(fakeUser.username) - - const { data: profileGot } = await this.getUserProfile(supabase) - expect(profileGot.username).toMatch(profile.username) - - // check if user is able to sign out - const { error } = await this.signOut(supabase) - expect(error).toBeNull() - } - - @feature(FEATURE.AUTHENTICATION) - @severity(Severity.BLOCKER) - @description('When user sign up with phone then he should be logged in') - @test - async 'create new users by phone auth'() { - // sign up user - const supabase = this.createSupaClient(process.env.SUPABASE_URL, process.env.SUPABASE_KEY_ANON) - - const fakeUser = { - password: faker.internet.password(), - username: faker.internet.userName(), - phone: faker.phone.phoneNumber('!#!##!######'), - } - const { - data: { user, session }, - error: signUpError, - } = await this.signUpByPhone(supabase, fakeUser) - - expect(signUpError).toBeNull() - expect(user).toBeDefined() - expect(user.phone).toEqual(fakeUser.phone) - expect(session).toBeDefined() - - // check if user is signed in - const { - data: [profile], - error: errorInsert, - } = await this.insertProfile(supabase, user, fakeUser) - expect(errorInsert).toBeNull() - expect(profile.username).toMatch(fakeUser.username) - - const { data: profileGot } = await this.getUserProfile(supabase) - expect(profileGot.username).toMatch(profile.username) - - // check if user is able to sign out - const { error } = await this.signOut(supabase) - expect(error).toBeNull() - } - - @feature(FEATURE.AUTHENTICATION) - @severity(Severity.BLOCKER) - @description('When user is already signed up then he should be able to log in') - @test - async 'existing users should be able to login'() { - // create user - const fakeUser = await this.createUser() - - // sign in as user - const supabase = this.createSupaClient(process.env.SUPABASE_URL, process.env.SUPABASE_KEY_ANON) - const { - data: { session, user }, - error: signInError, - } = await supabase.auth.signInWithPassword({ - email: fakeUser.email, - password: fakeUser.password, - }) - - expect(signInError).toBeNull() - expect(session).toBeDefined() - expect(user).toBeDefined() - expect(user.email).toEqual(fakeUser.email.toLowerCase()) - - // check if user is signed in correctly and rls is working - const { - data: [profileInserted], - error: errorInsert, - } = await this.insertProfile(supabase, user, fakeUser) - expect(errorInsert).toBeNull() - expect(profileInserted.username).toMatch(fakeUser.username) - - const { data: profileGot } = await this.getUserProfile(supabase) - expect(profileGot.username).toMatch(profileInserted.username) - - // check if user is able to sign out - const { error } = await this.signOut(supabase) - expect(error).toBeNull() - } - - @feature(FEATURE.AUTHENTICATION) - @severity(Severity.NORMAL) - @description('When user is signed in then he should be able to get his info and metadata') - @test - async 'get user should return logged in user'() { - // create user - const username = faker.internet.userName() - const date = faker.date.recent().toUTCString() - const fakeUser = await this.createUser({ - username: username, - date: date, - }) - - // sign in as user - const supabase = this.createSupaClient(process.env.SUPABASE_URL, process.env.SUPABASE_KEY_ANON) - await supabase.auth.signInWithPassword({ - email: fakeUser.email, - password: fakeUser.password, - }) - - // get signed in user data - const { - data: { user }, - error: getUserErr, - } = await this.getUser(supabase) - - log('Check if user is signed in correctly and can get his data') - expect(getUserErr).toBeNull() - expect(user).not.toBeNull() - expect(user.email).toEqual(fakeUser.email.toLowerCase()) - expect(user.role).toEqual('authenticated') - expect(user.aud).toEqual('authenticated') - // verify if metadata is correctly set after sing up - expect(user.user_metadata).toEqual({ - username: username, - date: date, - }) - } - - @feature(FEATURE.AUTHENTICATION) - @severity(Severity.NORMAL) - @description('When user is signed in then he should be able update himself in auth schema') - @test.skip - async 'update user should update logged in user'() { - // create user - const fakeUser = await this.createUser() - - // sign in as user - const supabase = this.createSupaClient(process.env.SUPABASE_URL, process.env.SUPABASE_KEY_ANON) - await supabase.auth.signInWithPassword({ - email: fakeUser.email, - password: fakeUser.password, - }) - - // get signed in user data - const user = await this.getUser(supabase) - - // update user - const updParams = { - email: faker.internet.email(), - password: faker.internet.password(), - phone: faker.phone.phoneNumber('!#!##!######'), - } - const { - data: { user: updUser }, - error: updUserError, - } = await this.updateUser(supabase, updParams) - expect(updUserError).toBeNull() - expect(updUser).not.toBeNull() - expect(updUser.email).toEqual(updParams.email.toLowerCase()) - expect(updUser.phone).toEqual(updParams.phone) - - // get user and check it was updated - const updatedUser = await this.getUser(supabase) - expect(updatedUser.data.user.email).toEqual(updParams.email.toLowerCase()) - expect(updatedUser.data.user.phone).toEqual(updParams.phone) - - // sign in with new credentials - await supabase.auth.signOut() - const signIn = await supabase.auth.signInWithPassword({ - email: updParams.email, - password: updParams.password, - }) - expect(signIn.error).toBeNull() - } - - @feature(FEATURE.AUTHENTICATION) - @severity(Severity.NORMAL) - @description('When user changes session then he still should be correctly logined') - @test - async 'set session should set new auth'() { - // create user - const fakeUser = await this.createUser() - - // sign in as user - const sb = this.createSupaClient(process.env.SUPABASE_URL, process.env.SUPABASE_KEY_ANON) - const { - data: { session }, - } = await sb.auth.signInWithPassword({ - email: fakeUser.email, - password: fakeUser.password, - }) - - const supabase = this.createSupaClient(process.env.SUPABASE_URL, process.env.SUPABASE_KEY_ANON) - const { error: sessionErr } = await supabase.auth.setSession(session) - expect(sessionErr).toBeNull() - - // check if user is signed in correctly and rls is working - const { data: profileInserted, error: errorInsert } = await this.insertProfile( - supabase, - fakeUser, - fakeUser - ) - expect(errorInsert).toBeNull() - expect(profileInserted).toHaveLength(1) - expect(profileInserted[0].username).toMatch(fakeUser.username) - } - - @feature(FEATURE.AUTHENTICATION) - @severity(Severity.NORMAL) - @description('When user subscribes on auth changes then user has to receive auth updates') - @test - async 'on auth state changed should return events'() { - // create user - const fakeUser = await this.createUser() - const events: { event: AuthChangeEvent; token: string }[] = [] - const onAuthStateChanged = (event: AuthChangeEvent, session: Session) => { - log('onAuthStateChanged triggered', event) - events.push({ event, token: session?.access_token }) - } - - // create client and subscribe on auth state changes - const supabase = this.createSupaClient(process.env.SUPABASE_URL, process.env.SUPABASE_KEY_ANON) - const { - data: { subscription }, - } = supabase.auth.onAuthStateChange(onAuthStateChanged) - - // sign in as user - await supabase.auth.signInWithPassword({ - email: fakeUser.email, - password: fakeUser.password, - }) - - // update user - const updParams = { - email: faker.internet.email(), - password: faker.internet.password(), - phone: faker.phone.phoneNumber('!#!##!######'), - } - const { error: updUserError } = await this.updateUser(supabase, updParams) - expect(updUserError).toBeNull() - - // remove subscription and sign out - subscription.unsubscribe() - await supabase.auth.signOut() - - // check if sign in and update events were triggered and sign out event was not triggered - expect(events).toHaveLength(2) - expect(events.map((e) => e.event)).toEqual( - expect.arrayContaining(['SIGNED_IN', 'USER_UPDATED']) - ) - expect(events.map((e) => e.event)).not.toContain('SIGNED_OUT') - } -} diff --git a/tests/features/javascript/functions.spec.ts b/tests/features/javascript/functions.spec.ts deleted file mode 100644 index 0aa8fc33e4..0000000000 --- a/tests/features/javascript/functions.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import { params, suite, test } from '@testdeck/jest' -import { faker } from '@faker-js/faker' -import { Severity } from 'allure-js-commons' -import { exec, ExecException } from 'child_process' -import os from 'os' - -import { Session, SupabaseClient, User, UserAttributes } from '@supabase/supabase-js' - -import { FEATURE } from '../templates/enums' -import { description, feature, log, severity, step } from '../../.jest/jest-custom-reporter' -import { Hooks } from './hooks' -import path from 'path' - -@suite('functions') -class Functions extends Hooks { - @feature(FEATURE.STORAGE) - @severity(Severity.NORMAL) - @description('When you get functions client then you are able to set auth') - @test.skip - async 'set auth'() { - // execute cli command - const deno = path.join(os.homedir(), '.supabase', 'deno') - const funcPath = path.join(process.cwd(), 'data', 'func.ts') - let prom = new Promise<{ error: ExecException; stdout: string; stderr: string }>((resolve) => { - exec(`${deno} bundle --no-check=remote --quiet ${funcPath}`, (error, stdout, stderr) => - resolve({ error, stdout, stderr }) - ) - }) - const { supabase } = await this.createSignedInSupaClient() - const sb = this.createSupaClient(process.env.SUPABASE_URL, process.env.SUPABASE_ANON_KEY) - const { - data: { session }, - } = await supabase.auth.getSession() - - sb.functions.setAuth(session.access_token) - const { error, stdout, stderr } = await prom - expect([null, undefined]).toContain(error) - expect([null, undefined]).toContain(stderr) - expect(stdout).toBeDefined() - sb.functions.invoke('get_user') - } -} diff --git a/tests/features/javascript/hooks.ts b/tests/features/javascript/hooks.ts deleted file mode 100644 index 25993a4ee6..0000000000 --- a/tests/features/javascript/hooks.ts +++ /dev/null @@ -1,211 +0,0 @@ -import postgres from 'postgres' -import crossFetch from 'cross-fetch' -import { faker } from '@faker-js/faker' -import { - AuthResponse, - createClient, - SupabaseClient, - SupabaseClientOptions, - User, - UserAttributes, - UserResponse, -} from '@supabase/supabase-js' - -import { JasmineAllureReporter, step } from '../../.jest/jest-custom-reporter' - -export abstract class Hooks { - static sql = postgres({ - host: process.env.SUPABASE_DB_HOST, - port: parseInt(process.env.SUPABASE_DB_PORT), - database: 'postgres', - username: 'postgres', - password: process.env.SUPABASE_DB_PASS, - }) - - @step('terminate sql connection') - static async after(): Promise { - try { - Hooks.sql.end({ timeout: 100 }) - return Promise.resolve(null) - } catch (err) { - return Promise.reject(err) - } - } - - @step('Create Supabase client') - createSupaClient( - url: string, - key: string, - options: SupabaseClientOptions<'public'> = {} - ): SupabaseClient { - options.auth = options.auth || {} - options.auth.persistSession = false - - return createClient(url, key, options) - } - - @step('Create a valid user') - async createUser(data: object = {}): Promise<{ - email: string - password: string - username: string - id: string - }> { - const supabase = this.createSupaClient(process.env.SUPABASE_URL, process.env.SUPABASE_KEY_ANON) - - const fakeUser = { - email: faker.internet.exampleEmail(), - password: faker.internet.password(), - username: faker.internet.userName(), - id: '', - } - const { - error: signUpError, - data: { user }, - } = await this.signUp(supabase, fakeUser, { - data: data, - }) - expect(signUpError).toBeNull() - expect(user).not.toBeNull() - fakeUser.id = user.id - - return fakeUser - } - - // todo: rework this - @step((token: string) => `verify with token ${token}`) - async verify(token: string, email: string): Promise { - return crossFetch(`${process.env.SUPABASE_GOTRUE}/verify`, { - method: 'POST', - body: JSON.stringify({ - type: 'signup', - token: token, - email: email, - }), - }) - } - - @step((user: User) => `get confirmation token for user ${user.id}`) - async getConfirmationToken(user: User): Promise<[{ confirmation_token: any }]> { - return Hooks.sql` - select confirmation_token - from auth.users - where id = ${user.id} - ` - } - - @step('I sign up with a valid email and password') - async signUp( - supabase: SupabaseClient, - { - email = faker.internet.exampleEmail(), - password = faker.internet.password(), - }: { - email?: string - password?: string - } = {}, - options: { - redirectTo?: string - data?: object - captchaToken?: string - } = {} - ): Promise { - return supabase.auth.signUp({ - email: email, - password: password, - options: options, - }) - } - - @step('Check if I am being able to log out') - async signOut(supabase: SupabaseClient): Promise<{ error: any }> { - return supabase.auth.signOut() - } - - @step('Get user data, if there is a logged in user') - getUser(supabase: SupabaseClient) { - return supabase.auth.getUser() - } - - @step((user: User) => `Get user by ID (${user.id}) from Supabase auth schema`) - async selectUser(user: User): Promise<[{ email: string }]> { - return Hooks.sql` - select - email - from auth.users - where - id = ${user.id} - ` - } - - @step('I sign up with a valid email and password') - async signUpByPhone( - supabase: SupabaseClient, - { - phone = faker.phone.phoneNumber(), - password = faker.internet.password(), - }: { - phone?: string - password?: string - } = {}, - options: { - redirectTo?: string - data?: object - } = {} - ): Promise { - return supabase.auth.signUp({ - phone: phone, - password: password, - options: options, - }) - } - - @step('User inserts profile') - async insertProfile( - supabase: SupabaseClient, - user: { - id: string - }, - fakeUser: { - username: string - } - ): Promise<{ data: any; error: any }> { - return await supabase - .from('profiles') - .insert({ - id: user.id, - username: fakeUser.username, - }) - .select() - } - - @step('I can get my profile via postgREST') - async getUserProfile(supabase: SupabaseClient): Promise<{ data: any; error: any }> { - return supabase.from('profiles').select().maybeSingle() - } - - @step('Update user info') - async updateUser(supabase: SupabaseClient, attr: UserAttributes): Promise { - return supabase.auth.updateUser(attr) - } - - @step('Create signed in supabase client') - async createSignedInSupaClient() { - // create user - const fakeUser = await this.createUser() - - // sign in as user - const supabase = this.createSupaClient(process.env.SUPABASE_URL, process.env.SUPABASE_KEY_ANON) - const { - data: { user }, - error: signInError, - } = await supabase.auth.signInWithPassword({ - email: fakeUser.email, - password: fakeUser.password, - }) - expect(signInError).toBeNull() - fakeUser.id = user.id - - return { supabase, user: fakeUser } - } -} diff --git a/tests/features/javascript/postgrest.spec.ts b/tests/features/javascript/postgrest.spec.ts deleted file mode 100644 index d0602ce19c..0000000000 --- a/tests/features/javascript/postgrest.spec.ts +++ /dev/null @@ -1,86 +0,0 @@ -import { suite, test, timeout } from '@testdeck/jest' -import { faker } from '@faker-js/faker' -import { Severity } from 'allure-js-commons' - -import { FEATURE } from '../templates/enums' -import { description, feature, log, severity, step } from '../../.jest/jest-custom-reporter' -import { Hooks } from './hooks' - -@suite('postgrest') -class PostgREST extends Hooks { - @feature(FEATURE.POSTGREST) - @severity(Severity.BLOCKER) - @description('User can insert profile for himself according to RLS to profiles table') - @test - async 'insert row'() { - const { supabase, user } = await this.createSignedInSupaClient() - - // check if user can insert profile for himself - const { - data: [profileInserted], - error: errorInsert, - } = await this.insertProfile(supabase, user, user) - expect(errorInsert).toBeNull() - expect(profileInserted.username).toMatch(user.username) - } - - @feature(FEATURE.POSTGREST) - @severity(Severity.BLOCKER) - @description('User can select his profile from profiles table') - @test - async 'select row'() { - const { supabase, user } = await this.createSignedInSupaClient() - - // insert profile for user - await this.insertProfile(supabase, user, user) - - const { data: profileGot, error } = await this.getUserProfile(supabase) - expect(error).toBeNull() - expect(profileGot.username).toMatch(user.username) - } - - @feature(FEATURE.POSTGREST) - @severity(Severity.BLOCKER) - @description('User can update his profile in profiles table') - @test - async 'update row'() { - const { supabase, user } = await this.createSignedInSupaClient() - - // insert profile for user - await this.insertProfile(supabase, user, user) - - const newName = faker.internet.userName() - // update profile for user - const { data: updUser, error } = await supabase - .from('profiles') - .update({ - id: user.id, - username: newName, - }) - .select() - expect(error).toBeNull() - expect(updUser.length).toEqual(1) - expect(updUser[0].username).toMatch(newName) - - const { data: profileGot } = await this.getUserProfile(supabase) - expect(profileGot.username).toMatch(newName) - } - - @feature(FEATURE.POSTGREST) - @severity(Severity.BLOCKER) - @description('User can delete his profile in profiles table') - @test - async 'delete row'() { - const { supabase, user } = await this.createSignedInSupaClient() - - // insert profile for user - await this.insertProfile(supabase, user, user) - - // delete profile for user - const { error } = await supabase.from('profiles').delete().eq('id', user.id).select() - expect(error).toBeNull() - - const { data: profileGot } = await this.getUserProfile(supabase) - expect(profileGot).toBeNull() - } -} diff --git a/tests/features/javascript/realtime.spec.ts b/tests/features/javascript/realtime.spec.ts deleted file mode 100644 index 59ba68289b..0000000000 --- a/tests/features/javascript/realtime.spec.ts +++ /dev/null @@ -1,316 +0,0 @@ -import { params, suite, test, timeout } from '@testdeck/jest' -import { faker } from '@faker-js/faker' -import { Severity } from 'allure-js-commons' - -import { RealtimeChannel } from '@supabase/supabase-js' - -import { FEATURE } from '../templates/enums' -import { description, feature, log, severity, step } from '../../.jest/jest-custom-reporter' -import { Hooks } from './hooks' - -@suite('realtime') -@timeout(30000) -class Realtime extends Hooks { - @feature(FEATURE.REALTIME) - @severity(Severity.BLOCKER) - @description('When you call "on" table then connected realtime client should be returned') - @test - async '[skip-stage] connect to realtime'() { - const { supabase } = await this.createSignedInSupaClient() - - const channel = supabase - .channel('profiles') - .on('postgres_changes', { event: '*', schema: 'public' }, (payload: any) => - console.log(payload) - ) - channel.subscribe() - - expect(channel).toBeDefined() - const err = await this.waitForChannelJoined(channel) - await new Promise((resolve) => setTimeout(resolve, 1000)) - expect(err).toBeNull() - const ok = await supabase.removeChannel(channel) - expect(ok).toBe('ok') - } - - @feature(FEATURE.REALTIME) - @severity(Severity.BLOCKER) - @description('When you subscrive to realtime, you have to receive updates') - @timeout(60000) - @test - async '[skip-stage] receive event when connected to realtime'() { - let res: any - let t: NodeJS.Timeout - const { supabase, user } = await this.createSignedInSupaClient() - - let payloadReceived = (payload: any) => { - if (payload?.eventType !== 'INSERT') { - return - } - clearTimeout(t) - expect(payload.schema).toBe('public') - expect(payload.table).toBe('profiles') - expect(payload.new.id).toBe(user.id) - expect(payload.new.username).toBe(user.username) - expect(payload.old).toEqual({}) - expect(payload.error).toBeUndefined() - res(null) - } - - const channel = supabase - .channel('profiles') - .on('postgres_changes', { event: '*', schema: 'public' }, payloadReceived) - channel.subscribe() - - expect(channel).toBeDefined() - await this.waitForChannelJoined(channel) - // we should wait some time seconds to connect to database changes - await new Promise((resolve) => setTimeout(resolve, 10000)) - - const eventPromise = new Promise((resolve) => { - res = resolve - new Promise(() => { - t = setTimeout(() => resolve(new Error('timeout')), 30000) - }) - }) - await this.insertProfile(supabase, user, user) - expect(await eventPromise).toBeNull() - - const ok = await supabase.removeChannel(channel) - expect(ok).toBe('ok') - } - - @feature(FEATURE.REALTIME) - @severity(Severity.NORMAL) - @description('When you call "on" table but not subscribe then no events have to be returned') - @test - async 'you should get no events until subscribe'() { - const { supabase, user } = await this.createSignedInSupaClient() - - const channel = supabase - .channel('profiles') - .on('postgres_changes', { event: '*', schema: 'public' }, (payload: any) => { - console.log(payload) - expect('event received').toBe('should not receive event') - }) - - expect(channel).toBeDefined() - await this.insertProfile(supabase, user, user) - - // wait for 1 second to see if we receive any events - await new Promise((resolve) => setTimeout(resolve, 1000)) - expect(channel._isClosed).toBeTruthy() - const ok = await supabase.removeChannel(channel) - expect(ok).toBe('ok') - } - - @feature(FEATURE.REALTIME) - @severity(Severity.BLOCKER) - @description( - 'When you create 2 subs (1 subscribed and 1 not yet) then both should be returned on get subs' - ) - @test - async 'get supabase client subscriptions'() { - const { supabase } = await this.createSignedInSupaClient() - - const channel1 = supabase - .channel('profiles') - .on('postgres_changes', { event: '*', schema: 'public' }, (payload: any) => { - console.log(payload) - expect('event received').toBe('should not receive event') - }) - const channel2 = supabase - .channel('profiles') - .on('postgres_changes', { event: '*', schema: 'public' }, (payload: any) => { - console.log(payload) - expect('event received').toBe('should not receive event') - }) - - const channels = supabase.getChannels() - expect(channels).toEqual(expect.arrayContaining([channel1, channel2])) - supabase.removeAllChannels() - expect(supabase.getChannels().length).toEqual(0) - } - - @feature(FEATURE.REALTIME) - @severity(Severity.NORMAL) - @description('When you subscribe on table then corresponding events have to be returned') - @params.skip({ event: 'INSERT', returnedTypes: ['insert'] }) - @params.skip({ event: 'UPDATE', returnedTypes: ['update'] }) - @params.skip({ event: 'DELETE', returnedTypes: ['delete'] }) - @params.skip({ event: '*', returnedTypes: ['insert', 'update', 'delete'] }) - async 'subscribe on table'() { - // todo - } - - @feature(FEATURE.REALTIME) - @severity(Severity.NORMAL) - @description( - 'When you create multiple subscriptions then corresponding events have to be returned' - ) - @params.skip({ - events: [ - { event: 'INSERT', table: 'rt_table1' }, - { event: '*', table: 'rt_table1' }, - ], - returnedIds: [[], []], - }) - @params.skip({ - events: [ - { event: 'UPDATE', table: 'rt_table1' }, - { event: 'DELETE', table: 'rt_table1' }, - ], - returnedIds: [[], []], - }) - @params.skip({ - events: [ - { event: 'INSERT', table: 'rt_table1' }, - { event: 'INSERT', table: 'rt_table2' }, - ], - returnedIds: [[], []], - }) - async 'multiple subscriptions'() { - // todo - } - - @feature(FEATURE.REALTIME) - @severity(Severity.NORMAL) - @description('When you subscribe on table with RLS then corresponding events have to be returned') - @params.skip({ event: 'INSERT', returnedTypes: ['insert'] }) - @params.skip({ event: 'UPDATE', returnedTypes: ['update'] }) - @params.skip({ event: 'DELETE', returnedTypes: ['delete'] }) - @params.skip({ event: '*', returnedTypes: ['insert', 'update', 'delete'] }) - async 'subscribe on table with RLS'() { - // todo - } - - @feature(FEATURE.REALTIME) - @severity(Severity.CRITICAL) - @description('When you subscribe on table with RLS then only allowed events have to be returned') - @params.skip({ event: 'INSERT', returnedIds: [] }) - @params.skip({ event: 'UPDATE', returnedIds: [] }) - @params.skip({ event: 'DELETE', returnedIds: [] }) - @params.skip({ event: '*', returnedIds: [] }) - async 'subscribe on table with RLS policies'() { - // todo - } - - @feature(FEATURE.REALTIME) - @severity(Severity.CRITICAL) - @description( - 'When you subscribe on table with 2 clients then they have to receive different events' - ) - @test.skip - async 'subscribe from 2 clients'() { - // todo - } - - @feature(FEATURE.REALTIME) - @severity(Severity.NORMAL) - @description( - 'When you subscribe on table with RLS policies then service key subscription has to bypass RLS' - ) - @params.skip({ event: 'INSERT', returnedTypes: ['insert'] }) - @params.skip({ event: 'UPDATE', returnedTypes: ['update'] }) - @params.skip({ event: 'DELETE', returnedTypes: ['delete'] }) - @params.skip({ event: '*', returnedTypes: ['insert', 'update', 'delete'] }) - async 'subscribe on RLS table with service key'() { - // todo - } - - @feature(FEATURE.REALTIME) - @severity(Severity.CRITICAL) - @description('When you unsubscribe from table then no events have to be returned') - @test - async '[skip-stage] unsubscribe from table'() { - const { supabase, user } = await this.createSignedInSupaClient() - - const channel = supabase - .channel('profiles') - .on('postgres_changes', { event: '*', schema: 'public' }, (payload: any) => { - console.log(payload) - expect('event received').toBe('should not receive event') - }) - channel.subscribe() - // wait for subscription to postgres - await new Promise((resolve) => setTimeout(resolve, 8000)) - const ok = await channel.unsubscribe() - expect(ok).toEqual('ok') - - await this.insertProfile(supabase, user, user) - - // wait for 1 second to see if we receive any events - await new Promise((resolve) => setTimeout(resolve, 1000)) - expect(channel._isClosed).toBeTruthy() - await supabase.removeChannel(channel) - } - - @feature(FEATURE.REALTIME) - @severity(Severity.CRITICAL) - @description('When you remove one subscription then only events from another have to be returned') - @test - async '[skip-stage] remove one subscription from client'() { - const { supabase, user } = await this.createSignedInSupaClient() - - const channel = supabase - .channel('profiles') - .on('postgres_changes', { event: '*', schema: 'public' }, (payload: any) => { - console.log(payload) - expect('event received').toBe('should not receive event') - }) - channel.subscribe() - // wait for subscription to postgres - await new Promise((resolve) => setTimeout(resolve, 8000)) - const ok = await supabase.removeChannel(channel) - expect(ok).toEqual('ok') - - await this.insertProfile(supabase, user, user) - - // wait for 1 second to see if we receive any events - await new Promise((resolve) => setTimeout(resolve, 1000)) - expect(channel._isClosed).toBeTruthy() - } - - @feature(FEATURE.REALTIME) - @severity(Severity.CRITICAL) - @description('When you remove all subscription then no events have to be returned') - @test - async '[skip-stage] remove all subscriptions from client'() { - const { supabase, user } = await this.createSignedInSupaClient() - - const channel = supabase - .channel('profiles') - .on('postgres_changes', { event: '*', schema: 'public' }, (payload: any) => { - console.log(payload) - expect('event received').toBe('should not receive event') - }) - channel.subscribe() - // wait for subscription to postgres - await new Promise((resolve) => setTimeout(resolve, 8000)) - const ok = await supabase.removeAllChannels() - expect(ok).toEqual(expect.arrayContaining(['ok'])) - - await this.insertProfile(supabase, user, user) - - // wait for 1 second to see if we receive any events - await new Promise((resolve) => setTimeout(resolve, 1000)) - expect(channel._isClosed).toBeTruthy() - } - - @step('Wait until channel is joined') - async waitForChannelJoined(channel: RealtimeChannel): Promise { - for (let i = 0; i < 30; i++) { - if (channel._isJoined()) { - return null - } - if (channel._isLeaving()) { - return new Error('Channel is leaving') - } - if (channel._isClosed()) { - return new Error('Channel is closed') - } - await new Promise((resolve) => setTimeout(resolve, 100)) - } - return new Error("Channel didn't join in 3 seconds") - } -} diff --git a/tests/features/javascript/rpc.spec.ts b/tests/features/javascript/rpc.spec.ts deleted file mode 100644 index 71883f2dd5..0000000000 --- a/tests/features/javascript/rpc.spec.ts +++ /dev/null @@ -1,134 +0,0 @@ -import { suite, test, timeout } from '@testdeck/jest' -import { Severity } from 'allure-js-commons' - -import { SupabaseClient } from '@supabase/supabase-js' - -import { FEATURE } from '../templates/enums' -import { description, feature, severity, step } from '../../.jest/jest-custom-reporter' -import { Hooks } from './hooks' -import { PendingQuery, Row } from 'postgres' - -@suite('rpc') -@timeout(30000) -class Procedures extends Hooks { - @feature(FEATURE.RPC) - @severity(Severity.BLOCKER) - @description('When you call rpc then you are able to receive its result') - @test - async 'call rpc and get result'() { - await this.createFunction(Procedures.sql` - CREATE OR REPLACE FUNCTION public.test_procedure() RETURNS int language plpgsql as $$ - declare - profile_count integer; - begin - select count(*) - into profile_count - from profiles; - - return profile_count; - end; - $$;`) - - const { supabase, user } = await this.createSignedInSupaClient() - await this.insertProfile(supabase, user, user) - - const result = await this.callRpc(supabase, 'test_procedure') - expect(result.error).toBeNull() - expect(result.data).toBeDefined() - expect(result.data).toBeGreaterThanOrEqual(1) - - await this.dropFunction(Procedures.sql`test_procedure()`) - } - - @feature(FEATURE.RPC) - @severity(Severity.BLOCKER) - @description('When you call rpc, params should be passed properly') - @test - async 'call rpc method that has params'() { - await this.createFunction(Procedures.sql` - CREATE OR REPLACE FUNCTION public.test_procedure(filter text) - RETURNS int language plpgsql as $$ - declare - profile_count integer; - begin - select count(*) - into profile_count - from profiles - where username LIKE '%' || filter || '%'; - - return profile_count; - end; - $$;`) - - const { supabase, user } = await this.createSignedInSupaClient() - await this.insertProfile(supabase, user, user) - - const result = await this.callRpc(supabase, 'test_procedure', { filter: user.username }) - expect(result.error).toBeNull() - expect(result.data).toBeDefined() - expect(result.data).toBeGreaterThanOrEqual(1) - - await this.dropFunction(Procedures.sql`test_procedure(filter text)`) - } - - @feature(FEATURE.RPC) - @severity(Severity.NORMAL) - @description('When you call rpc with head param, no data should be returned') - @test - async 'call rpc with head option'() { - await this.createFunction(Procedures.sql` - CREATE OR REPLACE FUNCTION public.test_procedure() RETURNS int language plpgsql as $$ - declare - profile_count integer; - begin - select count(*) - into profile_count - from profiles; - - return profile_count; - end; - $$;`) - - const { supabase, user } = await this.createSignedInSupaClient() - await this.insertProfile(supabase, user, user) - - const result = await this.callRpc(supabase, 'test_procedure', {}, { head: true }) - expect(result.error).toBeNull() - expect(result.data).toBeNull() - - await this.dropFunction(Procedures.sql`test_procedure()`) - } - - @step('create function') - private async createFunction(body: PendingQuery) { - await Procedures.sql`${body}` - await Procedures.sql`NOTIFY pgrst, 'reload schema';` - } - - @step('drop function') - private async dropFunction(signature: PendingQuery) { - await Procedures.sql`DROP FUNCTION public.${signature};` - } - - @step('call supabase rpc') - private async callRpc( - supabase: SupabaseClient, - name: string, - args?: any, - options?: { - head?: boolean - count?: 'exact' | 'planned' | 'estimated' - } - ) { - let result = await supabase.rpc(name, args, options) - for (let i = 1; i <= 5; i++) { - if (result.error) { - await new Promise((resolve) => setTimeout(resolve, 0.5 * 1000 * i)) - result = await supabase.rpc(name, args, options) - } else { - break - } - } - return result - } -} diff --git a/tests/features/javascript/storage.spec.ts b/tests/features/javascript/storage.spec.ts deleted file mode 100644 index 455b1d51c7..0000000000 --- a/tests/features/javascript/storage.spec.ts +++ /dev/null @@ -1,424 +0,0 @@ -import { params, suite, test } from '@testdeck/jest' -import { faker } from '@faker-js/faker' -import { Severity } from 'allure-js-commons' - -import { createClient, Session, SupabaseClient, User, UserAttributes } from '@supabase/supabase-js' -import { Bucket } from '@supabase/storage-js' - -import { FEATURE } from '../templates/enums' -import { description, feature, log, severity, step } from '../../.jest/jest-custom-reporter' -import { Hooks } from './hooks' -import fetch from 'cross-fetch' - -@suite('storage') -class Storage extends Hooks { - static buckets: Pick[] = [] as any - static async after() { - const supabase = createClient(process.env.SUPABASE_URL, process.env.SUPABASE_KEY_ADMIN) - const requests = [] - for (const bucket of this.buckets) { - requests.push( - new Promise((resolve) => - (async () => { - await supabase.storage.emptyBucket(bucket.name) - await supabase.storage.deleteBucket(bucket.name) - resolve(null) - })() - ) - ) - } - await Promise.all(requests) - await Hooks.after() - } - - @feature(FEATURE.STORAGE) - @severity(Severity.BLOCKER) - @description('When you create public bucket then it has to be available') - @params({ public: true }) - @params({ public: false }) - async 'create bucket'(params: { public: boolean }) { - const supabase = createClient(process.env.SUPABASE_URL, process.env.SUPABASE_KEY_ADMIN) - const bucketName = faker.unique(faker.random.word) - const { data: bucket, error } = await supabase.storage.createBucket(bucketName, { - public: params.public, - }) - expect(error).toBeNull() - expect(bucket).toBeDefined() - expect(bucket.name).toBe(bucketName) - Storage.buckets.push(bucket) - - const { data: gotBucket, error: error2 } = await supabase.storage.getBucket(bucketName) - expect(error2).toBeNull() - expect(gotBucket).toBeDefined() - expect(gotBucket.name).toBe(bucketName) - expect(gotBucket.public).toBe(params.public) - } - - @feature(FEATURE.STORAGE) - @severity(Severity.BLOCKER) - @description('There has to be default RLS policy to not allow users to create bucket') - @params({ public: true }) - @params({ public: false }) - async 'user cannot create bucket because of RLS'(params: { public: boolean }) { - const { supabase } = await this.createSignedInSupaClient() - const bucketName = faker.unique(faker.random.word) - - const { data: bucket, error } = await supabase.storage.createBucket(bucketName, { - public: params.public, - }) - expect(error).not.toBeNull() - expect(error.message).toContain('row-level security') - expect(error.message).toContain('"buckets"') - } - - @feature(FEATURE.STORAGE) - @severity(Severity.BLOCKER) - @description('list buckets should return all buckets') - @test - async 'list buckets as admin'() { - const supabase = createClient(process.env.SUPABASE_URL, process.env.SUPABASE_KEY_ADMIN) - - const bucket1 = await this.createBucket() - const bucket2 = await this.createBucket() - - const { data: buckets, error } = await supabase.storage.listBuckets() - expect(buckets.length).toBeGreaterThanOrEqual(2) - expect(buckets.map((b) => b.name)).toEqual(expect.arrayContaining([bucket1.name, bucket2.name])) - } - - @feature(FEATURE.STORAGE) - @severity(Severity.BLOCKER) - @description('get bucket should return bucket info') - @test - async 'get bucket'() { - const supabase = createClient(process.env.SUPABASE_URL, process.env.SUPABASE_KEY_ADMIN) - const bucket = await this.createBucket() - - const { data: gotBucket, error } = await supabase.storage.getBucket(bucket.id) - expect(error).toBeNull() - expect(gotBucket).toEqual(bucket) - } - - @feature(FEATURE.STORAGE) - @severity(Severity.BLOCKER) - @description('update bucket should change bucket both public->private and back') - @params({ public: true }) - @params({ public: false }) - async 'update bucket'(params: { public: boolean }) { - const supabase = createClient(process.env.SUPABASE_URL, process.env.SUPABASE_KEY_ADMIN) - const bucket = await this.createBucket(params.public) - - const { - data: { message }, - error, - } = await supabase.storage.updateBucket(bucket.id, { - public: !params.public, - }) - expect(error).toBeNull() - expect(message).toBe('Successfully updated') - - bucket.public = !params.public - const { data: gotBucket } = await supabase.storage.getBucket(bucket.id) - expect(gotBucket).toEqual(bucket) - } - - @feature(FEATURE.STORAGE) - @severity(Severity.BLOCKER) - @description('get bucket should return bucket info') - @test - async 'delete bucket'() { - const supabase = createClient(process.env.SUPABASE_URL, process.env.SUPABASE_KEY_ADMIN) - const bucket = await this.createBucket() - - const { - data: { message }, - error, - } = await supabase.storage.deleteBucket(bucket.id) - expect(error).toBeNull() - expect(message).toBe('Successfully deleted') - - const { data: buckets } = await supabase.storage.listBuckets() - expect( - buckets.map((b) => { - return { name: b.name, id: b.id } - }) - ).not.toContain({ name: bucket.name, id: bucket.id }) - - Storage.buckets = Storage.buckets.filter((b) => b.name != bucket.name) - } - - @feature(FEATURE.STORAGE) - @severity(Severity.BLOCKER) - @description('upload to bucket') - @test - async 'upload to bucket'() { - const supabase = createClient(process.env.SUPABASE_URL, process.env.SUPABASE_KEY_ADMIN) - const bucket = await this.createBucket() - - const file = { - path: faker.random.word() + '.txt', - data: faker.lorem.paragraph(), - } - const { - data: { path }, - error, - } = await supabase.storage.from(bucket.name).upload(file.path, file.data) - expect(error).toBeNull() - expect(path).toEqual(file.path) - } - - @feature(FEATURE.STORAGE) - @severity(Severity.BLOCKER) - @description('list files in bucket') - @test - async 'list files'() { - const supabase = createClient(process.env.SUPABASE_URL, process.env.SUPABASE_KEY_ADMIN) - const bucket = await this.createBucket() - - const files: { path: string; data: string }[] = [] - const requests: Promise[] = [] - for (let i = 0; i < 3; i++) { - requests.push( - new Promise((resolve) => { - const dir = faker.random.word() - const file = { - path: dir + '/' + faker.random.word() + '.txt', - data: faker.lorem.sentence(), - } - files.push(file) - const p1 = supabase.storage.from(bucket.name).upload(file.path, file.data) - const file2 = { - path: dir + '/' + faker.random.word() + '.txt', - data: faker.lorem.sentence(), - } - files.push(file2) - const p2 = supabase.storage.from(bucket.name).upload(file2.path, file2.data) - Promise.all([p1, p2]).finally(() => resolve()) - }) - ) - } - await Promise.all(requests) - - const { data: dirs, error: error1 } = await supabase.storage.from(bucket.name).list() - expect(error1).toBeNull() - expect(dirs.map((d) => d.name)).toEqual( - expect.arrayContaining([...new Set(files.map((f) => f.path.split('/')[0]))]) - ) - - const dir = files[0].path.split('/')[0] - const { data: filesInDir, error: error2 } = await supabase.storage.from(bucket.name).list(dir) - expect(error2).toBeNull() - expect(filesInDir.map((d) => d.name)).toEqual( - expect.arrayContaining( - files.filter((f) => f.path.split('/')[0] === dir).map((f) => f.path.split('/')[1]) - ) - ) - } - - @feature(FEATURE.STORAGE) - @severity(Severity.BLOCKER) - @description('download file') - @test - async 'download file from bucket'() { - const supabase = createClient(process.env.SUPABASE_URL, process.env.SUPABASE_KEY_ADMIN) - const bucket = await this.createBucket() - - const file = { - path: faker.random.word() + '/' + faker.random.word() + '.txt', - data: faker.lorem.paragraph(), - } - await supabase.storage.from(bucket.name).upload(file.path, file.data) - - const { data, error } = await supabase.storage.from(bucket.name).download(file.path) - expect(error).toBeNull() - expect(await data.text()).toEqual(file.data) - } - - @feature(FEATURE.STORAGE) - @severity(Severity.BLOCKER) - @description('move file') - @test - async '[skip-local] move file in bucket'() { - const supabase = createClient(process.env.SUPABASE_URL, process.env.SUPABASE_KEY_ADMIN) - const bucket = await this.createBucket() - - const file = { - path: faker.random.word() + '/' + faker.random.word() + '.txt', - newPath: faker.random.word() + '/' + faker.random.word() + '.txt', - data: faker.lorem.paragraph(), - } - await supabase.storage.from(bucket.name).upload(file.path, file.data) - - const { error } = await supabase.storage.from(bucket.name).move(file.path, file.newPath) - expect(error).toBeNull() - const { data: filesRoot } = await supabase.storage.from(bucket.name).list() - expect(filesRoot.map((f) => f.name)).not.toContain(file.path.split('/')[0]) - const { data: files } = await supabase.storage - .from(bucket.name) - .list(file.newPath.split('/')[0]) - expect(files.map((f) => f.name)).toEqual(expect.arrayContaining([file.newPath.split('/')[1]])) - } - - @feature(FEATURE.STORAGE) - @severity(Severity.BLOCKER) - @description('copy file') - @test - async '[skip-local] copy file in bucket'() { - const supabase = createClient(process.env.SUPABASE_URL, process.env.SUPABASE_KEY_ADMIN) - const bucket = await this.createBucket() - - const file = { - path: faker.random.word() + '/' + faker.random.word() + '.txt', - newPath: faker.random.word() + '/' + faker.random.word() + '.txt', - data: faker.lorem.paragraph(), - } - await supabase.storage.from(bucket.name).upload(file.path, file.data) - - const { error } = await supabase.storage.from(bucket.name).copy(file.path, file.newPath) - expect(error).toBeNull() - - const { data: filesRoot } = await supabase.storage.from(bucket.name).list() - expect(filesRoot.map((f) => f.name)).toEqual( - expect.arrayContaining([file.path.split('/')[0], file.newPath.split('/')[0]]) - ) - const { data: filesNew } = await supabase.storage - .from(bucket.name) - .list(file.newPath.split('/')[0]) - expect(filesNew.map((f) => f.name)).toEqual( - expect.arrayContaining([file.newPath.split('/')[1]]) - ) - const { data: files } = await supabase.storage.from(bucket.name).list(file.path.split('/')[0]) - expect(files.map((f) => f.name)).toEqual(expect.arrayContaining([file.path.split('/')[1]])) - } - - @feature(FEATURE.STORAGE) - @severity(Severity.BLOCKER) - @description('get public link to file in the public bucket') - @test - async 'get public link to file'() { - const supabase = createClient(process.env.SUPABASE_URL, process.env.SUPABASE_KEY_ADMIN) - const bucket = await this.createBucket() - - const file = { - path: faker.random.word() + '/' + faker.random.word() + '.txt', - data: faker.lorem.paragraph(), - } - await supabase.storage.from(bucket.name).upload(file.path, file.data) - - const { - data: { publicUrl }, - } = supabase.storage.from(bucket.name).getPublicUrl(file.path) - expect(publicUrl).toBeDefined() - expect(publicUrl.length).toBeGreaterThan(1) - expect(publicUrl).toMatch(new RegExp(`^http[s]?://.*storage.*/${bucket.name}/.*`)) - - const resp = await fetch(publicUrl) - expect(resp.status).toEqual(200) - expect(await resp.text()).toEqual(file.data) - } - - @feature(FEATURE.STORAGE) - @severity(Severity.BLOCKER) - @description('get public link to file in the private bucket') - @test - async 'get public link to private file'() { - const supabase = createClient(process.env.SUPABASE_URL, process.env.SUPABASE_KEY_ADMIN) - const bucket = await this.createBucket(false) - - const file = { - path: faker.random.word() + '/' + faker.random.word() + '.txt', - data: faker.lorem.paragraph(), - } - await supabase.storage.from(bucket.name).upload(file.path, file.data) - - const { - data: { publicUrl }, - } = supabase.storage.from(bucket.name).getPublicUrl(file.path) - expect(publicUrl).toBeDefined() - expect(publicUrl.length).toBeGreaterThan(1) - expect(publicUrl).toMatch(new RegExp(`^http[s]?://.*storage.*/${bucket.name}/.*`)) - - const resp = await fetch(publicUrl) - expect(resp.status).toEqual(400) // todo 400 should be 404 too I guess - const error = await resp.json() - expect(error.statusCode).toBe('404') // todo should be a number? - } - - @feature(FEATURE.STORAGE) - @severity(Severity.BLOCKER) - @description('get signed link to file in the bucket') - @params({ public: true }) - @params({ public: false }) - async 'get signed link to file'(params: { public: boolean }) { - const supabase = createClient(process.env.SUPABASE_URL, process.env.SUPABASE_KEY_ADMIN) - const bucket = await this.createBucket(params.public) - - const file = { - path: faker.random.word() + '/' + faker.random.word() + '.txt', - data: faker.lorem.paragraph(), - } - await supabase.storage.from(bucket.name).upload(file.path, file.data) - - const { - data: { signedUrl }, - error, - } = await supabase.storage.from(bucket.name).createSignedUrl(file.path, 10000) - expect(error).toBeNull() - expect(signedUrl).toBeDefined() - expect(signedUrl.length).toBeGreaterThan(1) - expect(signedUrl).toMatch(new RegExp(`^http[s]?://.*storage.*/${bucket.name}/.*`)) - - const resp = await fetch(signedUrl) - expect(resp.status).toEqual(200) - expect(await resp.text()).toEqual(file.data) - } - - @feature(FEATURE.STORAGE) - @severity(Severity.BLOCKER) - @description('update file check if it will change') - @test - async 'update file'() { - const supabase = createClient(process.env.SUPABASE_URL, process.env.SUPABASE_KEY_ADMIN) - const bucket = await this.createBucket() - - const file = { - path: faker.random.word() + '/' + faker.random.word() + '/' + faker.random.word() + '.txt', - data: faker.lorem.paragraph(), - } - await supabase.storage.from(bucket.name).upload(file.path, file.data) - - const { - data: { publicUrl }, - } = supabase.storage.from(bucket.name).getPublicUrl(file.path) - expect(publicUrl).toBeDefined() - expect(publicUrl.length).toBeGreaterThan(1) - expect(publicUrl).toMatch(new RegExp(`^http[s]?://.*storage.*/${bucket.name}/.*`)) - - const newFile = { - path: file.path, - data: faker.lorem.paragraph(10), - } - await supabase.storage.from(bucket.name).update(newFile.path, newFile.data) - - const resp = await fetch(publicUrl) - expect(resp.status).toEqual(200) - expect(await resp.text()).toEqual(newFile.data) - } - - @step('create bucket') - async createBucket(pub = true) { - const supabase = createClient(process.env.SUPABASE_URL, process.env.SUPABASE_KEY_ADMIN) - const bucketName = faker.unique(faker.random.word) - - const { data: bucket, error } = await supabase.storage.createBucket(bucketName, { - public: pub, - }) - expect(error).toBeNull() - expect(bucket).toBeDefined() - expect(bucket.name).toBe(bucketName) - Storage.buckets.push(bucket) - - const { data: buckets } = await supabase.storage.listBuckets() - return buckets.find((b) => b.name === bucketName) - } -} diff --git a/tests/features/python/authentication.py b/tests/features/python/authentication.py deleted file mode 100644 index ba14ccc614..0000000000 --- a/tests/features/python/authentication.py +++ /dev/null @@ -1,44 +0,0 @@ -import allure - -@allure.severity(allure.severity_level.BLOCKER) -@allure.suite("authentication") -@allure.feature("authentication") -class TestAuthentication(object): - @allure.description("""When user sign up then he should be logged in""") - def test_new_users(self): - self.create_supabase_anonymous_client() - self.sign_up_valid("email", "password") - self.check_logged_in() - self.check_log_out() - - def test_existing_users(self): - """ When user is already signed up then he should be able to logged in """ - self.create_valid_user() - self.sign_in_valid("email", "password") - self.check_logged_in() - self.check_log_out() - - @allure.step("Create Supabase anonymous client") - def create_supabase_anonymous_client(self): - pass - - @allure.step("I sign up with a valid {email} and {password}") - def sign_up_valid(self, email, password="password"): - pass - - @allure.step("Create a valid user") - def create_valid_user(self): - pass - - @allure.step("I sign in with a valid {email} and {password}") - def sign_in_valid(self, email, password="password"): - pass - - @allure.step("Check if I am logged in") - def check_logged_in(self): - pass - - @allure.step("Check if I am being able to log out") - def check_log_out(self): - pass - diff --git a/tests/features/templates/authentication.ts b/tests/features/templates/authentication.ts deleted file mode 100644 index 3a740a23c0..0000000000 --- a/tests/features/templates/authentication.ts +++ /dev/null @@ -1,50 +0,0 @@ -import { Severity } from 'allure-js-commons' - -import { FEATURE } from './enums' - -describe('authentication', () => { - beforeEach(() => { - reporter.feature(FEATURE.AUTHENTICATION) - reporter.severity(Severity.BLOCKER) - }) - - test('New users', () => { - reporter.description('When user sign up then he should be logged in') - - reporter.step('Create Supabase anonymous client', () => { - /* don't modify! */ - }) - - reporter.step('I sign up with a valid email and password', () => { - /* don't modify! */ - }) - - reporter.step('Check if I am logged in', () => { - /* don't modify! */ - }) - - reporter.step('Check if I am being able to log out', () => { - /* don't modify! */ - }) - }) - - test('Existing users', () => { - reporter.description('When user is already signed up then he should be able to logged in') - - reporter.step('Create a valid user', () => { - /* don't modify! */ - }) - - reporter.step('I sign in with a valid email and password', () => { - /* don't modify! */ - }) - - reporter.step('Check if I am logged in', () => { - /* don't modify! */ - }) - - reporter.step('Check if I am being able to log out', () => { - /* don't modify! */ - }) - }) -}) diff --git a/tests/features/templates/enums.ts b/tests/features/templates/enums.ts deleted file mode 100644 index fed746cf37..0000000000 --- a/tests/features/templates/enums.ts +++ /dev/null @@ -1,11 +0,0 @@ -export enum FEATURE { - AUTHENTICATION = 'authentication', - AUTH_ADMIN = 'auth_admin', - REALTIME = 'realtime', - STORAGE = 'storage', - FUNCTIONS = 'functions', - RPC = 'rpc', - POSTGREST = 'postgrest', - FILTERS = 'postgrest_filters', - MODIFIERS = 'postgrest_modifiers', -} diff --git a/tests/jest.config.ts b/tests/jest.config.ts deleted file mode 100644 index 4e05c6122a..0000000000 --- a/tests/jest.config.ts +++ /dev/null @@ -1,24 +0,0 @@ -import type { Config } from '@jest/types' - -const config: Config.InitialOptions = { - preset: 'ts-jest', - transform: { - '^.+\\.ts?$': 'ts-jest', - }, - moduleFileExtensions: ['ts', 'js', 'cjs', 'json', 'node'], - globalSetup: '/.jest/jest-env.ts', - globalTeardown: '/.jest/teardown.ts', - // setupFiles: ['/.jest/jest-env.js'], - setupFilesAfterEnv: ['/.jest/jest-custom-reporter.ts'], - testRunner: 'jest-jasmine2', - testTimeout: 15000, - coverageThreshold: { - global: { - branches: 0, - functions: 0, - lines: 0, - statements: 0, - }, - }, -} -export default config diff --git a/tests/package.json b/tests/package.json deleted file mode 100644 index 354f06f379..0000000000 --- a/tests/package.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "name": "supabase-tests", - "version": "1.0.0", - "description": "These tests can be run with Docker.", - "scripts": { - "preinstall": "npx only-allow pnpm", - "docker:up": "cd ../docker && ENABLE_EMAIL_AUTOCONFIRM=true docker compose --env-file ./.env -f docker-compose.yml -f dev/docker-compose.dev.yml up -d", - "docker:down": "cd ../docker && docker compose --env-file ./.env -f docker-compose.yml -f dev/docker-compose.dev.yml down", - "test": "jest", - "test:local": "jest --testNamePattern '^((?!\\[skip-local\\]).)*$' --testPathPattern '^((?!realtime).)*$' --detectOpenHandles", - "test:stage": "jest --testNamePattern '^((?!\\[skip-stage\\]).)*$' --detectOpenHandles", - "test:prod": "jest --detectOpenHandles", - "allure:generate": "rm -rf allure-report && node_modules/allure-commandline/bin/allure generate", - "allure:serve": "node_modules/allure-commandline/bin/allure serve", - "test:report": "pnpm run allure:generate && pnpm run allure:serve", - "clean": "rimraf node_modules", - "format": "prettier --write \"./**/*.{js,jsx,ts,tsx,css,md}\"" - }, - "author": "Supabase, Inc.", - "license": "MIT", - "devDependencies": { - "@faker-js/faker": "^6.1.2", - "@supabase/supabase-js": "^2.44.3", - "@testdeck/jest": "^0.3.3", - "@types/jest": "^29.5.4", - "@types/node": "^20.0.0", - "@typescript-eslint/eslint-plugin": "^6.19.1", - "@typescript-eslint/parser": "^6.19.1", - "allure-commandline": "^2.17.2", - "allure-js-commons": "^2.0.0-beta.14", - "cross-fetch": "^3.1.5", - "jest": "^29.7.0", - "jest-allure2-adapter": "^0.3.12", - "jest-environment-jsdom": "^29.7.0", - "postgres": "^3.0.5", - "ts-jest": "^29.1.1", - "typescript": "~5.5.0" - } -} diff --git a/tests/supabase/.gitignore b/tests/supabase/.gitignore deleted file mode 100644 index 773c7c3e0a..0000000000 --- a/tests/supabase/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -# Supabase -.branches -.temp diff --git a/tests/supabase/config.toml b/tests/supabase/config.toml deleted file mode 100644 index 2d4498ba19..0000000000 --- a/tests/supabase/config.toml +++ /dev/null @@ -1,71 +0,0 @@ -# A string used to distinguish different Supabase projects on the same host. Defaults to the working -# directory name when running `supabase init`. -project_id = "tests" - -[api] -# Port to use for the API URL. -port = 54321 -# Schemas to expose in your API. Tables, views and stored procedures in this schema will get API -# endpoints. public and storage are always included. -schemas = [] -# Extra schemas to add to the search_path of every request. -extra_search_path = ["extensions"] -# The maximum number of rows returns from a view, table, or stored procedure. Limits payload size -# for accidental or malicious requests. -max_rows = 1000 - -[db] -# Port to use for the local database URL. -port = 54322 -# The database major version to use. This has to be the same as your remote database's. Run `SHOW -# server_version;` on the remote database to check. -major_version = 14 - -[studio] -# Port to use for Supabase Studio. -port = 54323 - -# Email testing server. Emails sent with the local dev setup are not actually sent - rather, they -# are monitored, and you can view the emails that would have been sent from the web interface. -[inbucket] -# Port to use for the email testing server web interface. -port = 54324 -smtp_port = 54325 -pop3_port = 54326 - -[auth] -# The base URL of your website. Used as an allow-list for redirects and for constructing URLs used -# in emails. -site_url = "http://localhost:3000" -# A list of *exact* URLs that auth providers are permitted to redirect to post authentication. -additional_redirect_urls = ["https://localhost:3000"] -# How long tokens are valid for, in seconds. Defaults to 3600 (1 hour), maximum 604,800 seconds (one -# week). -jwt_expiry = 3600 -# Allow/disallow new user signups to your project. -enable_signup = true - -[auth.email] -# Allow/disallow new user signups via email to your project. -enable_signup = true -# If enabled, a user will be required to confirm any email change on both the old, and new email -# addresses. If disabled, only the new email is required to confirm. -double_confirm_changes = true -# If enabled, users need to confirm their email address before signing in. -enable_confirmations = false - -[auth.phone] -# Allow/disallow new user signups via phone to your project. -enable_signup = true -double_confirm_changes = true -enable_confirmations = false - -# Use an external OAuth provider. The full list of providers are: `apple`, `azure`, `bitbucket`, -# `discord`, `facebook`, `github`, `gitlab`, `google`, `twitch`, `twitter`, `slack`, `spotify`. -[auth.external.apple] -enabled = false -client_id = "" -secret = "" -# Overrides the default auth provider URL. Used to support self-hosted gitlab, single-tenant Azure, -# or any other third-party OIDC providers. -url = "" diff --git a/tests/supabase/migrations/data.sql b/tests/supabase/migrations/data.sql deleted file mode 100644 index 88b8457093..0000000000 --- a/tests/supabase/migrations/data.sql +++ /dev/null @@ -1,50 +0,0 @@ -create table if not exists profiles ( - id uuid references auth.users not null, - updated_at timestamp with time zone, - username text unique, - avatar_url text, - website text, - - primary key (id), - unique(username), - constraint username_length check (char_length(username) >= 3) -); - -alter table profiles enable row level security; - -create policy "Public profiles are viewable by the owner." - on profiles for select - using ( auth.uid() = id ); - -create policy "Users can insert their own profile." - on profiles for insert - with check ( auth.uid() = id ); - -create policy "Users can update own profile." - on profiles for update - using ( auth.uid() = id ); - -create policy "Users can delete own profile." - on profiles for delete - using ( auth.uid() = id ); - --- Set up Realtime -drop publication if exists supabase_realtime; -create publication supabase_realtime; -alter publication supabase_realtime add table profiles; - --- Set up Storage -insert into storage.buckets (id, name) -values ('avatars', 'avatars') on conflict do nothing; - -create policy "Avatar images are publicly accessible." - on storage.objects for select - using ( bucket_id = 'avatars' ); - -create policy "Anyone can upload an avatar." - on storage.objects for insert - with check ( bucket_id = 'avatars' ); - -create policy "Anyone can update an avatar." - on storage.objects for update - with check ( bucket_id = 'avatars' ); diff --git a/tests/tsconfig.json b/tests/tsconfig.json deleted file mode 100644 index 021d5872aa..0000000000 --- a/tests/tsconfig.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "compilerOptions": { - "target": "ES2021", - "module": "commonjs", - "esModuleInterop": true, - "inlineSources": true, - "emitDecoratorMetadata": true, - "experimentalDecorators": true, - "lib": ["es6", "DOM"], - "removeComments": true, - "noImplicitAny": true, - "noImplicitReturns": true, - "noImplicitThis": true, - "allowSyntheticDefaultImports": true, - "moduleResolution": "node", - "sourceMap": true, - "declaration": true, - "baseUrl": ".", - "paths": { - "*": ["node_modules/*", "./types/*"] - }, - "typeRoots": [ - "./node_modules/@types/", - "./node_modules/allure2-js-commons/dist/declarations/**/" - ] - }, - "exclude": ["node_modules"], - "compileOnSave": false -}