Compare commits
1 Commits
4f72ef1b4a
...
cb60fe446c
Author | SHA1 | Date | |
---|---|---|---|
![]() |
cb60fe446c |
2
.github/workflows/playwright.yml
vendored
2
.github/workflows/playwright.yml
vendored
@ -17,7 +17,7 @@ jobs:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version-file: .nvmrc
|
||||
node-version: lts/*
|
||||
- name: Install dependencies
|
||||
run: npm install -g pnpm && pnpm install
|
||||
- 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
|
||||
|
||||
FROM node:24-alpine AS base
|
||||
FROM node:23-alpine AS base
|
||||
|
||||
# Install dependencies only when needed
|
||||
FROM base AS deps
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Based on https://github.com/vercel/next.js/blob/canary/examples/with-docker/Dockerfile
|
||||
|
||||
FROM node:24-alpine AS base
|
||||
FROM node:23-alpine AS base
|
||||
|
||||
# Install dependencies only when needed
|
||||
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 {
|
||||
number: table.number,
|
||||
guests: table.guests.map((guest: any) => new Guest(guest.id, guest.name, guest.color, guest.status, [], guest.group)),
|
||||
guests: table.guests.map((guest: any) => new Guest(guest.id, guest.name, guest.group?.name, guest.group?.id, guest.color)),
|
||||
discomfort: {
|
||||
discomfort: table.discomfort.discomfort,
|
||||
breakdown: {
|
||||
|
@ -3,7 +3,7 @@
|
||||
'use client';
|
||||
|
||||
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 clsx from 'clsx';
|
||||
import TableOfContents from '../components/table-of-contents';
|
||||
@ -48,12 +48,7 @@ export default function guestsTable({ guests, onUpdate, onEdit }: {
|
||||
</td>
|
||||
<td>
|
||||
<div className="flex flex-row items-center">
|
||||
<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)
|
||||
}
|
||||
}}
|
||||
/>
|
||||
<TrashIcon className='size-6 cursor-pointer' onClick={() => { api.destroy(serializer, guest, onUpdate)}} />
|
||||
<PencilIcon className='size-6 cursor-pointer' onClick={() => onEdit(guest)} />
|
||||
</div>
|
||||
</td>
|
||||
|
@ -32,7 +32,7 @@
|
||||
"devDependencies": {
|
||||
"@playwright/test": "^1.52.0",
|
||||
"@types/bcrypt": "^5.0.2",
|
||||
"@types/node": "24.0.1",
|
||||
"@types/node": "22.15.31",
|
||||
"@types/react": "18.3.23",
|
||||
"@types/react-dom": "18.3.7",
|
||||
"wait-on": "^8.0.3"
|
||||
|
20
pnpm-lock.yaml
generated
20
pnpm-lock.yaml
generated
@ -82,8 +82,8 @@ importers:
|
||||
specifier: ^5.0.2
|
||||
version: 5.0.2
|
||||
'@types/node':
|
||||
specifier: 24.0.1
|
||||
version: 24.0.1
|
||||
specifier: 22.15.31
|
||||
version: 22.15.31
|
||||
'@types/react':
|
||||
specifier: 18.3.23
|
||||
version: 18.3.23
|
||||
@ -469,8 +469,8 @@ packages:
|
||||
'@types/mdurl@2.0.0':
|
||||
resolution: {integrity: sha512-RGdgjQUZba5p6QEFAVx2OGb8rQDL/cPRG7GiedRzMcJ1tYnUANBncjbSB1NRGwbvjcPeikRABz2nshyPk1bhWg==}
|
||||
|
||||
'@types/node@24.0.1':
|
||||
resolution: {integrity: sha512-MX4Zioh39chHlDJbKmEgydJDS3tspMP/lnQC67G3SWsTnb9NeYVWOjkxpOSy4oMfPs4StcWHwBrvUb4ybfnuaw==}
|
||||
'@types/node@22.15.31':
|
||||
resolution: {integrity: sha512-jnVe5ULKl6tijxUhvQeNbQG/84fHfg+yMak02cT8QVhBx/F05rAVxCGBYYTh2EKz22D6JF5ktXuNwdx7b9iEGw==}
|
||||
|
||||
'@types/prop-types@15.7.12':
|
||||
resolution: {integrity: sha512-5zvhXYtRNRluoE/jAp4GVsSduVUzNWKkOZrCDBWYtE7biZywwdC2AcEzg+cSMLFRfVgeAFqpfNabiPjxFddV1Q==}
|
||||
@ -978,8 +978,8 @@ packages:
|
||||
uc.micro@2.1.0:
|
||||
resolution: {integrity: sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A==}
|
||||
|
||||
undici-types@7.8.0:
|
||||
resolution: {integrity: sha512-9UJ2xGDvQ43tYyVMpuHlsgApydB8ZKfVYTsLDhXkFL/6gfkp+U8xTGdh8pMJv1SpZna0zxG1DwsKZsreLbXBxw==}
|
||||
undici-types@6.21.0:
|
||||
resolution: {integrity: sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==}
|
||||
|
||||
update-browserslist-db@1.1.3:
|
||||
resolution: {integrity: sha512-UxhIZQ+QInVdunkDAaiazvvT/+fXL5Osr0JZlJulepYu6Jd7qJtDZjlur0emRlT71EN3ScPoE7gvsuIKKNavKw==}
|
||||
@ -1335,7 +1335,7 @@ snapshots:
|
||||
|
||||
'@types/bcrypt@5.0.2':
|
||||
dependencies:
|
||||
'@types/node': 24.0.1
|
||||
'@types/node': 22.15.31
|
||||
|
||||
'@types/linkify-it@5.0.0': {}
|
||||
|
||||
@ -1346,9 +1346,9 @@ snapshots:
|
||||
|
||||
'@types/mdurl@2.0.0': {}
|
||||
|
||||
'@types/node@24.0.1':
|
||||
'@types/node@22.15.31':
|
||||
dependencies:
|
||||
undici-types: 7.8.0
|
||||
undici-types: 6.21.0
|
||||
|
||||
'@types/prop-types@15.7.12': {}
|
||||
|
||||
@ -1878,7 +1878,7 @@ snapshots:
|
||||
|
||||
uc.micro@2.1.0: {}
|
||||
|
||||
undici-types@7.8.0: {}
|
||||
undici-types@6.21.0: {}
|
||||
|
||||
update-browserslist-db@1.1.3(browserslist@4.24.4):
|
||||
dependencies:
|
||||
|
@ -70,7 +70,6 @@ test('should allow CRUD on guests', async ({ page }) => {
|
||||
await expect(page.getByText('There are 3 elements in the list')).toBeVisible();
|
||||
|
||||
// Delete John Fire
|
||||
page.on('dialog', dialog => dialog.accept());
|
||||
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();
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user