Skip to content
Closed
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/components/charts/eventsRequest.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ describe('EventsRequest', () => {
);
});

it.isKnownFlake('makes requests', async () => {
it('makes requests', async () => {
render(<EventsRequest {...DEFAULTS}>{mock}</EventsRequest>);
expect(mock).toHaveBeenNthCalledWith(
1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,56 +115,50 @@ 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(
<CommandPaletteProvider>
<GlobalCommandPaletteActions />
<SlotOutlets />
<CommandPalette {...makeRenderProps(jest.fn())} />
</CommandPaletteProvider>,
{
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(
<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.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/',
},
}
);
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/',
},
}
);

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 All @@ -188,35 +182,32 @@ describe('GlobalCommandPaletteActions - project settings ordering', () => {
expect(screen.getAllByRole('option', {name: 'project-b'})).toHaveLength(1);
});

it.isKnownFlake(
'places the project first when identified by a single ?project= query param',
async () => {
render(
<CommandPaletteProvider>
<GlobalCommandPaletteActions />
<SlotOutlets />
<CommandPalette {...makeRenderProps(jest.fn())} />
</CommandPaletteProvider>,
{
organization,
initialRouterConfig: {
location: {
pathname: `/organizations/${organization.slug}/issues/`,
query: {project: projectB.id},
},
it('places the project first when identified by a single ?project= query param', async () => {
render(
<CommandPaletteProvider>
<GlobalCommandPaletteActions />
<SlotOutlets />
<CommandPalette {...makeRenderProps(jest.fn())} />
</CommandPaletteProvider>,
{
organization,
initialRouterConfig: {
location: {
pathname: `/organizations/${organization.slug}/issues/`,
query: {project: projectB.id},
},
}
);
},
}
);

await drillIntoGeneralSettings();
await drillIntoGeneralSettings();

const option = (await screen.findAllByRole('option')).find(
el => !el.hasAttribute('aria-disabled')
);
expect(option).toHaveAccessibleName('project-b');
expect(screen.getByText('Current')).toBeInTheDocument();
}
);
const option = (await screen.findAllByRole('option')).find(
el => !el.hasAttribute('aria-disabled')
);
expect(option).toHaveAccessibleName('project-b');
expect(screen.getByText('Current')).toBeInTheDocument();
});

it('highlights all projects when multiple ?project= params are set', async () => {
render(
Expand Down
2 changes: 1 addition & 1 deletion static/app/components/core/form/field/baseField.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ describe('BaseField indicator', () => {
expect(mutationFn).toHaveBeenCalledWith({testField: 'changed'}, expect.anything());
});

it.isKnownFlake('shows checkmark when auto-save succeeds', async () => {
it('shows checkmark when auto-save succeeds', async () => {
const mutationFn = jest.fn((data: {testField: string}) => Promise.resolve(data));

render(<AutoSaveTestForm mutationFn={mutationFn} initialValue="initial" />);
Expand Down
2 changes: 1 addition & 1 deletion static/app/components/issueDiff/index.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ describe('IssueDiff', () => {
MockApiClient.clearMockResponses();
});

it.isKnownFlake('can dynamically import SplitDiff', async () => {
it('can dynamically import SplitDiff', async () => {
render(
<IssueDiff
baseIssueId="base"
Expand Down
63 changes: 29 additions & 34 deletions static/app/components/performance/searchBar.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,40 +36,35 @@ describe('SearchBar', () => {
});
});

it.isKnownFlake(
'Sends user input as a transaction search and shows the results',
async () => {
eventsMock = MockApiClient.addMockResponse({
url: `/organizations/${organization.slug}/events/`,
body: {
data: [{transaction: 'clients.call'}, {transaction: 'clients.fetch'}],
},
});

render(<SearchBar {...testProps} />);

await userEvent.click(screen.getByRole('textbox'));
await userEvent.paste('proje');
expect(screen.getByRole('textbox')).toHaveValue('proje');

expect(eventsMock).toHaveBeenCalledTimes(1);
expect(eventsMock).toHaveBeenCalledWith(
'/organizations/org-slug/events/',
expect.objectContaining({
query: expect.objectContaining({
query: 'transaction:*proje* event.type:transaction',
}),
})
);

expect(screen.getByText(textWithMarkupMatcher('clients.call'))).toBeInTheDocument();
expect(
screen.getByText(textWithMarkupMatcher('clients.fetch'))
).toBeInTheDocument();
}
);

it.isKnownFlake('Responds to keyboard navigation', async () => {
it('Sends user input as a transaction search and shows the results', async () => {
eventsMock = MockApiClient.addMockResponse({
url: `/organizations/${organization.slug}/events/`,
body: {
data: [{transaction: 'clients.call'}, {transaction: 'clients.fetch'}],
},
});

render(<SearchBar {...testProps} />);

await userEvent.click(screen.getByRole('textbox'));
await userEvent.paste('proje');
expect(screen.getByRole('textbox')).toHaveValue('proje');

expect(eventsMock).toHaveBeenCalledTimes(1);
expect(eventsMock).toHaveBeenCalledWith(
'/organizations/org-slug/events/',
expect.objectContaining({
query: expect.objectContaining({
query: 'transaction:*proje* event.type:transaction',
}),
})
);

expect(screen.getByText(textWithMarkupMatcher('clients.call'))).toBeInTheDocument();
expect(screen.getByText(textWithMarkupMatcher('clients.fetch'))).toBeInTheDocument();
});

it('Responds to keyboard navigation', async () => {
const onSearch = jest.fn();
eventsMock = MockApiClient.addMockResponse({
url: `/organizations/${organization.slug}/events/`,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ describe('InstallationConfigStep', () => {
});
});

it.isKnownFlake('strips trailing slashes from self-hosted URL', async () => {
it('strips trailing slashes from self-hosted URL', async () => {
const advance = jest.fn();
render(
<InstallationConfigStep
Expand Down Expand Up @@ -297,7 +297,7 @@ describe('GitLabOAuthLoginStep', () => {
expect(screen.getByRole('button', {name: 'Authorize GitLab'})).toBeInTheDocument();
});

it.isKnownFlake('calls advance with code and state on OAuth callback', async () => {
it('calls advance with code and state on OAuth callback', async () => {
const advance = jest.fn();
render(
<GitLabOAuthLoginStep
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {PackageManager} from 'sentry/gettingStartedDocs/java/utils';
import {docs} from '.';

describe('java-spring-boot onboarding docs', () => {
it.isKnownFlake('renders gradle docs correctly', async () => {
it('renders gradle docs correctly', async () => {
renderWithOnboardingLayout(docs, {
releaseRegistry: {
'sentry.java.android.gradle-plugin': {
Expand All @@ -29,7 +29,7 @@ describe('java-spring-boot onboarding docs', () => {
).toBeInTheDocument();
});

it.isKnownFlake('renders maven docs correctly', async () => {
it('renders maven docs correctly', async () => {
renderWithOnboardingLayout(docs, {
releaseRegistry: {
'sentry.java.maven-plugin': {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ describe('SpansSearchBar', () => {
await screen.findByLabelText('span.op:function');
});

it.isKnownFlake('calls onSearch with the correct query', async () => {
it('calls onSearch with the correct query', async () => {
const onSearch = jest.fn();

renderWithProvider({
Expand All @@ -145,7 +145,7 @@ describe('SpansSearchBar', () => {
});
});

it.isKnownFlake('triggers onClose when the query changes', async () => {
it('triggers onClose when the query changes', async () => {
const onClose = jest.fn();

renderWithProvider({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ describe('spansWidgetQueries', () => {
expect(await screen.findByText('low:partial')).toBeInTheDocument();
});

it.isKnownFlake('calculates the confidence for a multi series', async () => {
it('calculates the confidence for a multi series', async () => {
widget = WidgetFixture({
queries: [
{
Expand Down
Loading
Loading