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
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ describe('GlobalCommandPaletteActions - project settings ordering', () => {
}
);

it('does not duplicate the current project in the list', async () => {
it.isKnownFlake('does not duplicate the current project in the list', async () => {
render(
<CommandPaletteProvider>
<GlobalCommandPaletteActions />
Expand All @@ -183,32 +183,35 @@ describe('GlobalCommandPaletteActions - project settings ordering', () => {
expect(screen.getAllByRole('option', {name: 'project-b'})).toHaveLength(1);
});

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},
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},
},
},
},
}
);
}
);

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.isKnownFlake(
'highlights all projects when multiple ?project= params are set',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ describe('EventTagsTree', () => {
});
});

it('renders tag tree', async () => {
it.isKnownFlake('renders tag tree', async () => {
render(<EventTags projectSlug={project.slug} event={event} />, {
organization,
});
Expand Down Expand Up @@ -120,7 +120,7 @@ describe('EventTagsTree', () => {
}
});

it('renders release tag differently', async () => {
it.isKnownFlake('renders release tag differently', async () => {
const releaseVersion = 'v1.0';

const releaseEvent = EventFixture({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ describe('MetricsSection', () => {
expect(screen.getByRole('button', {name: 'View more'})).toBeInTheDocument();
});

it('opens metrics drawer when view more is clicked', async () => {
it.isKnownFlake('opens metrics drawer when view more is clicked', async () => {
const mockRequestWithManyMetrics = MockApiClient.addMockResponse({
url: `/organizations/${organization.slug}/events/`,
body: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ describe('java-spring-boot onboarding docs', () => {
).toBeInTheDocument();
});

it('renders maven docs correctly', async () => {
it.isKnownFlake('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 @@ -23,7 +23,7 @@ describe('TeamKeyTransactionField', () => {
act(() => TeamStore.loadInitialData(teams));
});

it('renders with all teams checked', async () => {
it.isKnownFlake('renders with all teams checked', async () => {
const getTeamKeyTransactionsMock = MockApiClient.addMockResponse({
method: 'GET',
url: `/organizations/${organization.slug}/key-transactions-list/`,
Expand Down
45 changes: 24 additions & 21 deletions static/app/views/alerts/rules/metric/ruleConditionsForm.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,29 +63,32 @@ describe('RuleConditionsForm', () => {
jest.clearAllMocks();
});

it('searches with new searchbar (search-query-builder-alerts)', async () => {
render(
<RuleConditionsForm
{...props}
eventTypes={[]}
organization={organization}
router={router}
/>,
{
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.isKnownFlake(
'searches with new searchbar (search-query-builder-alerts)',
async () => {
render(
<RuleConditionsForm
{...props}
eventTypes={[]}
organization={organization}
router={router}
/>,
{
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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,45 +188,51 @@ describe('AssertionOpJsonPath', () => {
expect(greaterThan).not.toHaveAttribute('aria-disabled', 'true');
});

it('shows string operand types as disabled when < or > comparison is selected', async () => {
await renderOp(
makeJsonPathOp({
operator: {cmp: UptimeComparisonType.LESS_THAN},
operand: {jsonpath_op: 'literal', value: '123'},
})
);
it.isKnownFlake(
'shows string operand types as disabled when < or > comparison is selected',
async () => {
await renderOp(
makeJsonPathOp({
operator: {cmp: UptimeComparisonType.LESS_THAN},
operand: {jsonpath_op: 'literal', value: '123'},
})
);

const comparisonButton = screen.getByTestId('json-path-operators-trigger');
await userEvent.click(comparisonButton);
const comparisonButton = screen.getByTestId('json-path-operators-trigger');
await userEvent.click(comparisonButton);

const globPattern = await screen.findByRole('option', {name: 'Glob Pattern'});
const literal = await screen.findByRole('option', {name: 'Literal'});
const globPattern = await screen.findByRole('option', {name: 'Glob Pattern'});
const literal = await screen.findByRole('option', {name: 'Literal'});

expect(globPattern).toBeInTheDocument();
expect(literal).toBeInTheDocument();
expect(globPattern).toHaveAttribute('aria-disabled', 'true');
expect(literal).toHaveAttribute('aria-disabled', 'true');
});
expect(globPattern).toBeInTheDocument();
expect(literal).toBeInTheDocument();
expect(globPattern).toHaveAttribute('aria-disabled', 'true');
expect(literal).toHaveAttribute('aria-disabled', 'true');
}
);

it('shows string operand types as enabled when = or ≠ comparison is selected', async () => {
await renderOp(
makeJsonPathOp({
operator: defaultOperator,
operand: {jsonpath_op: 'literal', value: 'ok'},
})
);
it.isKnownFlake(
'shows string operand types as enabled when = or ≠ comparison is selected',
async () => {
await renderOp(
makeJsonPathOp({
operator: defaultOperator,
operand: {jsonpath_op: 'literal', value: 'ok'},
})
);

const comparisonButton = screen.getByTestId('json-path-operators-trigger');
await userEvent.click(comparisonButton);
const comparisonButton = screen.getByTestId('json-path-operators-trigger');
await userEvent.click(comparisonButton);

const globPattern = await screen.findByRole('option', {name: 'Glob Pattern'});
const literal = await screen.findByRole('option', {name: 'Literal'});
const globPattern = await screen.findByRole('option', {name: 'Glob Pattern'});
const literal = await screen.findByRole('option', {name: 'Literal'});

expect(globPattern).toBeInTheDocument();
expect(literal).toBeInTheDocument();
expect(globPattern).not.toHaveAttribute('aria-disabled', 'true');
expect(literal).not.toHaveAttribute('aria-disabled', 'true');
});
expect(globPattern).toBeInTheDocument();
expect(literal).toBeInTheDocument();
expect(globPattern).not.toHaveAttribute('aria-disabled', 'true');
expect(literal).not.toHaveAttribute('aria-disabled', 'true');
}
);

it('resets operator from < or > to equals when the operand is not numeric', async () => {
await renderOp(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ describe('SpansSearchBar', () => {
await screen.findByLabelText('span.op:function');
});

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

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

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

renderWithProvider({
Expand Down
4 changes: 2 additions & 2 deletions static/app/views/dashboards/widgetCard/widgetFrame.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ describe('WidgetFrame', () => {
expect(await screen.findByText('Actions are not supported')).toBeInTheDocument();
});

it('Renders multiple actions in a dropdown menu', async () => {
it.isKnownFlake('Renders multiple actions in a dropdown menu', async () => {
const onAction1 = jest.fn();
const onAction2 = jest.fn();

Expand Down Expand Up @@ -156,7 +156,7 @@ describe('WidgetFrame', () => {
expect(onAction2).toHaveBeenCalledTimes(1);
});

it('Allows disabling multiple actions', async () => {
it.isKnownFlake('Allows disabling multiple actions', async () => {
render(
<WidgetFrame
title="EPS"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ describe('ResultsSearchQueryBuilder', () => {
});
});

it('does not show function tags in has: dropdown', async () => {
it.isKnownFlake('does not show function tags in has: dropdown', async () => {
render(
<ResultsSearchQueryBuilder
query=""
Expand Down
2 changes: 1 addition & 1 deletion static/app/views/explore/spans/spansTab.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ describe('SpansTabContent', () => {
});
});

it('brings along the query', async () => {
it.isKnownFlake('brings along the query', async () => {
render(<SpansTabContent datePageFilterProps={datePageFilterProps} />, {
organization,
additionalWrapper: Wrapper,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ describe('MonitorForm', () => {
expect(screen.getByText('"At 5 minutes past the hour"')).toBeInTheDocument();
});

it('submits a new monitor', async () => {
it.isKnownFlake('submits a new monitor', async () => {
const mockHandleSubmitSuccess = jest.fn();

const apiEndpont = `/organizations/${organization.slug}/monitors/`;
Expand Down
2 changes: 1 addition & 1 deletion static/app/views/issueList/searchBar.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ describe('IssueListSearchBar', () => {
expect(await screen.findByRole('option', {name: 'someTag'})).toBeInTheDocument();
});

it('displays tags in the has filter', async () => {
it.isKnownFlake('displays tags in the has filter', async () => {
MockApiClient.addMockResponse({
url: '/organizations/org-slug/tags/',
body: [{key: 'someTag', name: 'Some Tag'}],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ describe('useTraceMeta', () => {
});
});

it('Collects errors from rejected api calls', async () => {
it.isKnownFlake('Collects errors from rejected api calls', async () => {
const mockRequest1 = MockApiClient.addMockResponse({
method: 'GET',
url: '/organizations/org-slug/events-trace-meta/slug1/',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ describe('ProjectDetail > ProjectVelocity', () => {
MockApiClient.clearMockResponses();
});

it('renders release count', async () => {
it.isKnownFlake('renders release count', async () => {
const previousDataEndpointMock = MockApiClient.addMockResponse({
url: `/organizations/${organization.slug}/releases/stats/`,
body: Array.from({length: 98}).map((_item, index) => ({
Expand Down Expand Up @@ -81,7 +81,7 @@ describe('ProjectDetail > ProjectVelocity', () => {
);
});

it('renders without releases', async () => {
it.isKnownFlake('renders without releases', async () => {
const dataEndpointMock = MockApiClient.addMockResponse({
url: `/organizations/${organization.slug}/releases/stats/`,
body: [],
Expand Down
4 changes: 2 additions & 2 deletions static/gsApp/components/crons/cronsBillingBanner.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ describe('CronsBillingBanner', () => {
});
});

it('Shows warning when trial is about to end', async () => {
it.isKnownFlake('Shows warning when trial is about to end', async () => {
const now = moment();
const trialEnd = now.add(5, 'days').toISOString();
const organization = OrganizationFixture();
Expand Down Expand Up @@ -70,7 +70,7 @@ describe('CronsBillingBanner', () => {
).toBeInTheDocument();
});

it('Shows warning when trial has ended', async () => {
it.isKnownFlake('Shows warning when trial has ended', async () => {
const now = moment();
const lastTrialEnd = now.subtract(5, 'days').toISOString();
const organization = OrganizationFixture();
Expand Down
Loading