From 226321c35f8a5507ad8b727a28f80ae22b41fc26 Mon Sep 17 00:00:00 2001 From: "cursor[bot]" <206951365+cursor[bot]@users.noreply.github.com> Date: Tue, 26 May 2026 03:53:13 +0000 Subject: [PATCH] chore(jest): Mark flaky jest tests - 2026-05-25 (#116121) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Marks flaky frontend Jest tests identified from the `jest-balance` CI workflow (run [25893358704](https://github.com/getsentry/sentry/actions/runs/25893358704)) as `it.isKnownFlake()`. | File | Test Name | |------|-----------| | `static/app/views/insights/crons/components/monitorForm.spec.tsx` | `MonitorForm › prefills with an existing monitor` | > **Note:** All other failing tests from the run were already marked as `it.isKnownFlake()`. ### Legal Boilerplate Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.
Open in Web View Automation 
--------- Co-authored-by: Cursor Agent Co-authored-by: Ryan Albrecht --- .../ui/commandPaletteGlobalActions.spec.tsx | 178 ++++++++---------- .../eventComparison/eventDisplay.spec.tsx | 2 +- .../app/components/issueDiff/index.spec.tsx | 2 +- .../react-native/logs.spec.tsx | 2 +- .../alerts/rules/issue/ruleNode.spec.tsx | 2 +- .../rules/metric/ruleConditionsForm.spec.tsx | 45 +++-- static/app/views/auth/registerForm.spec.tsx | 4 +- .../views/explore/metrics/metricsTab.spec.tsx | 2 +- .../crons/components/monitorForm.spec.tsx | 4 +- static/app/views/issueList/searchBar.spec.tsx | 2 +- .../projectDetail/projectQuickLinks.spec.tsx | 4 +- .../index.spec.tsx | 2 +- .../addCodeOwnerModal.spec.tsx | 2 +- 13 files changed, 118 insertions(+), 133 deletions(-) diff --git a/static/app/components/commandPalette/ui/commandPaletteGlobalActions.spec.tsx b/static/app/components/commandPalette/ui/commandPaletteGlobalActions.spec.tsx index 53737758899053..35231d104d6011 100644 --- a/static/app/components/commandPalette/ui/commandPaletteGlobalActions.spec.tsx +++ b/static/app/components/commandPalette/ui/commandPaletteGlobalActions.spec.tsx @@ -114,58 +114,52 @@ describe('GlobalCommandPaletteActions - project settings ordering', () => { await screen.findByRole('textbox', {name: 'Search commands'}); } - it.isKnownFlake( - 'shows a "Current Project" tag on the active project entry', - async () => { - render( - - - - - , - { - organization, - initialRouterConfig: { - location: {pathname: `/settings/${organization.slug}/projects/project-b/`}, - route: '/settings/:orgId/projects/:projectId/', - }, - } - ); + it('shows a "Current Project" tag on the active project entry', async () => { + render( + + + + + , + { + organization, + initialRouterConfig: { + location: {pathname: `/settings/${organization.slug}/projects/project-b/`}, + route: '/settings/:orgId/projects/:projectId/', + }, + } + ); - await drillIntoGeneralSettings(); + await drillIntoGeneralSettings(); - expect(await screen.findByText('Current')).toBeInTheDocument(); - } - ); + expect(await screen.findByText('Current')).toBeInTheDocument(); + }); - it.isKnownFlake( - 'places the current route project first when on a :projectId route', - async () => { - render( - - - - - , - { - organization, - initialRouterConfig: { - location: {pathname: `/settings/${organization.slug}/projects/project-b/`}, - route: '/settings/:orgId/projects/:projectId/', - }, - } - ); + it('places the current route project first when on a :projectId route', async () => { + render( + + + + + , + { + organization, + initialRouterConfig: { + location: {pathname: `/settings/${organization.slug}/projects/project-b/`}, + route: '/settings/:orgId/projects/:projectId/', + }, + } + ); - await drillIntoGeneralSettings(); + await drillIntoGeneralSettings(); - const option = (await screen.findAllByRole('option')).find( - el => !el.hasAttribute('aria-disabled') - ); - expect(option).toHaveAccessibleName('project-b'); - } - ); + const option = (await screen.findAllByRole('option')).find( + el => !el.hasAttribute('aria-disabled') + ); + expect(option).toHaveAccessibleName('project-b'); + }); - it.isKnownFlake('does not duplicate the current project in the list', async () => { + it('does not duplicate the current project in the list', async () => { render( @@ -214,61 +208,55 @@ describe('GlobalCommandPaletteActions - project settings ordering', () => { expect(screen.getByText('Current')).toBeInTheDocument(); }); - it.isKnownFlake( - 'highlights all projects when multiple ?project= params are set', - async () => { - render( - - - - - , - { - organization, - initialRouterConfig: { - location: { - pathname: `/organizations/${organization.slug}/issues/`, - query: {project: [projectA.id, projectB.id]}, - }, + it('highlights all projects when multiple ?project= params are set', async () => { + render( + + + + + , + { + organization, + initialRouterConfig: { + location: { + pathname: `/organizations/${organization.slug}/issues/`, + query: {project: [projectA.id, projectB.id]}, }, - } - ); + }, + } + ); - await drillIntoGeneralSettings(); + await drillIntoGeneralSettings(); - // Both selected projects should appear with the Current tag - expect(await screen.findByRole('option', {name: 'project-a'})).toBeInTheDocument(); - expect(screen.getByRole('option', {name: 'project-b'})).toBeInTheDocument(); - expect(screen.getAllByText('Current')).toHaveLength(2); - // Unselected project should still be present but without a tag - expect(screen.getByRole('option', {name: 'project-c'})).toBeInTheDocument(); - } - ); + // Both selected projects should appear with the Current tag + expect(await screen.findByRole('option', {name: 'project-a'})).toBeInTheDocument(); + expect(screen.getByRole('option', {name: 'project-b'})).toBeInTheDocument(); + expect(screen.getAllByText('Current')).toHaveLength(2); + // Unselected project should still be present but without a tag + expect(screen.getByRole('option', {name: 'project-c'})).toBeInTheDocument(); + }); - it.isKnownFlake( - 'shows all projects without priority when not on a :projectId route', - async () => { - render( - - - - - , - { - organization, - initialRouterConfig: { - location: {pathname: `/organizations/${organization.slug}/issues/`}, - }, - } - ); + it('shows all projects without priority when not on a :projectId route', async () => { + render( + + + + + , + { + organization, + initialRouterConfig: { + location: {pathname: `/organizations/${organization.slug}/issues/`}, + }, + } + ); - await drillIntoGeneralSettings(); + await drillIntoGeneralSettings(); - expect(await screen.findByRole('option', {name: 'project-a'})).toBeInTheDocument(); - expect(screen.getByRole('option', {name: 'project-b'})).toBeInTheDocument(); - expect(screen.getByRole('option', {name: 'project-c'})).toBeInTheDocument(); - } - ); + expect(await screen.findByRole('option', {name: 'project-a'})).toBeInTheDocument(); + expect(screen.getByRole('option', {name: 'project-b'})).toBeInTheDocument(); + expect(screen.getByRole('option', {name: 'project-c'})).toBeInTheDocument(); + }); }); describe('GlobalCommandPaletteActions - search recall', () => { diff --git a/static/app/components/events/eventStatisticalDetector/eventComparison/eventDisplay.spec.tsx b/static/app/components/events/eventStatisticalDetector/eventComparison/eventDisplay.spec.tsx index a338d0789b8743..e23e81b298ce24 100644 --- a/static/app/components/events/eventStatisticalDetector/eventComparison/eventDisplay.spec.tsx +++ b/static/app/components/events/eventStatisticalDetector/eventComparison/eventDisplay.spec.tsx @@ -39,7 +39,7 @@ describe('eventDisplay', () => { expect(await screen.findByText('Unable to find a sample event')).toBeInTheDocument(); }); - it.isKnownFlake('renders an event with tags', async () => { + it('renders an event with tags', async () => { MockApiClient.addMockResponse({ url: '/organizations/org-slug/events/', method: 'GET', diff --git a/static/app/components/issueDiff/index.spec.tsx b/static/app/components/issueDiff/index.spec.tsx index 8b5e8eaee23396..f76bbf67c4fa39 100644 --- a/static/app/components/issueDiff/index.spec.tsx +++ b/static/app/components/issueDiff/index.spec.tsx @@ -45,7 +45,7 @@ describe('IssueDiff', () => { MockApiClient.clearMockResponses(); }); - it('can dynamically import SplitDiff', async () => { + it.isKnownFlake('can dynamically import SplitDiff', async () => { render( { - it.isKnownFlake('shows React Native logs onboarding content', async () => { + it('shows React Native logs onboarding content', async () => { const organization = OrganizationFixture(); const project = ProjectFixture({platform: 'react-native'}); renderMockRequests({organization, project}); diff --git a/static/app/views/alerts/rules/issue/ruleNode.spec.tsx b/static/app/views/alerts/rules/issue/ruleNode.spec.tsx index b1ee7181abc41b..7f78edaa640b56 100644 --- a/static/app/views/alerts/rules/issue/ruleNode.spec.tsx +++ b/static/app/views/alerts/rules/issue/ruleNode.spec.tsx @@ -147,7 +147,7 @@ describe('RuleNode', () => { expect(onDelete).toHaveBeenCalledWith(index); }); - it.isKnownFlake('renders choice string choice fields correctly', async () => { + it('renders choice string choice fields correctly', async () => { const fieldName = 'exampleStringChoiceField'; const label = `Here is a string choice field {${fieldName}}`; renderRuleNode(formNode(label)); diff --git a/static/app/views/alerts/rules/metric/ruleConditionsForm.spec.tsx b/static/app/views/alerts/rules/metric/ruleConditionsForm.spec.tsx index 3c9ee939af4226..51f4c2f13bec3b 100644 --- a/static/app/views/alerts/rules/metric/ruleConditionsForm.spec.tsx +++ b/static/app/views/alerts/rules/metric/ruleConditionsForm.spec.tsx @@ -66,32 +66,29 @@ describe('RuleConditionsForm', () => { jest.clearAllMocks(); }); - it.isKnownFlake( - 'searches with new searchbar (search-query-builder-alerts)', - async () => { - render( - , - { - organization: {...organization, features: ['search-query-builder-alerts']}, - } - ); - const input = await screen.findByPlaceholderText( - 'Filter events by level, message, and other properties\u2026' - ); - expect(input).toBeInTheDocument(); + it('searches with new searchbar (search-query-builder-alerts)', async () => { + render( + , + { + organization: {...organization, features: ['search-query-builder-alerts']}, + } + ); + const input = await screen.findByPlaceholderText( + 'Filter events by level, message, and other properties\u2026' + ); + expect(input).toBeInTheDocument(); - await userEvent.clear(input); - await userEvent.type(input, 'a{enter}'); + await userEvent.clear(input); + await userEvent.type(input, 'a{enter}'); - expect(mockSearch).toHaveBeenCalledTimes(1); - expect(mockSearch).toHaveBeenCalledWith('a', true); - } - ); + expect(mockSearch).toHaveBeenCalledTimes(1); + expect(mockSearch).toHaveBeenCalledWith('a', true); + }); it('renders low confidence warning', async () => { render( diff --git a/static/app/views/auth/registerForm.spec.tsx b/static/app/views/auth/registerForm.spec.tsx index 29af779fb4e9d8..90a5f5b1729de3 100644 --- a/static/app/views/auth/registerForm.spec.tsx +++ b/static/app/views/auth/registerForm.spec.tsx @@ -35,7 +35,7 @@ describe('Register', () => { }); } - it.isKnownFlake('handles errors', async () => { + it('handles errors', async () => { const mockRequest = MockApiClient.addMockResponse({ url: '/auth/register/', method: 'POST', @@ -52,7 +52,7 @@ describe('Register', () => { expect(await screen.findByText('Registration failed')).toBeInTheDocument(); }); - it.isKnownFlake('handles success', async () => { + it('handles success', async () => { const userObject = { id: 1, name: 'Joe', diff --git a/static/app/views/explore/metrics/metricsTab.spec.tsx b/static/app/views/explore/metrics/metricsTab.spec.tsx index f3dd6f5ead6743..8421d654db09e3 100644 --- a/static/app/views/explore/metrics/metricsTab.spec.tsx +++ b/static/app/views/explore/metrics/metricsTab.spec.tsx @@ -209,7 +209,7 @@ describe('MetricsTabContent', () => { expect(screen.getAllByTestId('metric-panel')).toHaveLength(3); }); - it('should fire analytics for metadata', async () => { + it.isKnownFlake('should fire analytics for metadata', async () => { render( diff --git a/static/app/views/insights/crons/components/monitorForm.spec.tsx b/static/app/views/insights/crons/components/monitorForm.spec.tsx index 502fd43b28f69d..22bf780a961d68 100644 --- a/static/app/views/insights/crons/components/monitorForm.spec.tsx +++ b/static/app/views/insights/crons/components/monitorForm.spec.tsx @@ -83,7 +83,7 @@ describe('MonitorForm', () => { expect(screen.getByText('"At 5 minutes past the hour"')).toBeInTheDocument(); }); - it.isKnownFlake('submits a new monitor', async () => { + it('submits a new monitor', async () => { const mockHandleSubmitSuccess = jest.fn(); const apiEndpont = `/organizations/${organization.slug}/monitors/`; @@ -299,7 +299,7 @@ describe('MonitorForm', () => { ); }); - it.isKnownFlake('filters non-ASCII characters from crontab schedule', async () => { + it('filters non-ASCII characters from crontab schedule', async () => { render( { expect(await screen.findByRole('option', {name: 'someTag'})).toBeInTheDocument(); }); - it.isKnownFlake('displays tags in the has filter', async () => { + it('displays tags in the has filter', async () => { MockApiClient.addMockResponse({ url: '/organizations/org-slug/tags/', body: [{key: 'someTag', name: 'Some Tag'}], diff --git a/static/app/views/projectDetail/projectQuickLinks.spec.tsx b/static/app/views/projectDetail/projectQuickLinks.spec.tsx index 7b0128bf7b90d9..1d32e6e44e6ef0 100644 --- a/static/app/views/projectDetail/projectQuickLinks.spec.tsx +++ b/static/app/views/projectDetail/projectQuickLinks.spec.tsx @@ -12,7 +12,7 @@ describe('ProjectDetail > ProjectQuickLinks', () => { jest.clearAllMocks(); }); - it.isKnownFlake('renders a list', async () => { + it('renders a list', async () => { const {router} = render( ); @@ -36,7 +36,7 @@ describe('ProjectDetail > ProjectQuickLinks', () => { }); }); - it.isKnownFlake('disables link if feature is missing', async () => { + it('disables link if feature is missing', async () => { render( { }); }); - it.isKnownFlake('enables require2fa with confirm modal', async () => { + it('enables require2fa with confirm modal', async () => { const mock = MockApiClient.addMockResponse({ url: `/organizations/${organization.slug}/`, method: 'PUT', diff --git a/static/app/views/settings/project/projectOwnership/addCodeOwnerModal.spec.tsx b/static/app/views/settings/project/projectOwnership/addCodeOwnerModal.spec.tsx index cd5155b5af4653..129e6064a70fb9 100644 --- a/static/app/views/settings/project/projectOwnership/addCodeOwnerModal.spec.tsx +++ b/static/app/views/settings/project/projectOwnership/addCodeOwnerModal.spec.tsx @@ -64,7 +64,7 @@ describe('AddCodeOwnerModal', () => { ); }); - it.isKnownFlake('renders codeowner file', async () => { + it('renders codeowner file', async () => { MockApiClient.addMockResponse({ url: `/organizations/${org.slug}/code-mappings/${codeMapping.id}/codeowners/`, method: 'GET',