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(tsc): Convert changePlanAction to FC #88285

Merged
merged 10 commits into from
Apr 3, 2025

Conversation

isabellaenriquez
Copy link
Member

@isabellaenriquez isabellaenriquez commented Mar 28, 2025

Refs https://github.com/getsentry/frontend-tsc/issues/2

This PR converts changePlanAction to FC along with the following improvements:

  • Cleans up tests, particularly those in customerDetails that were testing the modal when those tests should've been in the suite for changePlanAction instead
  • One API call to get billing configs as opposed to 4
  • Eliminates hardcoding of categories!
  • Simplified state management, largely by taking advantage of Forms

@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Mar 28, 2025
Copy link

codecov bot commented Mar 28, 2025

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
10063 1 10062 5
View the top 1 failed test(s) by shortest run time
Subscription > PendingChanges renders on-demand to pay-as-you go pending changes for am2 to am3
Stack Traces | 0.023s run time
TestingLibraryElementError: Unable to find an element with the text: Pay-as-you-go budget change from per-category on-demand (errors at $10, performance units at $0, replays at $0, attachments at $0, cron monitors at $0, continuous profile hours at $0, UI profile hours at $0, and uptime monitors at $0) to shared pay-as-you-go of $50. 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 Object.<anonymous> (.../views/subscriptionPage/pendingChanges.spec.tsx:396:40)
    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)

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

@isabellaenriquez isabellaenriquez marked this pull request as ready for review April 1, 2025 17:26
@isabellaenriquez isabellaenriquez requested a review from a team as a code owner April 1, 2025 17:26
@isabellaenriquez isabellaenriquez requested a review from a team April 1, 2025 17:26
@isabellaenriquez isabellaenriquez requested a review from a team April 1, 2025 22:01
@isabellaenriquez isabellaenriquez merged commit 8db3242 into master Apr 3, 2025
40 checks passed
@isabellaenriquez isabellaenriquez deleted the isabella/change-plan-fc branch April 3, 2025 16:29
andrewshie-sentry pushed a commit that referenced this pull request Apr 8, 2025
Refs getsentry/frontend-tsc#2

This PR converts `changePlanAction` to FC along with the following
improvements:
- Cleans up tests, particularly those in `customerDetails` that were
testing the modal when those tests should've been in the suite for
`changePlanAction` instead
- One API call to get billing configs as opposed to 4 
- Eliminates hardcoding of categories!
- Simplified state management, largely by taking advantage of Forms
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.

4 participants