Edit in cuesheet (#1372)

* pass on all event edits

* MakePublic

* trim value in cell

* edit notes

* title

* add key check

* don't log error

Co-authored-by: Carlos Valente <34649812+cpvalente@users.noreply.github.com>

* checkbox

* refactor

* remove log

* fix test

* use row number to test value

---------

Co-authored-by: Carlos Valente <34649812+cpvalente@users.noreply.github.com>
This commit is contained in:
Alex Christoffer Rasmussen
2024-12-16 14:27:25 +01:00
committed by GitHub
parent d8f7d4bba6
commit b048d0f88d
9 changed files with 223 additions and 98 deletions
+14 -7
View File
@@ -1,11 +1,18 @@
import { test } from '@playwright/test';
import { expect, test } from '@playwright/test';
test('cuesheet displays events and exports csv', async ({ page }) => {
test('cuesheet displays events', async ({ page }) => {
// same elements in cuesheet
await page.goto('http://localhost:4001/cuesheet');
await page.getByText('Eurovision Song Contest').click();
await page.getByRole('cell', { name: 'Lunch break' }).click();
await page.getByRole('cell', { name: 'Albania' }).click();
await page.getByRole('cell', { name: 'Latvia' }).click();
await page.getByRole('cell', { name: 'Lithuania' }).click();
await expect(page.getByText('Eurovision Song Contest')).toBeVisible();
await expect(page.getByRole('row', { name: 'Lunch break' })).toBeVisible();
await expect(page.locator('tr:nth-child(1) > td:nth-child(7)').first().getByRole('textbox').first()).toHaveValue(
'Albania',
);
await expect(page.locator('tr:nth-child(2) > td:nth-child(7)').first().getByRole('textbox').first()).toHaveValue(
'Latvia',
);
await expect(page.locator('tr:nth-child(3) > td:nth-child(7)').first().getByRole('textbox').first()).toHaveValue(
'Lithuania',
);
});