Skip to content

fix(issues): Hide duplicate client_os context - #86857

Merged
scttcper merged 2 commits into
masterfrom
scttcper/client-os-hide
Mar 11, 2025
Merged

scttcper merged 2 commits into
masterfrom
scttcper/client-os-hide

Conversation

@scttcper

@scttcper scttcper commented Mar 11, 2025 •

Copy link
Copy Markdown
Member

Removes duplicate client_os that mirrors information from os that is parsed from browser user agent.

image

fixes https://github.com/getsentry/projects/issues/801

Removes duplicate client_os that mirrors information from os that is parsed from browser user agent.
@scttcper
scttcper requested a review from a team as a code owner March 11, 2025 22:59
@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Mar 11, 2025
@codecov

codecov Bot commented Mar 11, 2025 •

Copy link
Copy Markdown

❌ 5 Tests Failed:

Tests completed Failed Passed Skipped
9692 5 9687 4
View the top 3 failed test(s) by shortest run time
getHighlightContextData matches highlights on context alias
Stack Traces | 0.013s run time
Error: expect(received).toBe(expected) // Object.is equality

Expected: "os"
Received: "client_os"
    at .../events/highlights/util.spec.tsx:66:38
    at Object.<anonymous> (.../jest-each/build/bind.js:81:13)
    at Promise.then.completed (.../jest-circus/build/utils.js:298:28)
    at new Promise (<anonymous>)
    at callAsyncCircusFn (.../jest-circus/build/utils.js:231:10)
    at _callCircusTest (.../jest-circus/build/run.js:316:40)
    at processTicksAndRejections (node:internal/process/task_queues:105:5)
    at _runTest (.../jest-circus/build/run.js:252:3)
    at _runTestsForDescribeBlock (.../jest-circus/build/run.js:126:9)
    at _runTestsForDescribeBlock (.../jest-circus/build/run.js:121:9)
    at run (.../jest-circus/build/run.js:71:3)
    at runAndTransformResultsToJestFormat (.../build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)
    at jestAdapter (.../build/legacy-code-todo-rewrite/jestAdapter.js:79:19)
    at runTestInternal (.../jest-runner/build/runTest.js:367:16)
    at runTest (.../jest-runner/build/runTest.js:444:34)
    at Object.worker (.../jest-runner/build/testWorker.js:106:12)
EditHighlightsModal should update context section from user selection
Stack Traces | 0.126s run time
TestingLibraryElementError: Found multiple elements with the text: /os/i

Here are the matching elements:

Ignored nodes: comments, script, style
...

Ignored nodes: comments, script, style
...

(If this is intentional, then use the `*AllBy*` variant of the query (like `queryAllByText`, `getAllByText`, or `findAllByText`)).

Ignored nodes: comments, script, style
...
    at Object.getElementError (.../sentry/sentry/node_modules/@.../dom/dist/config.js:37:19)
    at getElementError (.../sentry/sentry/node_modules/@.../dom/dist/query-helpers.js:20:35)
    at getMultipleElementsFoundError (.../sentry/sentry/node_modules/@.../dom/dist/query-helpers.js:23:10)
    at .../sentry/sentry/node_modules/@.../dom/dist/query-helpers.js:55:13
    at .../sentry/sentry/node_modules/@.../dom/dist/query-helpers.js:95:19
    at .../events/highlights/editHighlightsModal.spec.tsx:237:70
    at Array.map (<anonymous>)
    at Object.<anonymous> (.../events/highlights/editHighlightsModal.spec.tsx:236:60)
    at Promise.then.completed (.../sentry/sentry/node_modules/jest-circus/build/utils.js:298:28)
    at new Promise (<anonymous>)
    at callAsyncCircusFn (.../sentry/sentry/node_modules/jest-circus/build/utils.js:231:10)
    at _callCircusTest (.../sentry/sentry/node_modules/jest-circus/build/run.js:316:40)
    at _runTest (.../sentry/sentry/node_modules/jest-circus/build/run.js:252:3)
    at _runTestsForDescribeBlock (.../sentry/sentry/node_modules/jest-circus/build/run.js:126:9)
    at _runTestsForDescribeBlock (.../sentry/sentry/node_modules/jest-circus/build/run.js:121:9)
    at run (.../sentry/sentry/node_modules/jest-circus/build/run.js:71:3)
    at runAndTransformResultsToJestFormat (.../sentry/sentry/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)
    at jestAdapter (.../sentry/sentry/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)
    at runTestInternal (.../sentry/sentry/node_modules/jest-runner/build/runTest.js:367:16)
    at runTest (.../sentry/sentry/node_modules/jest-runner/build/runTest.js:444:34)
    at Object.worker (.../sentry/sentry/node_modules/jest-runner/build/testWorker.js:106:12)
EditHighlightsModal should update preview section from user selection
Stack Traces | 0.182s run time
TestingLibraryElementError: Unable to find an element with the text: Client Os: Name. This could be because the text is broken up by multiple elements. In this case, you can provide a function for your text matcher to make your matcher more flexible.

Ignored nodes: comments, script, style
...
    at Object.getElementError (.../sentry/sentry/node_modules/@.../dom/dist/config.js:37:19)
    at .../sentry/sentry/node_modules/@.../dom/dist/query-helpers.js:76:38
    at .../sentry/sentry/node_modules/@.../dom/dist/query-helpers.js:52:17
    at .../sentry/sentry/node_modules/@.../dom/dist/query-helpers.js:95:19
    at .../events/highlights/editHighlightsModal.spec.tsx:127:76
    at Array.forEach (<anonymous>)
    at Object.<anonymous> (.../events/highlights/editHighlightsModal.spec.tsx:126:28)
    at Promise.then.completed (.../sentry/sentry/node_modules/jest-circus/build/utils.js:298:28)
    at new Promise (<anonymous>)
    at callAsyncCircusFn (.../sentry/sentry/node_modules/jest-circus/build/utils.js:231:10)
    at _callCircusTest (.../sentry/sentry/node_modules/jest-circus/build/run.js:316:40)
    at _runTest (.../sentry/sentry/node_modules/jest-circus/build/run.js:252:3)
    at _runTestsForDescribeBlock (.../sentry/sentry/node_modules/jest-circus/build/run.js:126:9)
    at _runTestsForDescribeBlock (.../sentry/sentry/node_modules/jest-circus/build/run.js:121:9)
    at run (.../sentry/sentry/node_modules/jest-circus/build/run.js:71:3)
    at runAndTransformResultsToJestFormat (.../sentry/sentry/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)
    at jestAdapter (.../sentry/sentry/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)
    at runTestInternal (.../sentry/sentry/node_modules/jest-runner/build/runTest.js:367:16)
    at runTest (.../sentry/sentry/node_modules/jest-runner/build/runTest.js:444:34)
    at Object.worker (.../sentry/sentry/node_modules/jest-runner/build/testWorker.js:106:12)

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

@scttcper
scttcper merged commit fb98329 into master Mar 11, 2025
@scttcper
scttcper deleted the scttcper/client-os-hide branch March 11, 2025 23:43
@github-actions github-actions Bot locked and limited conversation to collaborators Mar 27, 2025

This branch was successfully deployed

1 active deployment
Preview — d38f7803 Deployed Mar 11, 2025 by vercel[bot]
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants