Skip to content
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

ref: Extract <ReplayLoadingState> from ReplaySlugChooser #87812

Merged
merged 2 commits into from
Mar 26, 2025

Conversation

ryan953
Copy link
Member

@ryan953 ryan953 commented Mar 24, 2025

The updated <ReplayLoadingState> is more robust, allowing for overrides of all the loading states. These states are inconsistently checked when we load replay data in various parts of the app, and using this helper I intend to fix it.

I also extracted <ArchivedReplayAlert /> so I could have a better default; and we've got a tweak to the Props of <ReplaySlugChooser> so now it's possible to get the selected replaySlug back, instead of auto-loading it.

This makes it possible in stories to load a replay and set components into <ReplayLoadingState> if needed.

@ryan953 ryan953 requested a review from a team as a code owner March 24, 2025 22:18
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Mar 24, 2025
Copy link

codecov bot commented Mar 24, 2025

❌ 2 Tests Failed:

Tests completed Failed Passed Skipped
10005 2 10003 15
View the top 2 failed test(s) by shortest run time
AutofixSteps renders output stream when last step is processing
Stack Traces | 1.08s run time
Error: Unable to find an element with the text: Processing message. 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 waitForWrapper (.../sentry/sentry/node_modules/@.../dom/dist/wait-for.js:163:27)
    at Object.<anonymous> (.../events/autofix/autofixSteps.spec.tsx:91:44)
    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 processTicksAndRejections (node:internal/process/task_queues:105:5)
    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)
provisionSubscriptionAction calls api with correct manually invoiced on-demand args
Stack Traces | 1.09s run time
Error: Unable to find an element with the text: Enterprise (Business) (am2). 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 waitForWrapper (.../sentry/sentry/node_modules/@.../dom/dist/wait-for.js:163:27)
    at .../sentry/sentry/node_modules/@.../dom/dist/query-helpers.js:86:33
    at Object.select (.../js/sentry-test/selectEvent.tsx:103:80)
    at Object.<anonymous> (.../gsAdmin/components/provisionSubscriptionAction.spec.tsx:1077:5)
View the full list of 1 ❄️ flaky tests
provisionSubscriptionAction calls api with correct am3 dynamic sampling args

Flake rate in main: 30.77% (Passed 9 times, Failed 4 times)

Stack Traces | 5.1s run time
Error: thrown: "Exceeded timeout of 5000 ms for a test.
Add a timeout value to this test to increase the timeout, if this is a long-running test. See https://jestjs.io/docs/api#testname-fn-timeout."
    at .../gsAdmin/components/provisionSubscriptionAction.spec.tsx:953:3
    at _dispatchDescribe (.../jest-circus/build/index.js:91:26)
    at describe (.../jest-circus/build/index.js:55:5)
    at Object.<anonymous> (.../gsAdmin/components/provisionSubscriptionAction.spec.tsx:14:1)
    at Runtime._execModule (.../jest-runtime/build/index.js:1439:24)
    at Runtime._loadModule (.../jest-runtime/build/index.js:1022:12)
    at Runtime.requireModule (.../jest-runtime/build/index.js:882:12)
    at jestAdapter (.../build/legacy-code-todo-rewrite/jestAdapter.js:77:13)
    at processTicksAndRejections (node:internal/process/task_queues:105:5)
    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)

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

@ryan953 ryan953 merged commit 44bf4f8 into master Mar 26, 2025
40 checks passed
@ryan953 ryan953 deleted the ryan953/ref-archived-replay-message branch March 26, 2025 18:19
andrewshie-sentry pushed a commit that referenced this pull request Mar 27, 2025
The updated `<ReplayLoadingState>` is more robust, allowing for
overrides of all the loading states. These states are inconsistently
checked when we load replay data in various parts of the app, and using
this helper I intend to fix it.

I also extracted `<ArchivedReplayAlert />` so I could have a better
default; and we've got a tweak to the Props of `<ReplaySlugChooser>` so
now it's possible to get the selected `replaySlug` back, instead of
auto-loading it.

This makes it possible in stories to load a replay and set components
into `<ReplayLoadingState>` if needed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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