refactor: improve cuesheet composition

refactor: simplify placing events in rundown

m
This commit is contained in:
Carlos Valente
2024-12-17 13:21:16 +01:00
committed by Carlos Valente
parent c7faab00a3
commit ec823e0095
28 changed files with 223 additions and 1191 deletions
+6 -9
View File
@@ -5,14 +5,11 @@ test('cuesheet displays events', async ({ page }) => {
await page.goto('http://localhost:4001/cuesheet');
await expect(page.getByText('Eurovision Song Contest')).toBeVisible();
await expect(page.getByRole('row', { name: 'Lunch break' })).toBeVisible();
await expect(page.getByRole('row', { name: 'Afternoon 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',
);
await expect(page.locator('#cuesheet')).toBeVisible();
// there should be 16 rows in the table (same as the amount of events in the rundown)
const rowCount = await page.locator('#cuesheet tbody tr').count();
expect(rowCount).toBe(16);
});