Skip to content

ref(js): Remove acceptance test env and related code #93538

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

evanpurkhiser
Copy link
Member

IS_ACCEPTANCE_TEST and its associated dynamic text/static text behavior were removed from the codebase.

Changes include:

  • The IS_ACCEPTANCE_TEST constant was removed from static/app/constants/index.tsx.
  • Build configurations in rspack.config.ts and config/build-chartcuterie.ts were updated to remove references to IS_ACCEPTANCE_TEST.
  • The getDynamicText utility in static/app/utils/getDynamicText.tsx was simplified to always return the value parameter, eliminating the conditional fixed text behavior. Its corresponding test file, static/app/utils/getDynamicText.spec.tsx, was deleted.
  • The testableTransition utility in static/app/utils/testableTransition.tsx was simplified to always return the provided transition, removing logic that conditionally disabled animations for acceptance tests.
  • The useResizable hook and related constants (SECONDARY_SIDEBAR_MIN_WIDTH, SECONDARY_SIDEBAR_MAX_WIDTH) were removed, simplifying static/app/views/nav/secondary/secondarySidebar.tsx and static/app/views/nav/sidebar.tsx.
  • Conditional logic relying on deprecateTransactionAlerts was removed from static/app/views/discover/savedQuery/index.tsx, static/app/views/performance/transactionSummary/header.tsx, and static/app/views/performance/vitalDetail/vitalDetailContent.tsx.
  • Test files static/app/views/explore/multiQueryMode/queryConstructors/menu.tsx and static/app/views/explore/multiQueryMode/locationUtils.tsx were updated, and static/app/views/explore/multiQueryMode/queryRow.tsx was adjusted to remove duplicate/delete query functionality.
  • The build-acceptance script in package.json was modified to remove only the IS_ACCEPTANCE_TEST=1 environment variable, preserving the script itself.

This streamlines the codebase by removing legacy testing-specific conditional rendering and animation logic.

@evanpurkhiser evanpurkhiser requested a review from a team as a code owner June 13, 2025 18:32
@evanpurkhiser evanpurkhiser changed the title Remove acceptance test environment flags and related code ref(js): Remove acceptance test env and related code Jun 13, 2025
@github-actions github-actions bot added Scope: Frontend Automatically applied to PRs that change frontend components Scope: Backend Automatically applied to PRs that change backend components labels Jun 13, 2025
Copy link
Contributor

🚨 Warning: This pull request contains Frontend and Backend changes!

It's discouraged to make changes to Sentry's Frontend and Backend in a single pull request. The Frontend and Backend are not atomically deployed. If the changes are interdependent of each other, they must be separated into two pull requests and be made forward or backwards compatible, such that the Backend or Frontend can be safely deployed independently.

Have questions? Please ask in the #discuss-dev-infra channel.

Copy link

codecov bot commented Jun 13, 2025

❌ 7 Tests Failed:

Tests completed Failed Passed Skipped
37168 7 37161 240
View the top 3 failed test(s) by shortest run time
DeleteBillingMetricHistory closes modal when Cancel button is clicked
Stack Traces | 0.083s run time
Error: expect(element).not.toBeInTheDocument()

expected document not to contain element, found <header class="css-11ph1ym-ModalHeader eoiks233">Delete Billing Metric History<button aria-label="Close Modal" class="e1b0h4f90 eoiks232 css-1h6a9m9-StyledButton-getFocusState-getColors-getSizeStyles-getBoxShadow-DO_NOT_USE_getButtonStyles-DO_NOT_USE_getButtonStyles-CloseButton-withChonk e140qn372" role="button" type="button"><span class="css-1cv7pa9-InteractionStateLayer-InteractionStateLayer-InteractionStateLayer-InteractionStateLayer e18pngx40" role="presentation" /><span class="css-18eu2j5-ButtonLabel e140qn371"><span class="css-1prnm9c-Icon e140qn370"><svg data-test-id="icon-close" fill="currentColor" height="12px" kind="path" role="img" viewBox="0 0 16 16" width="12px"><path d="M6.94,8,1.47,13.47a.75.75,0,0,0,0,1.06.75.75,0,0,0,1.06,0L8,9.06l5.47,5.47a.75.75,0,0,0,1.06,0,.75.75,0,0,0,0-1.06L9.06,8l5.47-5.47a.75.75,0,0,0-1.06-1.06L8,6.94,2.53,1.47A.75.75,0,0,0,1.47,2.53Z" /></svg></span></span></button></header> instead
    at Object.<anonymous> (.../gsAdmin/components/deleteBillingMetricHistory.spec.tsx:339:90)
