Skip to content

Commit b3c1551

Browse files
committed
Apply PR feedback
1 parent 1416bfa commit b3c1551

File tree

6 files changed

+10
-9
lines changed

6 files changed

+10
-9
lines changed

opencti-platform/opencti-front/src/private/components/analyses/groupings/Root.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ const RootGrouping = () => {
137137
/>
138138
<StixDomainObjectTabsBox
139139
basePath="/dashboard/analyses/groupings"
140+
entity={grouping}
140141
tabs={[
141142
'overview',
142143
'knowledge',

opencti-platform/opencti-front/src/private/components/analyses/notes/Root.jsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { useMemo } from 'react';
2-
import { Route, Routes, useLocation, useParams } from 'react-router-dom';
2+
import { Route, Routes, useParams } from 'react-router-dom';
33
import { graphql, useSubscription } from 'react-relay';
44
import { useFormatter } from '../../../../components/i18n';
55
import Breadcrumbs from '../../../../components/Breadcrumbs';
@@ -66,7 +66,6 @@ const RootNote = () => {
6666
}),
6767
[noteId],
6868
);
69-
const location = useLocation();
7069
const { t_i18n } = useFormatter();
7170
useSubscription(subConfig);
7271
return (

opencti-platform/opencti-front/src/private/components/cases/feedbacks/Root.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ const RootFeedbackComponent = ({ queryRef, caseId }) => {
133133
redirectToContent={true}
134134
/>
135135
<StixDomainObjectTabsBox
136-
basePath="/dashboard/incidents/feedbacks"
136+
basePath="/dashboard/cases/feedbacks"
137137
entity={feedbackData}
138138
tabs={[
139139
'overview',

opencti-platform/opencti-front/src/private/components/common/stix_domain_objects/StixDomainObjectTabsBox.test.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,12 @@ describe('StixDomainObjectTabsBox', () => {
3232
basePath={basePath}
3333
/>,
3434
);
35-
const tabElem = screen.getByText(new RegExp(tabName, 'i'));
35+
const tabElem = screen.getByRole('tab', { name: new RegExp(tabName, 'i') });
3636
expect(tabElem).toBeInTheDocument();
37-
expect(tabElem).toBeInstanceOf(HTMLAnchorElement);
38-
expect((tabElem as HTMLAnchorElement).href).toMatch(new RegExp(`${basePath}/${entityId}${subroute}$`));
37+
expect(tabElem).toHaveAttribute(
38+
'href',
39+
expect.stringMatching(new RegExp(`${basePath}/${entityId}${subroute}$`)),
40+
);
3941
});
4042

4143
it('renders components passed as extraActions', () => {

opencti-platform/opencti-front/src/private/components/events/observed_data/Root.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Suspense, useMemo } from 'react';
2-
import { Route, Routes, useLocation, useParams } from 'react-router-dom';
2+
import { Route, Routes, useParams } from 'react-router-dom';
33
import { graphql, PreloadedQuery, usePreloadedQuery, useSubscription } from 'react-relay';
44
import { GraphQLSubscriptionConfig } from 'relay-runtime';
55
import { RootObservedDataSubscription } from './__generated__/RootObservedDataSubscription.graphql';
@@ -75,7 +75,6 @@ const RootObservedData = ({ queryRef, observedDataId }: RootObservedDataProps) =
7575
}), [observedDataId]);
7676

7777
const { t_i18n } = useFormatter();
78-
const location = useLocation();
7978

8079
useSubscription<RootObservedDataSubscription>(subConfig);
8180

opencti-platform/opencti-front/src/private/components/locations/regions/Root.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ const RootRegionComponent = ({ queryRef, regionId }) => {
163163
/>
164164
<StixDomainObjectTabsBox
165165
basePath="/dashboard/locations/regions"
166-
entity={position}
166+
entity={region}
167167
tabs={[
168168
'overview',
169169
'knowledge-overview',

0 commit comments

Comments
 (0)