Skip to content

test(tracing): Add tests for backgroundtab. #4443

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Feb 2, 2022

Conversation

onurtemizkan
Copy link
Collaborator

Part of: #4262

@github-actions
Copy link
Contributor

github-actions bot commented Jan 21, 2022

size-limit report

Path Base Size (6309dd6) Current Size Change
@sentry/browser - CDN Bundle (gzipped) 19.68 KB 19.68 KB +0.01% 🔺
@sentry/browser - CDN Bundle (minified) 62.89 KB 62.9 KB +0.01% 🔺
@sentry/browser - Webpack 22.21 KB 22.21 KB 0%
@sentry/browser - Webpack - gzip = false 76.02 KB 76.02 KB 0%
@sentry/react - Webpack 22.24 KB 22.24 KB 0%
@sentry/nextjs Client - Webpack 46.24 KB 46.24 KB 0%
@sentry/browser + @sentry/tracing - CDN Bundle (gzipped) 28.22 KB 28.23 KB +0.02% 🔺

Copy link
Member

@AbhiPrasad AbhiPrasad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we also test that pageload ends with the backgroundtab detection?

Object.defineProperty(document, 'hidden', { value: true, writable: true });
const ev = document.createEvent('Event');
ev.initEvent('visibilitychange');
document.dispatchEvent(ev);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah this isn't the nicest, but I guess there isn't really a better way around it.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have tried a couple of things to simulate opening/focusing to a new tab, but none worked. :/

@AbhiPrasad AbhiPrasad enabled auto-merge (squash) February 2, 2022 18:32
@AbhiPrasad AbhiPrasad merged commit b6a6142 into master Feb 2, 2022
@AbhiPrasad AbhiPrasad deleted the onur/int-tests-background-tab branch February 2, 2022 18:44
@AbhiPrasad AbhiPrasad added this to the Release Stability milestone Feb 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants