From a3bbd74db793fd8d78976162ebcfde9c1c266abf Mon Sep 17 00:00:00 2001 From: Carlos Valente <34649812+cpvalente@users.noreply.github.com> Date: Sun, 27 Aug 2023 22:00:18 +0200 Subject: [PATCH] chore: reduce sentry error logging (#498) * chore: reduce sentry error logging * chore: version bump * chore: improve test selectors --- apps/client/package.json | 2 +- apps/client/src/features/rundown/Rundown.tsx | 2 +- .../rundown/quick-add-block/QuickAddBlock.tsx | 6 ++-- apps/client/src/index.tsx | 4 +-- apps/electron/package.json | 2 +- apps/server/package.json | 2 +- e2e/tests/features/204-editor-crud.spec.ts | 34 +++---------------- package.json | 2 +- 8 files changed, 15 insertions(+), 39 deletions(-) diff --git a/apps/client/package.json b/apps/client/package.json index c573d33649..5989b06858 100644 --- a/apps/client/package.json +++ b/apps/client/package.json @@ -1,6 +1,6 @@ { "name": "ontime-ui", - "version": "2.3.9", + "version": "2.7.0", "private": true, "dependencies": { "@chakra-ui/react": "^2.7.0", diff --git a/apps/client/src/features/rundown/Rundown.tsx b/apps/client/src/features/rundown/Rundown.tsx index 258deb23f4..c18c304250 100644 --- a/apps/client/src/features/rundown/Rundown.tsx +++ b/apps/client/src/features/rundown/Rundown.tsx @@ -234,7 +234,7 @@ export default function Rundown(props: RundownProps) { return ( -
+
{entry.type === SupportedEvent.Event &&
{eventIndex}
}
{ size='xs' variant='ontime-subtle-white' className={style.quickBtn} - data-testId='quick-add-event' + data-testid='quick-add-event' > Event {showKbd && Alt + E} @@ -92,7 +92,7 @@ const QuickAddBlock = (props: QuickAddBlockProps) => { variant='ontime-subtle-white' disabled={disableAddDelay} className={style.quickBtn} - data-testId='quick-add-delay' + data-testid='quick-add-delay' > Delay {showKbd && Alt + D} @@ -104,7 +104,7 @@ const QuickAddBlock = (props: QuickAddBlockProps) => { variant='ontime-subtle-white' disabled={disableAddBlock} className={style.quickBtn} - data-testId='quick-add-block' + data-testid='quick-add-block' > Block {showKbd && Alt + B} diff --git a/apps/client/src/index.tsx b/apps/client/src/index.tsx index a203885e26..043172be65 100644 --- a/apps/client/src/index.tsx +++ b/apps/client/src/index.tsx @@ -15,10 +15,10 @@ const root = createRoot(container as Element); Sentry.init({ dsn: 'https://5e4d2c4b57ab409cb98d4c08b2014755@o4504288369836032.ingest.sentry.io/4504288371343360', integrations: [new BrowserTracing()], - tracesSampleRate: 1.0, + tracesSampleRate: 0.3, release: ONTIME_VERSION, enabled: import.meta.env.PROD, - ignoreErrors: ['top.GLOBALS', 'Unable to preload CSS'], + ignoreErrors: ['top.GLOBALS', 'Unable to preload CSS', 'Failed to fetch dynamically imported module'], denyUrls: [/extensions\//i, /^chrome:\/\//i, /^chrome-extension:\/\//i], }); diff --git a/apps/electron/package.json b/apps/electron/package.json index 2aee43fc6e..3e8dd5a1b4 100644 --- a/apps/electron/package.json +++ b/apps/electron/package.json @@ -1,6 +1,6 @@ { "name": "ontime", - "version": "2.3.9", + "version": "2.7.0", "author": "Carlos Valente", "description": "Time keeping for live events", "repository": "https://github.com/cpvalente/ontime", diff --git a/apps/server/package.json b/apps/server/package.json index 4106e22813..73e5ebf379 100644 --- a/apps/server/package.json +++ b/apps/server/package.json @@ -2,7 +2,7 @@ "name": "ontime-server", "type": "module", "main": "src/index.ts", - "version": "2.3.9", + "version": "2.7.0", "exports": "./src/index.js", "dependencies": { "body-parser": "^1.20.0", diff --git a/e2e/tests/features/204-editor-crud.spec.ts b/e2e/tests/features/204-editor-crud.spec.ts index 6f23230ef9..df4ce03b3b 100644 --- a/e2e/tests/features/204-editor-crud.spec.ts +++ b/e2e/tests/features/204-editor-crud.spec.ts @@ -17,40 +17,16 @@ test('CRUD operations on the rundown', async ({ page }) => { await page.getByTestId('quick-add-event').click(); // test quick add options - start is last end - await page - .locator('div') - .filter({ hasText: /^22SEDEvent title$/ }) - .getByTestId('time-input-timeEnd') - .click(); - await page - .locator('div') - .filter({ hasText: /^22SEDEvent title$/ }) - .getByTestId('time-input-timeEnd') - .fill('20m'); - await page - .locator('div') - .filter({ hasText: /^22SEDEvent title$/ }) - .getByTestId('time-input-timeEnd') - .press('Enter'); + await page.getByTestId('entry-2').getByTestId('time-input-timeEnd').fill('20m'); await page.getByText('Start time is last end').click(); await page.getByTestId('quick-add-event').click(); - await expect( - await page - .locator('div') - .filter({ hasText: /^33SEDEvent title$/ }) - .getByTestId('time-input-timeStart') - .inputValue(), - ).toContain('00:20:00'); + await expect(await page.getByTestId('entry-3').getByTestId('time-input-timeStart').inputValue()).toContain( + '00:20:00', + ); // test quick add options - event is public await page.locator('label').filter({ hasText: 'Event is public' }).click(); await page.getByTestId('quick-add-event').click(); - await expect( - await page - .locator('div') - .filter({ hasText: /^44SEDEvent title$/ }) - .getByRole('img') - .nth(3), - ).toHaveAttribute('data-isPublic', 'true'); + await expect(await page.getByTestId('entry-4').getByRole('img').nth(3)).toHaveAttribute('data-isPublic', 'true'); }); diff --git a/package.json b/package.json index 1a23a1d683..625ad1cd9b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ontime", - "version": "2.3.9", + "version": "2.7.0", "description": "Time keeping for live events", "keywords": [ "lighdev",