Skip to content
Merged
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 @@ -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(
<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.isKnownFlake('does not duplicate the current project in the list', async () => {
it('does not duplicate the current project in the list', async () => {
render(
<CommandPaletteProvider>
<GlobalCommandPaletteActions />
Expand Down Expand Up @@ -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(
<CommandPaletteProvider>
<GlobalCommandPaletteActions />
<SlotOutlets />
<CommandPalette {...makeRenderProps(jest.fn())} />
</CommandPaletteProvider>,
{
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(
<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.isKnownFlake(
'shows all projects without priority when not on a :projectId route',
async () => {
render(
<CommandPaletteProvider>
<GlobalCommandPaletteActions />
<SlotOutlets />
<CommandPalette {...makeRenderProps(jest.fn())} />
</CommandPaletteProvider>,
{
organization,
initialRouterConfig: {
location: {pathname: `/organizations/${organization.slug}/issues/`},
},
}
);
it('shows all projects without priority when not on a :projectId route', async () => {
render(
<CommandPaletteProvider>
<GlobalCommandPaletteActions />
<SlotOutlets />
<CommandPalette {...makeRenderProps(jest.fn())} />
</CommandPaletteProvider>,
{
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', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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',
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('can dynamically import SplitDiff', async () => {
it.isKnownFlake('can dynamically import SplitDiff', async () => {
render(
<IssueDiff
baseIssueId="base"
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.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});
Expand Down
2 changes: 1 addition & 1 deletion static/app/views/alerts/rules/issue/ruleNode.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down
45 changes: 21 additions & 24 deletions static/app/views/alerts/rules/metric/ruleConditionsForm.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,32 +66,29 @@ describe('RuleConditionsForm', () => {
jest.clearAllMocks();
});

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();
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();

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
4 changes: 2 additions & 2 deletions static/app/views/auth/registerForm.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ describe('Register', () => {
});
}

it.isKnownFlake('handles errors', async () => {
it('handles errors', async () => {
const mockRequest = MockApiClient.addMockResponse({
url: '/auth/register/',
method: 'POST',
Expand All @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion static/app/views/explore/metrics/metricsTab.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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(
<ProviderWrapper>
<MetricsTabContent datePageFilterProps={datePageFilterProps} />
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.isKnownFlake('submits a new monitor', async () => {
it('submits a new monitor', async () => {
const mockHandleSubmitSuccess = jest.fn();

const apiEndpont = `/organizations/${organization.slug}/monitors/`;
Expand Down Expand Up @@ -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(
<MonitorForm
apiMethod="POST"
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.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'}],
Expand Down
4 changes: 2 additions & 2 deletions static/app/views/projectDetail/projectQuickLinks.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ describe('ProjectDetail > ProjectQuickLinks', () => {
jest.clearAllMocks();
});

it.isKnownFlake('renders a list', async () => {
it('renders a list', async () => {
const {router} = render(
<ProjectQuickLinks organization={organization} project={ProjectFixture()} />
);
Expand All @@ -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(
<ProjectQuickLinks
organization={{...organization, features: []}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ describe('OrganizationSecurityAndPrivacy', () => {
});
});

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',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
Loading