diff --git a/.github/workflows/docker-auto-test.yaml b/.github/workflows/docker-auto-test.yaml index 837d2d171..70ee4fe57 100644 --- a/.github/workflows/docker-auto-test.yaml +++ b/.github/workflows/docker-auto-test.yaml @@ -53,7 +53,6 @@ jobs: - name: Run backend tests id: backend_tests - continue-on-error: true run: | cd backend poetry run pytest --junitxml=pytest-results.xml @@ -124,7 +123,6 @@ jobs: - name: Run frontend tests id: frontend_tests - continue-on-error: true run: | cd frontend npm run test:run -- --reporter=junit --outputFile=vitest-results.xml @@ -148,4 +146,4 @@ jobs: check_name: "Frontend Test Results" fail_on: "errors" report_individual_runs: "true" - deduplicate_classes_by_file_name: "true" \ No newline at end of file + deduplicate_classes_by_file_name: "true" diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 3fd41e4ec..ab2d9bd6d 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -12207,9 +12207,9 @@ } }, "node_modules/express": { - "version": "4.21.1", - "resolved": "https://registry.npmjs.org/express/-/express-4.21.1.tgz", - "integrity": "sha512-YSFlK1Ee0/GC8QaO91tHcDxJiE/X4FbpAyQWkxAvG6AXCuR65YzK8ua6D9hvi/TzUfZMpc+BwuM1IPw8fmQBiQ==", + "version": "4.21.2", + "resolved": "https://registry.npmjs.org/express/-/express-4.21.2.tgz", + "integrity": "sha512-28HqgMZAmih1Czt9ny7qr6ek2qddF4FclbMzwhCREB6OFfH+rXAnuNCwo1/wFvrtbgsQDb4kSbX9de9lFbrXnA==", "dev": true, "dependencies": { "accepts": "~1.3.8", @@ -12231,7 +12231,7 @@ "methods": "~1.1.2", "on-finished": "2.4.1", "parseurl": "~1.3.3", - "path-to-regexp": "0.1.10", + "path-to-regexp": "0.1.12", "proxy-addr": "~2.0.7", "qs": "6.13.0", "range-parser": "~1.2.1", @@ -12246,6 +12246,10 @@ }, "engines": { "node": ">= 0.10.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" } }, "node_modules/express/node_modules/cookie": { @@ -17129,9 +17133,9 @@ } }, "node_modules/path-to-regexp": { - "version": "0.1.10", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.10.tgz", - "integrity": "sha512-7lf7qcQidTku0Gu3YDPc8DJ1q7OOucfa/BSsIwjuh56VU7katFvuM8hULfkwB3Fns/rsVF7PwPKVw1sl5KQS9w==", + "version": "0.1.12", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.12.tgz", + "integrity": "sha512-RA1GjUVMnvYFxuqovrEqZoxxW5NUZqbwKtYz/Tt7nXerk0LbLblQmrsgdeOxV5SFHf0UDggjS/bSeOZwt1pmEQ==", "dev": true }, "node_modules/path-type": { diff --git a/frontend/src/views/AllocationAgreements/__tests__/AddEditAllocationAgreements.test.jsx b/frontend/src/views/AllocationAgreements/__tests__/AddEditAllocationAgreements.test.jsx index ce7d72113..76c78d006 100644 --- a/frontend/src/views/AllocationAgreements/__tests__/AddEditAllocationAgreements.test.jsx +++ b/frontend/src/views/AllocationAgreements/__tests__/AddEditAllocationAgreements.test.jsx @@ -1,7 +1,7 @@ // src/views/AllocationAgreements/__tests__/AddEditAllocationAgreements.test.jsx import React from 'react' -import { render, screen, fireEvent, waitFor } from '@testing-library/react' +import { render, screen } from '@testing-library/react' import { describe, it, expect, beforeEach, vi } from 'vitest' import { AddEditAllocationAgreements } from '../AddEditAllocationAgreements' import * as useAllocationAgreementHook from '@/hooks/useAllocationAgreement' @@ -12,6 +12,19 @@ const mockUseLocation = vi.fn() const mockUseNavigate = vi.fn() const mockUseParams = vi.fn() +vi.mock('@react-keycloak/web', () => ({ + ReactKeycloakProvider: ({ children }) => children, + useKeycloak: () => ({ + keycloak: { + authenticated: true, + login: vi.fn(), + logout: vi.fn(), + register: vi.fn() + }, + initialized: true + }) +})) + vi.mock('react-router-dom', () => ({ ...vi.importActual('react-router-dom'), useLocation: () => mockUseLocation(),