mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-24 00:19:21 +00:00
fix(cuesheet): prevent stale column width on refresh
This commit is contained in:
committed by
Carlos Valente
parent
805663e2ea
commit
c19aa4ca28
@@ -200,7 +200,7 @@ export default function CuesheetTable({
|
||||
return colSizes;
|
||||
// eslint-disable-next-line react-compiler/react-compiler -- unfortunately this is what we need
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps -- this works well and follows documentation
|
||||
}, [table.state.columnResizing, table.state.columnSizing]);
|
||||
}, [columns, table.state.columnResizing, table.state.columnSizing]);
|
||||
|
||||
const allLeafColumns = table.getAllLeafColumns();
|
||||
const { rows } = table.getRowModel();
|
||||
|
||||
@@ -9,13 +9,13 @@ test('cuesheet displays events', async ({ page }) => {
|
||||
test('cuesheet persists column visibility', async ({ page }) => {
|
||||
await page.goto('/cuesheet');
|
||||
|
||||
const noteHeader = page.getByRole('columnheader', { name: 'Note' });
|
||||
const noteHeader = page.getByRole('columnheader', { name: 'Note', exact: true });
|
||||
const noteCell = page.getByTestId('cuesheet-event').first().getByTestId('cuesheet-cell-note');
|
||||
await expect(noteHeader).toBeVisible();
|
||||
await expect(noteCell).toBeVisible();
|
||||
|
||||
await page.getByRole('button', { name: 'Columns' }).click();
|
||||
await page.getByRole('checkbox', { name: 'Note' }).click();
|
||||
await page.getByRole('checkbox', { name: 'Note', exact: true }).click();
|
||||
|
||||
await expect(noteHeader).toBeHidden();
|
||||
await expect(noteCell).toBeHidden();
|
||||
|
||||
Reference in New Issue
Block a user