mirror of
https://github.com/xlorepdarkhelm/numinar-coding-project.git
synced 2026-09-05 23:18:25 -04:00
Updating, cleaning up, etc.
Signed-off-by: Cliff Hill <xlorep@darkhelm.org>
This commit is contained in:
@@ -6,4 +6,5 @@ module.exports = {
|
||||
"\\.(css|less|scss|sass)$": "identity-obj-proxy",
|
||||
},
|
||||
testMatch: ["**/__tests__/**/*.test.[jt]s?(x)"],
|
||||
transformIgnorePatterns: ["/node_modules/(?!(axios|date-fns)/)"],
|
||||
};
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{
|
||||
"license": "MIT",
|
||||
"name": "frontend",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
@@ -8,15 +9,15 @@
|
||||
"@mui/icons-material": "^7.3.1",
|
||||
"@mui/material": "^7.3.1",
|
||||
"@tanstack/react-query": "^5.85.5",
|
||||
"@testing-library/dom": "^10.4.0",
|
||||
"@testing-library/dom": "^10.4.1",
|
||||
"@testing-library/jest-dom": "^6.8.0",
|
||||
"@testing-library/react": "^16.3.0",
|
||||
"@testing-library/user-event": "^13.2.1",
|
||||
"@testing-library/user-event": "^14.6.1",
|
||||
"@types/jest": "^30.0.0",
|
||||
"@types/node": "^16.7.13",
|
||||
"@types/react": "^19.1.12",
|
||||
"@types/react-big-calendar": "^1.16.2",
|
||||
"@types/react-dom": "^19.1.8",
|
||||
"@types/react-dom": "^19.1.9",
|
||||
"@types/react-router-dom": "^5.3.3",
|
||||
"axios": "^1.11.0",
|
||||
"date-fns": "^4.1.0",
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import React from "react";
|
||||
import { render, screen } from "@testing-library/react";
|
||||
import App from "./App";
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import React from "react";
|
||||
import { BrowserRouter as Router, Routes, Route } from "react-router-dom";
|
||||
|
||||
import LandingPage from "./pages/LandingPage";
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
// BookingForm.test.tsx
|
||||
|
||||
import React from "react";
|
||||
import { render, screen } from "@testing-library/react";
|
||||
import BookingForm from "../../components/BookingForm";
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* @remarks
|
||||
* Tests rendering of booking data and empty state handling.
|
||||
*/
|
||||
import { render, screen, act } from "@testing-library/react";
|
||||
import { render, screen } from "@testing-library/react";
|
||||
import BookingList, { Booking } from "../../components/BookingList";
|
||||
|
||||
describe("BookingList", () => {
|
||||
@@ -84,10 +84,8 @@ describe("BookingList", () => {
|
||||
expect(screen.getByText("Initial Meeting")).toBeInTheDocument();
|
||||
|
||||
// Simulate SSE message
|
||||
act(() => {
|
||||
mockEventSourceInstance.onmessage({
|
||||
data: JSON.stringify({ bookings: newBookings }),
|
||||
});
|
||||
mockEventSourceInstance.onmessage({
|
||||
data: JSON.stringify({ bookings: newBookings }),
|
||||
});
|
||||
|
||||
// New booking should be rendered
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
// CalendarView.test.tsx
|
||||
|
||||
import React from "react";
|
||||
import { render, screen } from "@testing-library/react";
|
||||
import CalendarView from "../../components/CalendarView";
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
// RoomEquipmentList.test.tsx
|
||||
import React from "react";
|
||||
import { render, screen } from "@testing-library/react";
|
||||
import RoomEquipmentList from "../../components/RoomEquipmentList";
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
// BookingPage.test.tsx
|
||||
import React from "react";
|
||||
|
||||
import { render, screen, waitFor } from "@testing-library/react";
|
||||
import BookingPage from "../../pages/BookingPage";
|
||||
|
||||
@@ -8,7 +8,8 @@
|
||||
* - GET `/bookings/room/{roomId}?date={YYYY-MM-DD}`: Returns Booking[] for the selected room and date.
|
||||
*/
|
||||
|
||||
import { render, screen, waitFor, act } from "@testing-library/react";
|
||||
import { render, screen, waitFor } from "@testing-library/react";
|
||||
import userEvent from "@testing-library/user-event";
|
||||
import { MemoryRouter } from "react-router-dom";
|
||||
import axios from "axios";
|
||||
import LandingPage from "../../pages/LandingPage";
|
||||
@@ -96,11 +97,9 @@ describe("LandingPage", () => {
|
||||
// Wait for bookings for Room A
|
||||
await screen.findByText("Meeting A");
|
||||
|
||||
// Select Room B (wrap in act to avoid warning)
|
||||
// Select Room B
|
||||
const roomB = screen.getByTestId("room-item-2");
|
||||
await act(async () => {
|
||||
roomB.click();
|
||||
});
|
||||
await userEvent.click(roomB);
|
||||
|
||||
// Wait for bookings for Room B
|
||||
await screen.findByText("Meeting B");
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import React from "react";
|
||||
/**
|
||||
* CalendarView component
|
||||
*
|
||||
@@ -7,7 +8,6 @@
|
||||
* @example
|
||||
* <CalendarView events={[]} onSelectSlot={fn} onSelectEvent={fn} />
|
||||
*/
|
||||
import React from "react";
|
||||
import Tooltip from "@mui/material/Tooltip";
|
||||
import Typography from "@mui/material/Typography";
|
||||
import {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import React from "react";
|
||||
import {
|
||||
Dialog,
|
||||
DialogTitle,
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
// RoomEquipmentList.tsx
|
||||
// Displays equipment details for a room
|
||||
|
||||
import React from "react";
|
||||
|
||||
const RoomEquipmentList: React.FC = () => {
|
||||
return <div>Room Equipment (placeholder)</div>;
|
||||
};
|
||||
|
||||
@@ -1261,24 +1261,24 @@
|
||||
integrity sha512-+OJ9konv95ClSTOJCmMZqpd5+YGsB2S+x6w3E1oaM8UuR5j8nTNHYSz8c9BEPGDOCMQYIEEGlVPj/VY64iTbGw==
|
||||
|
||||
"@emnapi/core@^1.4.3":
|
||||
version "1.4.5"
|
||||
resolved "https://registry.yarnpkg.com/@emnapi/core/-/core-1.4.5.tgz#bfbb0cbbbb9f96ec4e2c4fd917b7bbe5495ceccb"
|
||||
integrity sha512-XsLw1dEOpkSX/WucdqUhPWP7hDxSvZiY+fsUC14h+FtQ2Ifni4znbBt8punRX+Uj2JG/uDb8nEHVKvrVlvdZ5Q==
|
||||
version "1.5.0"
|
||||
resolved "https://registry.yarnpkg.com/@emnapi/core/-/core-1.5.0.tgz#85cd84537ec989cebb2343606a1ee663ce4edaf0"
|
||||
integrity sha512-sbP8GzB1WDzacS8fgNPpHlp6C9VZe+SJP3F90W9rLemaQj2PzIuTEl1qDOYQf58YIpyjViI24y9aPWCjEzY2cg==
|
||||
dependencies:
|
||||
"@emnapi/wasi-threads" "1.0.4"
|
||||
"@emnapi/wasi-threads" "1.1.0"
|
||||
tslib "^2.4.0"
|
||||
|
||||
"@emnapi/runtime@^1.4.3":
|
||||
version "1.4.5"
|
||||
resolved "https://registry.yarnpkg.com/@emnapi/runtime/-/runtime-1.4.5.tgz#c67710d0661070f38418b6474584f159de38aba9"
|
||||
integrity sha512-++LApOtY0pEEz1zrd9vy1/zXVaVJJ/EbAF3u0fXIzPJEDtnITsBGbbK0EkM72amhl/R5b+5xx0Y/QhcVOpuulg==
|
||||
version "1.5.0"
|
||||
resolved "https://registry.yarnpkg.com/@emnapi/runtime/-/runtime-1.5.0.tgz#9aebfcb9b17195dce3ab53c86787a6b7d058db73"
|
||||
integrity sha512-97/BJ3iXHww3djw6hYIfErCZFee7qCtrneuLa20UXFCOTCfBM2cvQHjWJ2EG0s0MtdNwInarqCTz35i4wWXHsQ==
|
||||
dependencies:
|
||||
tslib "^2.4.0"
|
||||
|
||||
"@emnapi/wasi-threads@1.0.4":
|
||||
version "1.0.4"
|
||||
resolved "https://registry.yarnpkg.com/@emnapi/wasi-threads/-/wasi-threads-1.0.4.tgz#703fc094d969e273b1b71c292523b2f792862bf4"
|
||||
integrity sha512-PJR+bOmMOPH8AtcTGAyYNiuJ3/Fcoj2XN/gBEWzDIKh254XO+mM9XoXHk5GNEhodxeMznbg7BlRojVbKN+gC6g==
|
||||
"@emnapi/wasi-threads@1.1.0":
|
||||
version "1.1.0"
|
||||
resolved "https://registry.yarnpkg.com/@emnapi/wasi-threads/-/wasi-threads-1.1.0.tgz#60b2102fddc9ccb78607e4a3cf8403ea69be41bf"
|
||||
integrity sha512-WI0DdZ8xFSbgMjR1sFsKABJ/C5OnRrjT06JXbZKexJGrDuPTzZdDYfFlsgcCXCyf+suG5QU2e/y1Wo2V/OapLQ==
|
||||
dependencies:
|
||||
tslib "^2.4.0"
|
||||
|
||||
@@ -2316,7 +2316,7 @@
|
||||
dependencies:
|
||||
"@tanstack/query-core" "5.85.5"
|
||||
|
||||
"@testing-library/dom@^10.4.0":
|
||||
"@testing-library/dom@^10.4.1":
|
||||
version "10.4.1"
|
||||
resolved "https://registry.yarnpkg.com/@testing-library/dom/-/dom-10.4.1.tgz#d444f8a889e9a46e9a3b4f3b88e0fcb3efb6cf95"
|
||||
integrity sha512-o4PXJQidqJl82ckFaXUeoAW+XysPLauYI43Abki5hABd853iMhitooc6znOnczgbTYmEP6U6/y1ZyKAIsvMKGg==
|
||||
@@ -2349,12 +2349,10 @@
|
||||
dependencies:
|
||||
"@babel/runtime" "^7.12.5"
|
||||
|
||||
"@testing-library/user-event@^13.2.1":
|
||||
version "13.5.0"
|
||||
resolved "https://registry.yarnpkg.com/@testing-library/user-event/-/user-event-13.5.0.tgz#69d77007f1e124d55314a2b73fd204b333b13295"
|
||||
integrity sha512-5Kwtbo3Y/NowpkbRuSepbyMFkZmHgD+vPzYB/RJ4oxt5Gj/avFFBYjhw27cqSVPVw/3a67NK1PbiIr9k4Gwmdg==
|
||||
dependencies:
|
||||
"@babel/runtime" "^7.12.5"
|
||||
"@testing-library/user-event@^14.6.1":
|
||||
version "14.6.1"
|
||||
resolved "https://registry.yarnpkg.com/@testing-library/user-event/-/user-event-14.6.1.tgz#13e09a32d7a8b7060fe38304788ebf4197cd2149"
|
||||
integrity sha512-vq7fv0rnt+QTXgPxr5Hjc210p6YKq2kmdziLgnsZGgLJ9e6VAShx1pACLuRjd/AS/sr7phAR58OIIpf0LlmQNw==
|
||||
|
||||
"@tootallnate/once@1":
|
||||
version "1.1.2"
|
||||
@@ -2657,10 +2655,10 @@
|
||||
"@types/prop-types" "*"
|
||||
"@types/react" "*"
|
||||
|
||||
"@types/react-dom@^19.1.8":
|
||||
version "19.1.8"
|
||||
resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-19.1.8.tgz#6cad88ec938beb2626df7c4cb97b15d9f66a05a9"
|
||||
integrity sha512-xG7xaBMJCpcK0RpN8jDbAACQo54ycO6h4dSSmgv8+fu6ZIAdANkx/WsawASUjVXYfy+J9AbUpRMNNEsXCDfDBQ==
|
||||
"@types/react-dom@^19.1.9":
|
||||
version "19.1.9"
|
||||
resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-19.1.9.tgz#5ab695fce1e804184767932365ae6569c11b4b4b"
|
||||
integrity sha512-qXRuZaOsAdXKFyOhRBg6Lqqc0yay13vN7KrIg4L7N4aaHN68ma9OK3NE1BoDFgFOTfM7zg+3/8+2n8rLUH3OKQ==
|
||||
|
||||
"@types/react-router-dom@^5.3.3":
|
||||
version "5.3.3"
|
||||
@@ -3771,12 +3769,12 @@ browser-process-hrtime@^1.0.0:
|
||||
integrity sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow==
|
||||
|
||||
browserslist@^4.0.0, browserslist@^4.18.1, browserslist@^4.21.4, browserslist@^4.24.0, browserslist@^4.24.4, browserslist@^4.25.3:
|
||||
version "4.25.3"
|
||||
resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.25.3.tgz#9167c9cbb40473f15f75f85189290678b99b16c5"
|
||||
integrity sha512-cDGv1kkDI4/0e5yON9yM5G/0A5u8sf5TnmdX5C9qHzI9PPu++sQ9zjm1k9NiOrf3riY4OkK0zSGqfvJyJsgCBQ==
|
||||
version "4.25.4"
|
||||
resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.25.4.tgz#ebdd0e1d1cf3911834bab3a6cd7b917d9babf5af"
|
||||
integrity sha512-4jYpcjabC606xJ3kw2QwGEZKX0Aw7sgQdZCvIK9dhVSPh76BKo+C+btT1RRofH7B+8iNpEbgGNVWiLki5q93yg==
|
||||
dependencies:
|
||||
caniuse-lite "^1.0.30001735"
|
||||
electron-to-chromium "^1.5.204"
|
||||
caniuse-lite "^1.0.30001737"
|
||||
electron-to-chromium "^1.5.211"
|
||||
node-releases "^2.0.19"
|
||||
update-browserslist-db "^1.1.3"
|
||||
|
||||
@@ -3873,7 +3871,7 @@ caniuse-api@^3.0.0:
|
||||
lodash.memoize "^4.1.2"
|
||||
lodash.uniq "^4.5.0"
|
||||
|
||||
caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001702, caniuse-lite@^1.0.30001735:
|
||||
caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001702, caniuse-lite@^1.0.30001737:
|
||||
version "1.0.30001737"
|
||||
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001737.tgz#8292bb7591932ff09e9a765f12fdf5629a241ccc"
|
||||
integrity sha512-BiloLiXtQNrY5UyF0+1nSJLXUENuhka2pzy2Fx5pGxqavdrxSCW4U6Pn/PoG3Efspi2frRbHpBV2XsrPE6EDlw==
|
||||
@@ -4771,7 +4769,7 @@ ejs@^3.1.6:
|
||||
dependencies:
|
||||
jake "^10.8.5"
|
||||
|
||||
electron-to-chromium@^1.5.204:
|
||||
electron-to-chromium@^1.5.211:
|
||||
version "1.5.211"
|
||||
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.211.tgz#749317bf9cf894c06f67980940cf8074e5eb08ca"
|
||||
integrity sha512-IGBvimJkotaLzFnwIVgW9/UD/AOJ2tByUmeOrtqBfACSbAw5b1G0XpvdaieKyc7ULmbwXVx+4e4Be8pOPBrYkw==
|
||||
|
||||
Reference in New Issue
Block a user