Confirm async onConfirm should not close the modal until the promise is resolved
Stack Traces | 0.105s run time
Error: expect(element).not.toBeInTheDocument()

expected document not to contain element, found <div aria-modal="true" class="css-1138fj1-Modal e1g5id4l1" role="dialog" style="opacity: 0; transform: translateY(14.791856729376342px);"><div class="css-1c9jtkf-Content e1g5id4l0" role="document"><section class="css-c7spxd-ModalBody eoiks231"><p style="word-wrap: break-word;">Are you sure?</p></section><footer class="css-1w0jaa6-ModalFooter eoiks230"><div class="css-105g0bz-StyledButtonBar e1mlz5570"><button aria-label="Cancel" class="css-1xp630d-StyledButton-getColors-getFocusState-getColors-getSizeStyles-getBoxShadow-DO_NOT_USE_getButtonStyles e140qn372" role="button" type="button"><span class="css-1cv7pa9-InteractionStateLayer-InteractionStateLayer-InteractionStateLayer-InteractionStateLayer e18pngx40" role="presentation" /><span class="css-18eu2j5-ButtonLabel e140qn371">Cancel</span></button><button aria-disabled="true" aria-label="Confirm" class="css-ariwwp-StyledButton-getColors-getFocusState-getColors-getSizeStyles-getBoxShadow-DO_NOT_USE_getButtonStyles e140qn372" data-test-id="confirm-button" disabled="" role="button" type="button"><span class="css-1hrcpgg-InteractionStateLayer-InteractionStateLayer-InteractionStateLayer-InteractionStateLayer e18pngx40" role="presentation" /><span class="css-18eu2j5-ButtonLabel e140qn371">Confirm</span></button></div></footer></div></div> instead

Ignored nodes: comments, script, style
...
    at .../app/components/confirm.spec.tsx:159:71
    at runWithExpensiveErrorDiagnosticsDisabled (.../sentry/node_modules/.pnpm/@[email protected]/node_modules/@.../dom/dist/config.js:47:12)
    at checkCallback (.../sentry/node_modules/.pnpm/@[email protected]/node_modules/@.../dom/dist/wait-for.js:124:77)
    at .../sentry/node_modules/.pnpm/@[email protected]/node_modules/@.../dom/dist/wait-for.js:82:9
IssueViewsHeader edit menu can delete a view
Stack Traces | 0.243s run time
Error: expect(element).not.toBeInTheDocument()

expected document not to contain element, found <div aria-modal="true" class="css-1138fj1-Modal e1g5id4l1" role="dialog" style="opacity: 0.1937097122782042; transform: translateY(-7.546396955942445px);"><div class="css-1c9jtkf-Content e1g5id4l0" role="document"><section class="css-c7spxd-ModalBody eoiks231"><p style="word-wrap: break-word;">Are you sure you want to delete the view "Test View"?</p></section><footer class="css-1w0jaa6-ModalFooter eoiks230"><div class="css-105g0bz-StyledButtonBar e1mlz5570"><button aria-label="Cancel" class="css-1xp630d-StyledButton-getColors-getFocusState-getColors-getSizeStyles-getBoxShadow-DO_NOT_USE_getButtonStyles e140qn372" role="button" type="button"><span class="css-1cv7pa9-InteractionStateLayer-InteractionStateLayer-InteractionStateLayer-InteractionStateLayer e18pngx40" role="presentation" /><span class="css-18eu2j5-ButtonLabel e140qn371">Cancel</span></button><button aria-disabled="true" aria-label="Delete View" class="css-ariwwp-StyledButton-getColors-getFocusState-getColors-getSizeStyles-getBoxShadow-DO_NOT_USE_getButtonStyles e140qn372" data-test-id="confirm-button" disabled="" role="button" type="button"><span class="css-1hrcpgg-InteractionStateLayer-InteractionStateLayer-InteractionStateLayer-InteractionStateLayer e18pngx40" role="presentation" /><span class="css-18eu2j5-ButtonLabel e140qn371">Delete View</span></button></div></footer></div></div> instead
    at Object.<anonymous> (.../views/issueList/issueViewsHeader.spec.tsx:95:69)

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

Comment on lines -23 to -28
return {
delay: 0,
staggerChildren: 0,
type: false,
};
};
Copy link
Member

Choose a reason for hiding this comment

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

pretty sure jest tests use this

Copy link
Member

Choose a reason for hiding this comment

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

will make tests that open drawers or modals slower

Copy link
Member

Choose a reason for hiding this comment

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

i'd say keep this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Scope: Backend Automatically applied to PRs that change backend components 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