|
@@ -64,17 +64,17 @@ describe('groupDetails', () => {
|
|
|
);
|
|
|
}
|
|
|
|
|
|
- const createWrapper = (props = {selection}) => {
|
|
|
+ const createWrapper = (props = {selection}, org = organization) => {
|
|
|
return render(
|
|
|
<GroupDetails
|
|
|
{...router}
|
|
|
router={router}
|
|
|
selection={props.selection}
|
|
|
- organization={organization}
|
|
|
+ organization={org}
|
|
|
>
|
|
|
<MockComponent />
|
|
|
</GroupDetails>,
|
|
|
- {context: routerContext, organization, router}
|
|
|
+ {context: routerContext, organization: org, router}
|
|
|
);
|
|
|
};
|
|
|
|
|
@@ -245,14 +245,24 @@ describe('groupDetails', () => {
|
|
|
},
|
|
|
},
|
|
|
});
|
|
|
- act(() => ProjectsStore.reset());
|
|
|
createWrapper();
|
|
|
-
|
|
|
- act(() => ProjectsStore.loadInitialData(organization.projects));
|
|
|
-
|
|
|
expect(await screen.findByText('New Issue')).toBeInTheDocument();
|
|
|
});
|
|
|
|
|
|
+ it('renders substatus badge', async function () {
|
|
|
+ MockApiClient.addMockResponse({
|
|
|
+ url: `/issues/${group.id}/`,
|
|
|
+ body: {
|
|
|
+ ...group,
|
|
|
+ inbox: null,
|
|
|
+ status: 'unresolved',
|
|
|
+ substatus: 'ongoing',
|
|
|
+ },
|
|
|
+ });
|
|
|
+ createWrapper(undefined, {...organization, features: ['escalating-issues-ui']});
|
|
|
+ expect(await screen.findByText('Ongoing')).toBeInTheDocument();
|
|
|
+ });
|
|
|
+
|
|
|
it('renders alert for sample event', async function () {
|
|
|
const sampleGroup = TestStubs.Group({issueCategory: IssueCategory.ERROR});
|
|
|
sampleGroup.tags.push({key: 'sample_event'});
|