Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion static/app/bootstrap/boostrapRequests.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ describe('useBootstrapTeamsQuery', () => {
TeamStore.reset();
});

it('updates team store with fetched data', async () => {
it.isKnownFlake('updates team store with fetched data', async () => {
MockApiClient.addMockResponse({
url: `/organizations/${orgSlug}/teams/`,
body: mockTeams,
Expand Down
2 changes: 1 addition & 1 deletion static/app/components/actions/archive.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ describe('ArchiveActions', () => {
});
});

it('archives forever', async () => {
it.isKnownFlake('archives forever', async () => {
render(<ArchiveActions onUpdate={onUpdate} />);

await userEvent.click(screen.getByRole('button', {name: 'Archive options'}));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,50 +104,56 @@ describe('GlobalCommandPaletteActions - project settings ordering', () => {
await screen.findByRole('textbox', {name: 'Search commands'});
}

it('shows a "Current Project" tag on the active project entry', async () => {
render(
<CommandPaletteProvider>
<GlobalCommandPaletteActions />
<SlotOutlets />
<CommandPalette {...makeRenderProps(jest.fn())} />
</CommandPaletteProvider>,
{
organization,
initialRouterConfig: {
location: {pathname: `/settings/${organization.slug}/projects/project-b/`},
route: '/settings/:orgId/projects/:projectId/',
},
}
);
it.isKnownFlake(
'shows a "Current Project" tag on the active project entry',
async () => {
render(
<CommandPaletteProvider>
<GlobalCommandPaletteActions />
<SlotOutlets />
<CommandPalette {...makeRenderProps(jest.fn())} />
</CommandPaletteProvider>,
{
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('places the current route project first when on a :projectId route', async () => {
render(
<CommandPaletteProvider>
<GlobalCommandPaletteActions />
<SlotOutlets />
<CommandPalette {...makeRenderProps(jest.fn())} />
</CommandPaletteProvider>,
{
organization,
initialRouterConfig: {
location: {pathname: `/settings/${organization.slug}/projects/project-b/`},
route: '/settings/:orgId/projects/:projectId/',
},
}
);
it.isKnownFlake(
'places the current route project first when on a :projectId route',
async () => {
render(
<CommandPaletteProvider>
<GlobalCommandPaletteActions />
<SlotOutlets />
<CommandPalette {...makeRenderProps(jest.fn())} />
</CommandPaletteProvider>,
{
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('does not duplicate the current project in the list', async () => {
render(
Expand Down Expand Up @@ -198,33 +204,36 @@ describe('GlobalCommandPaletteActions - project settings ordering', () => {
expect(screen.getByText('Current')).toBeInTheDocument();
});

it('highlights all projects when multiple ?project= params are set', async () => {
render(
<CommandPaletteProvider>
<GlobalCommandPaletteActions />
<SlotOutlets />
<CommandPalette {...makeRenderProps(jest.fn())} />
</CommandPaletteProvider>,
{
organization,
initialRouterConfig: {
location: {
pathname: `/organizations/${organization.slug}/issues/`,
query: {project: [projectA.id, projectB.id]},
it.isKnownFlake(
'highlights all projects when multiple ?project= params are set',
async () => {
render(
<CommandPaletteProvider>
<GlobalCommandPaletteActions />
<SlotOutlets />
<CommandPalette {...makeRenderProps(jest.fn())} />
</CommandPaletteProvider>,
{
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('shows all projects without priority when not on a :projectId route', async () => {
render(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ describe('AutofixOutputStream', () => {
});
});

it('renders basic stream content', async () => {
it.isKnownFlake('renders basic stream content', async () => {
render(
<AutofixOutputStream
stream="Hello World"
Expand Down
19 changes: 8 additions & 11 deletions static/app/components/events/eventReplay/index.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -137,17 +137,14 @@ describe('EventReplay', () => {
});
});

it.isKnownFlake(
'should render the replay inline onboarding component when replays are enabled and the project supports replay',
async () => {
MockUseReplayOnboardingSidebarPanel.mockReturnValue({
activateSidebar: jest.fn(),
});
render(<EventReplay {...defaultProps} />, {organization});

expect(await screen.findByTestId('replay-inline-onboarding')).toBeInTheDocument();
}
);
it('should render the replay inline onboarding component when replays are enabled and the project supports replay', async () => {
MockUseReplayOnboardingSidebarPanel.mockReturnValue({
activateSidebar: jest.fn(),
});
render(<EventReplay {...defaultProps} />, {organization});

expect(await screen.findByTestId('replay-inline-onboarding')).toBeInTheDocument();
});

it('should render a replay when there is a replayId from tags', async () => {
MockUseReplayOnboardingSidebarPanel.mockReturnValue({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ describe('StacktraceLink', () => {
HookStore.init?.();
});

it('renders setup CTA with integration but no configs', async () => {
it.isKnownFlake('renders setup CTA with integration but no configs', async () => {
MockApiClient.addMockResponse({
url: `/projects/${org.slug}/${project.slug}/stacktrace-link/`,
body: {config: null, sourceUrl: null, integrations: [integration]},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ describe('SpanEvidencePreview', () => {
expect(mock).not.toHaveBeenCalled();
});

it.isKnownFlake('shows error when request fails', async () => {
it('shows error when request fails', async () => {
MockApiClient.addMockResponse({
url: '/organizations/org-slug/issues/group-id/events/recommended/',
body: {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ describe('getting started with log4j2', () => {
).toBeInTheDocument();
});

it('renders maven docs correctly', async () => {
it.isKnownFlake('renders maven docs correctly', async () => {
renderWithOnboardingLayout(docs, {
releaseRegistry: {
'sentry.java.maven-plugin': {
Expand Down
2 changes: 1 addition & 1 deletion static/app/gettingStartedDocs/react-native/logs.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ function renderMockRequests({
}

describe('getting started with react-native', () => {
it('shows React Native logs onboarding content', async () => {
it.isKnownFlake('shows React Native logs onboarding content', async () => {
const organization = OrganizationFixture();
const project = ProjectFixture({platform: 'react-native'});
renderMockRequests({organization, project});
Expand Down
Loading
Loading