aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps/quality-profiles/changelog
diff options
context:
space:
mode:
authorJeremy Davis <jeremy.davis@sonarsource.com>2020-12-09 14:43:36 +0100
committersonartech <sonartech@sonarsource.com>2020-12-22 20:09:35 +0000
commit8556ba8e2bedb1591c9e8510606d75bfdedbdf3d (patch)
tree48b66893ef9422e42ad978d8711dce41d20612ee /server/sonar-web/src/main/js/apps/quality-profiles/changelog
parentc73de56d4b6ab4c9fdb34a32f5f740bed672b586 (diff)
downloadsonarqube-8556ba8e2bedb1591c9e8510606d75bfdedbdf3d.tar.gz
sonarqube-8556ba8e2bedb1591c9e8510606d75bfdedbdf3d.zip
SONAR-13999 Drop orgs from Quality Profiles
Diffstat (limited to 'server/sonar-web/src/main/js/apps/quality-profiles/changelog')
-rw-r--r--server/sonar-web/src/main/js/apps/quality-profiles/changelog/Changelog.tsx1
-rw-r--r--server/sonar-web/src/main/js/apps/quality-profiles/changelog/ChangelogContainer.tsx3
-rw-r--r--server/sonar-web/src/main/js/apps/quality-profiles/changelog/__tests__/Changelog-test.tsx16
-rw-r--r--server/sonar-web/src/main/js/apps/quality-profiles/changelog/__tests__/ChangelogContainer-test.tsx1
-rw-r--r--server/sonar-web/src/main/js/apps/quality-profiles/changelog/__tests__/__snapshots__/ChangelogContainer-test.tsx.snap1
5 files changed, 9 insertions, 13 deletions
diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/changelog/Changelog.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/changelog/Changelog.tsx
index 46ad79220e9..266fe944921 100644
--- a/server/sonar-web/src/main/js/apps/quality-profiles/changelog/Changelog.tsx
+++ b/server/sonar-web/src/main/js/apps/quality-profiles/changelog/Changelog.tsx
@@ -30,7 +30,6 @@ import ChangesList from './ChangesList';
interface Props {
events: ProfileChangelogEvent[];
- organization: string | null;
}
export default function Changelog(props: Props) {
diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/changelog/ChangelogContainer.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/changelog/ChangelogContainer.tsx
index add7cd632a0..9a99212ca77 100644
--- a/server/sonar-web/src/main/js/apps/quality-profiles/changelog/ChangelogContainer.tsx
+++ b/server/sonar-web/src/main/js/apps/quality-profiles/changelog/ChangelogContainer.tsx
@@ -30,7 +30,6 @@ import ChangelogEmpty from './ChangelogEmpty';
import ChangelogSearch from './ChangelogSearch';
interface Props extends Pick<WithRouterProps, 'router' | 'location'> {
- organization: string | null;
profile: Profile;
}
@@ -152,7 +151,7 @@ export class ChangelogContainer extends React.PureComponent<Props, State> {
{this.state.events != null && this.state.events.length === 0 && <ChangelogEmpty />}
{this.state.events != null && this.state.events.length > 0 && (
- <Changelog events={this.state.events} organization={this.props.organization} />
+ <Changelog events={this.state.events} />
)}
{shouldDisplayFooter && (
diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/changelog/__tests__/Changelog-test.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/changelog/__tests__/Changelog-test.tsx
index 267646c73d3..39c438c59c4 100644
--- a/server/sonar-web/src/main/js/apps/quality-profiles/changelog/__tests__/Changelog-test.tsx
+++ b/server/sonar-web/src/main/js/apps/quality-profiles/changelog/__tests__/Changelog-test.tsx
@@ -37,44 +37,44 @@ function createEvent(overrides?: Partial<ProfileChangelogEvent>): ProfileChangel
it('should render events', () => {
const events = [createEvent(), createEvent()];
- const changelog = shallow(<Changelog events={events} organization={null} />);
+ const changelog = shallow(<Changelog events={events} />);
expect(changelog.find('tbody').find('tr').length).toBe(2);
});
it('should render event date', () => {
const events = [createEvent()];
- const changelog = shallow(<Changelog events={events} organization={null} />);
+ const changelog = shallow(<Changelog events={events} />);
expect(changelog.find('DateTimeFormatter')).toHaveLength(1);
});
it('should render author', () => {
const events = [createEvent()];
- const changelog = shallow(<Changelog events={events} organization={null} />);
+ const changelog = shallow(<Changelog events={events} />);
expect(changelog.text()).toContain('John');
});
it('should render system author', () => {
const events = [createEvent({ authorName: undefined })];
- const changelog = shallow(<Changelog events={events} organization={null} />);
+ const changelog = shallow(<Changelog events={events} />);
expect(changelog.text()).toContain('System');
});
it('should render action', () => {
const events = [createEvent()];
- const changelog = shallow(<Changelog events={events} organization={null} />);
+ const changelog = shallow(<Changelog events={events} />);
expect(changelog.text()).toContain('ACTIVATED');
});
it('should render rule', () => {
const events = [createEvent()];
- const changelog = shallow(<Changelog events={events} organization={null} />);
+ const changelog = shallow(<Changelog events={events} />);
expect(changelog.find('Link').prop('to')).toHaveProperty('query', { rule_key: 'squid1234' });
});
it('should render ChangesList', () => {
const params = { severity: 'BLOCKER' };
const events = [createEvent({ params })];
- const changelog = shallow(<Changelog events={events} organization={null} />);
+ const changelog = shallow(<Changelog events={events} />);
const changesList = changelog.find(ChangesList);
expect(changesList.length).toBe(1);
expect(changesList.prop('changes')).toBe(params);
@@ -87,7 +87,7 @@ it('should render events sorted by time and action', () => {
createEvent({ date: '2019-02-07T14:03:14', action: 'ACTIVATED' }),
createEvent({ date: '2019-02-07T14:03:07', action: 'ACTIVATED' })
];
- const changelog = shallow(<Changelog events={events} organization={null} />);
+ const changelog = shallow(<Changelog events={events} />);
const rows = changelog.find('tbody').find('tr');
const getAction = (index: number) =>
diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/changelog/__tests__/ChangelogContainer-test.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/changelog/__tests__/ChangelogContainer-test.tsx
index 176cda52f04..a076bacd1bc 100644
--- a/server/sonar-web/src/main/js/apps/quality-profiles/changelog/__tests__/ChangelogContainer-test.tsx
+++ b/server/sonar-web/src/main/js/apps/quality-profiles/changelog/__tests__/ChangelogContainer-test.tsx
@@ -71,7 +71,6 @@ function shallowRender() {
return shallow<ChangelogContainer>(
<ChangelogContainer
location={mockLocation()}
- organization="TEST"
profile={mockQualityProfile()}
router={mockRouter()}
/>
diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/changelog/__tests__/__snapshots__/ChangelogContainer-test.tsx.snap b/server/sonar-web/src/main/js/apps/quality-profiles/changelog/__tests__/__snapshots__/ChangelogContainer-test.tsx.snap
index 788ec9aa5f6..2029636a14c 100644
--- a/server/sonar-web/src/main/js/apps/quality-profiles/changelog/__tests__/__snapshots__/ChangelogContainer-test.tsx.snap
+++ b/server/sonar-web/src/main/js/apps/quality-profiles/changelog/__tests__/__snapshots__/ChangelogContainer-test.tsx.snap
@@ -50,7 +50,6 @@ exports[`should render correctly 1`] = `
},
]
}
- organization="TEST"
/>
<footer
className="text-center spacer-top small"