Skip to content

Commit

Permalink
chore: reduce sentry error logging (#498)
Browse files Browse the repository at this point in the history
* chore: reduce sentry error logging

* chore: version bump

* chore: improve test selectors
  • Loading branch information
cpvalente authored Aug 27, 2023
1 parent 5323e62 commit a3bbd74
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 39 deletions.
2 changes: 1 addition & 1 deletion apps/client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ontime-ui",
"version": "2.3.9",
"version": "2.7.0",
"private": true,
"dependencies": {
"@chakra-ui/react": "^2.7.0",
Expand Down
2 changes: 1 addition & 1 deletion apps/client/src/features/rundown/Rundown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ export default function Rundown(props: RundownProps) {

return (
<Fragment key={entry.id}>
<div className={style.entryWrapper}>
<div className={style.entryWrapper} data-testid={`entry-${eventIndex}`}>
{entry.type === SupportedEvent.Event && <div className={style.entryIndex}>{eventIndex}</div>}
<div className={style.entry} key={entry.id} ref={hasCursor ? cursorRef : undefined}>
<RundownEntry
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ const QuickAddBlock = (props: QuickAddBlockProps) => {
size='xs'
variant='ontime-subtle-white'
className={style.quickBtn}
data-testId='quick-add-event'
data-testid='quick-add-event'
>
Event {showKbd && <span className={style.keyboard}>Alt + E</span>}
</Button>
Expand All @@ -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 && <span className={style.keyboard}>Alt + D</span>}
</Button>
Expand All @@ -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 && <span className={style.keyboard}>Alt + B</span>}
</Button>
Expand Down
4 changes: 2 additions & 2 deletions apps/client/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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],
});

Expand Down
2 changes: 1 addition & 1 deletion apps/electron/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion apps/server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
34 changes: 5 additions & 29 deletions e2e/tests/features/204-editor-crud.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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');
});
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ontime",
"version": "2.3.9",
"version": "2.7.0",
"description": "Time keeping for live events",
"keywords": [
"lighdev",
Expand Down

0 comments on commit a3bbd74

Please sign in to comment.