Skip to content

Commit

Permalink
fix timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
mydea committed Jul 24, 2023
1 parent d02b5cc commit a57bcf0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ sentryTest('mutation after threshold results in slow click', async ({ forceFlush
]);

expect(slowClickBreadcrumbs[0]?.data?.timeAfterClickMs).toBeGreaterThan(3000);
expect(slowClickBreadcrumbs[0]?.data?.timeAfterClickMs).toBeLessThan(3100);
expect(slowClickBreadcrumbs[0]?.data?.timeAfterClickMs).toBeLessThan(3500);
});

sentryTest('multiple clicks are counted', async ({ getLocalTestUrl, page }) => {
Expand Down Expand Up @@ -123,7 +123,7 @@ sentryTest('multiple clicks are counted', async ({ getLocalTestUrl, page }) => {
expect(multiClickBreadcrumbs.length).toEqual(0);

expect(slowClickBreadcrumbs[0]?.data?.timeAfterClickMs).toBeGreaterThan(3000);
expect(slowClickBreadcrumbs[0]?.data?.timeAfterClickMs).toBeLessThan(3100);
expect(slowClickBreadcrumbs[0]?.data?.timeAfterClickMs).toBeLessThan(3500);
});

sentryTest('immediate mutation does not trigger slow click', async ({ forceFlushReplay, getLocalTestUrl, page }) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ <h1 id="h2">Bottom</h1>
document.getElementById('mutationButtonLate').addEventListener('click', () => {
setTimeout(() => {
document.getElementById('out').innerHTML += 'mutationButtonLate clicked<br>';
}, 3101);
}, 3501);
});
document.getElementById('mutationButtonImmediately').addEventListener('click', () => {
document.getElementById('out').innerHTML += 'mutationButtonImmediately clicked<br>';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ sentryTest('mutation after timeout results in slow click', async ({ getLocalTest
textContent: '******* ******** ****',
},
nodeId: expect.any(Number),
timeAfterClickMs: 3100,
timeAfterClickMs: 3500,
url: 'http://sentry-test.io/index.html',
},
message: 'body > button#mutationButtonLate',
Expand Down Expand Up @@ -108,7 +108,7 @@ sentryTest('console.log results in slow click', async ({ getLocalTestUrl, page }
textContent: '******* ******* ***',
},
nodeId: expect.any(Number),
timeAfterClickMs: 3100,
timeAfterClickMs: 3500,
url: 'http://sentry-test.io/index.html',
},
message: 'body > button#consoleLogButton',
Expand Down

0 comments on commit a57bcf0

Please sign in to comment.