Compare commits
10 Commits
cb60fe446c
...
4f72ef1b4a
Author | SHA1 | Date | |
---|---|---|---|
![]() |
4f72ef1b4a | ||
71a976eced | |||
41bd2ad2b5 | |||
cd6574389f | |||
e9e0ec7c13 | |||
cb89310425 | |||
1e2829da25 | |||
4d1f83cc33 | |||
471b98fb53 | |||
![]() |
055ef75510 |
2
.github/workflows/playwright.yml
vendored
2
.github/workflows/playwright.yml
vendored
@ -17,7 +17,7 @@ jobs:
|
|||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: lts/*
|
node-version-file: .nvmrc
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: npm install -g pnpm && pnpm install
|
run: npm install -g pnpm && pnpm install
|
||||||
- name: Build the service that will be tested
|
- name: Build the service that will be tested
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# Based on https://github.com/vercel/next.js/blob/canary/examples/with-docker/Dockerfile
|
# Based on https://github.com/vercel/next.js/blob/canary/examples/with-docker/Dockerfile
|
||||||
|
|
||||||
FROM node:23-alpine AS base
|
FROM node:24-alpine AS base
|
||||||
|
|
||||||
# Install dependencies only when needed
|
# Install dependencies only when needed
|
||||||
FROM base AS deps
|
FROM base AS deps
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# Based on https://github.com/vercel/next.js/blob/canary/examples/with-docker/Dockerfile
|
# Based on https://github.com/vercel/next.js/blob/canary/examples/with-docker/Dockerfile
|
||||||
|
|
||||||
FROM node:23-alpine AS base
|
FROM node:24-alpine AS base
|
||||||
|
|
||||||
# Install dependencies only when needed
|
# Install dependencies only when needed
|
||||||
FROM base AS deps
|
FROM base AS deps
|
||||||
|
@ -34,7 +34,7 @@ export class TableSimulationSerializer implements Serializable<TableSimulation>
|
|||||||
return new TableSimulation(data.id, data.tables.map((table: any) => {
|
return new TableSimulation(data.id, data.tables.map((table: any) => {
|
||||||
return {
|
return {
|
||||||
number: table.number,
|
number: table.number,
|
||||||
guests: table.guests.map((guest: any) => new Guest(guest.id, guest.name, guest.group?.name, guest.group?.id, guest.color)),
|
guests: table.guests.map((guest: any) => new Guest(guest.id, guest.name, guest.color, guest.status, [], guest.group)),
|
||||||
discomfort: {
|
discomfort: {
|
||||||
discomfort: table.discomfort.discomfort,
|
discomfort: table.discomfort.discomfort,
|
||||||
breakdown: {
|
breakdown: {
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
'use client';
|
'use client';
|
||||||
|
|
||||||
import { AbstractApi } from '@/app/api/abstract-api';
|
import { AbstractApi } from '@/app/api/abstract-api';
|
||||||
import { Guest , GuestSerializer} from '@/app/lib/guest';
|
import { Guest, GuestSerializer } from '@/app/lib/guest';
|
||||||
import { PencilIcon, TrashIcon } from '@heroicons/react/24/outline';
|
import { PencilIcon, TrashIcon } from '@heroicons/react/24/outline';
|
||||||
import clsx from 'clsx';
|
import clsx from 'clsx';
|
||||||
import TableOfContents from '../components/table-of-contents';
|
import TableOfContents from '../components/table-of-contents';
|
||||||
@ -48,7 +48,12 @@ export default function guestsTable({ guests, onUpdate, onEdit }: {
|
|||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<div className="flex flex-row items-center">
|
<div className="flex flex-row items-center">
|
||||||
<TrashIcon className='size-6 cursor-pointer' onClick={() => { api.destroy(serializer, guest, onUpdate)}} />
|
<TrashIcon className='size-6 cursor-pointer' onClick={() => {
|
||||||
|
if (window.confirm(`Are you sure you want to delete guest "${guest.name}"?`)) {
|
||||||
|
api.destroy(serializer, guest, onUpdate)
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
/>
|
||||||
<PencilIcon className='size-6 cursor-pointer' onClick={() => onEdit(guest)} />
|
<PencilIcon className='size-6 cursor-pointer' onClick={() => onEdit(guest)} />
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
"primereact": "^10.8.2",
|
"primereact": "^10.8.2",
|
||||||
"react": "19.0.0-rc-f38c22b244-20240704",
|
"react": "19.0.0-rc-f38c22b244-20240704",
|
||||||
"react-dom": "19.0.0-rc-f38c22b244-20240704",
|
"react-dom": "19.0.0-rc-f38c22b244-20240704",
|
||||||
"tailwindcss": "3.4.17",
|
"tailwindcss": "4.1.10",
|
||||||
"typescript": "5.8.3",
|
"typescript": "5.8.3",
|
||||||
"use-debounce": "^10.0.1",
|
"use-debounce": "^10.0.1",
|
||||||
"uuid": "11.1.0",
|
"uuid": "11.1.0",
|
||||||
@ -32,7 +32,7 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@playwright/test": "^1.52.0",
|
"@playwright/test": "^1.52.0",
|
||||||
"@types/bcrypt": "^5.0.2",
|
"@types/bcrypt": "^5.0.2",
|
||||||
"@types/node": "22.15.31",
|
"@types/node": "24.0.1",
|
||||||
"@types/react": "18.3.23",
|
"@types/react": "18.3.23",
|
||||||
"@types/react-dom": "18.3.7",
|
"@types/react-dom": "18.3.7",
|
||||||
"wait-on": "^8.0.3"
|
"wait-on": "^8.0.3"
|
||||||
|
785
pnpm-lock.yaml
generated
785
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@ -70,6 +70,7 @@ test('should allow CRUD on guests', async ({ page }) => {
|
|||||||
await expect(page.getByText('There are 3 elements in the list')).toBeVisible();
|
await expect(page.getByText('There are 3 elements in the list')).toBeVisible();
|
||||||
|
|
||||||
// Delete John Fire
|
// Delete John Fire
|
||||||
|
page.on('dialog', dialog => dialog.accept());
|
||||||
await page.getByRole('row').nth(1).locator('svg').nth(0).click(); // Click delete icon
|
await page.getByRole('row').nth(1).locator('svg').nth(0).click(); // Click delete icon
|
||||||
await expect(page.getByText('There are 2 elements in the list')).toBeVisible();
|
await expect(page.getByText('There are 2 elements in the list')).toBeVisible();
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user