Commit 260e3c61 authored by Mark Florian's avatar Mark Florian

Merge branch 'rename-license-management' into 'master'

Rename license management references to license compliance/license scanning

See merge request gitlab-org/gitlab!27892
parents 5fd44333 83c4a463
......@@ -2,19 +2,19 @@
import { mapActions, mapState, mapGetters } from 'vuex';
import { GlEmptyState, GlLoadingIcon, GlLink, GlIcon, GlTab, GlTabs, GlBadge } from '@gitlab/ui';
import { LICENSE_LIST } from '../store/constants';
import { LICENSE_MANAGEMENT } from 'ee/vue_shared/license_management/store/constants';
import PaginatedLicensesTable from './paginated_licenses_table.vue';
import { LICENSE_MANAGEMENT } from 'ee/vue_shared/license_compliance/store/constants';
import DetectedLicensesTable from './detected_licenses_table.vue';
import PipelineInfo from './pipeline_info.vue';
import LicenseManagement from 'ee/vue_shared/license_management/license_management.vue';
import LicenseManagement from 'ee/vue_shared/license_compliance/license_management.vue';
import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
export default {
name: 'ProjectLicensesApp',
name: 'LicenseComplianceApp',
components: {
GlEmptyState,
GlLoadingIcon,
GlLink,
PaginatedLicensesTable,
DetectedLicensesTable,
PipelineInfo,
GlIcon,
GlTab,
......@@ -107,7 +107,7 @@ export default {
<gl-badge pill>{{ licenseCount }}</gl-badge>
</template>
<paginated-licenses-table />
<detected-licenses-table />
</gl-tab>
<gl-tab>
......@@ -122,7 +122,7 @@ export default {
</template>
<template v-else>
<paginated-licenses-table class="mt-3" />
<detected-licenses-table class="mt-3" />
</template>
</div>
</template>
......@@ -5,7 +5,7 @@ import LicensesTable from './licenses_table.vue';
import { LICENSE_LIST } from '../store/constants';
export default {
name: 'PaginatedLicensesTable',
name: 'DetectedLicensesTable',
components: {
LicensesTable,
Pagination,
......
import Vue from 'vue';
import ProjectLicensesApp from './components/app.vue';
import LicenseComplianceApp from './components/app.vue';
import createStore from './store';
import { LICENSE_LIST } from './store/constants';
......@@ -23,10 +23,10 @@ export default () => {
el,
store,
components: {
ProjectLicensesApp,
LicenseComplianceApp,
},
render(createElement) {
return createElement(ProjectLicensesApp, {
return createElement(LicenseComplianceApp, {
props: {
emptyStateSvgPath,
documentationPath,
......
......@@ -2,9 +2,9 @@ import Vue from 'vue';
import Vuex from 'vuex';
import listModule from './modules/list';
import { licenseManagementModule } from 'ee/vue_shared/license_management/store/index';
import { licenseManagementModule } from 'ee/vue_shared/license_compliance/store/index';
import { LICENSE_LIST } from './constants';
import { LICENSE_MANAGEMENT } from 'ee/vue_shared/license_management/store/constants';
import { LICENSE_MANAGEMENT } from 'ee/vue_shared/license_compliance/store/constants';
Vue.use(Vuex);
......
import initProjectLicensesApp from 'ee/project_licenses';
import initLicenseComplianceApp from 'ee/license_compliance';
document.addEventListener('DOMContentLoaded', initProjectLicensesApp);
document.addEventListener('DOMContentLoaded', initLicenseComplianceApp);
import Vue from 'vue';
import LicenseReportApp from 'ee/vue_shared/license_management/mr_widget_license_report.vue';
import LicenseReportApp from 'ee/vue_shared/license_compliance/mr_widget_license_report.vue';
import Translate from '~/vue_shared/translate';
import { parseBoolean } from '~/lib/utils/common_utils';
import { updateBadgeCount } from './utils';
......
import Vue from 'vue';
import LicenseManagement from 'ee/vue_shared/license_management/license_management.vue';
import createStore from 'ee/vue_shared/license_management/store/index';
import LicenseManagement from 'ee/vue_shared/license_compliance/license_management.vue';
import createStore from 'ee/vue_shared/license_compliance/store/index';
import ProtectedEnvironmentCreate from 'ee/protected_environments/protected_environment_create';
import ProtectedEnvironmentEditList from 'ee/protected_environments/protected_environment_edit_list';
import showToast from '~/vue_shared/plugins/global_toast';
......
import PerformanceIssueBody from 'ee/vue_merge_request_widget/components/performance_issue_body.vue';
import CodequalityIssueBody from 'ee/vue_merge_request_widget/components/codequality_issue_body.vue';
import BlockingMergeRequestsBody from 'ee/vue_merge_request_widget/components/blocking_merge_requests/blocking_merge_request_body.vue';
import LicenseIssueBody from 'ee/vue_shared/license_management/components/license_issue_body.vue';
import LicenseIssueBody from 'ee/vue_shared/license_compliance/components/license_issue_body.vue';
import SastIssueBody from 'ee/vue_shared/security_reports/components/sast_issue_body.vue';
import ContainerScanningIssueBody from 'ee/vue_shared/security_reports/components/container_scanning_issue_body.vue';
import DastIssueBody from 'ee/vue_shared/security_reports/components/dast_issue_body.vue';
......
......@@ -4,7 +4,7 @@ import GroupedSecurityReportsApp from 'ee/vue_shared/security_reports/grouped_se
import GroupedMetricsReportsApp from 'ee/vue_shared/metrics_reports/grouped_metrics_reports_app.vue';
import reportsMixin from 'ee/vue_shared/security_reports/mixins/reports_mixin';
import { componentNames } from 'ee/reports/components/issue_body';
import MrWidgetLicenses from 'ee/vue_shared/license_management/mr_widget_license_report.vue';
import MrWidgetLicenses from 'ee/vue_shared/license_compliance/mr_widget_license_report.vue';
import ReportSection from '~/reports/components/report_section.vue';
import BlockingMergeRequestsReport from './components/blocking_merge_requests/blocking_merge_requests_report.vue';
......@@ -161,7 +161,7 @@ export default {
);
},
licensesApiPath() {
return (gl && gl.mrWidgetData && gl.mrWidgetData.license_management_comparison_path) || null;
return gl?.mrWidgetData?.license_scanning_comparison_path || null;
},
},
watch: {
......@@ -331,12 +331,12 @@ export default {
/>
<mr-widget-licenses
v-if="shouldRenderLicenseReport"
:api-url="mr.licenseManagement.managed_licenses_path"
:api-url="mr.licenseScanning.managed_licenses_path"
:licenses-api-path="licensesApiPath"
:pipeline-path="mr.pipeline.path"
:can-manage-licenses="mr.licenseManagement.can_manage_licenses"
:full-report-path="mr.licenseManagement.license_management_full_report_path"
:license-management-settings-path="mr.licenseManagement.license_management_settings_path"
:can-manage-licenses="mr.licenseScanning.can_manage_licenses"
:full-report-path="mr.licenseScanning.full_report_path"
:license-management-settings-path="mr.licenseScanning.settings_path"
:security-approvals-help-page-path="mr.securityApprovalsHelpPagePath"
report-section-class="mr-widget-border-top"
/>
......
......@@ -29,7 +29,7 @@ export default class MergeRequestStore extends CEMergeRequestStore {
this.initCodeclimate(data);
this.initPerformanceReport(data);
this.licenseManagement = data.license_management;
this.licenseScanning = data.license_scanning;
this.metricsReportsPath = data.metrics_reports_path;
this.enabledReports = convertObjectPropsToCamelCase(data.enabled_reports);
......
<script>
import { mapActions } from 'vuex';
import { GlDropdown, GlDropdownItem, GlLoadingIcon } from '@gitlab/ui';
import { getIssueStatusFromLicenseStatus } from 'ee/vue_shared/license_management/store/utils';
import { getIssueStatusFromLicenseStatus } from 'ee/vue_shared/license_compliance/store/utils';
import { s__ } from '~/locale';
import Icon from '~/vue_shared/components/icon.vue';
import IssueStatusIcon from '~/reports/components/issue_status_icon.vue';
import { LICENSE_APPROVAL_STATUS, LICENSE_APPROVAL_ACTION } from '../constants';
import { LICENSE_MANAGEMENT } from 'ee/vue_shared/license_management/store/constants';
import { LICENSE_MANAGEMENT } from 'ee/vue_shared/license_compliance/store/constants';
const visibleClass = 'visible';
const invisibleClass = 'invisible';
......
......@@ -4,7 +4,7 @@ import { mapActions, mapState } from 'vuex';
import { s__, sprintf } from '~/locale';
import DeprecatedModal2 from '~/vue_shared/components/deprecated_modal_2.vue';
import { LICENSE_MANAGEMENT } from 'ee/vue_shared/license_management/store/constants';
import { LICENSE_MANAGEMENT } from 'ee/vue_shared/license_compliance/store/constants';
export default {
name: 'LicenseDeleteConfirmationModal',
......
......@@ -2,7 +2,7 @@
import { mapActions } from 'vuex';
import LicensePackages from './license_packages.vue';
import { LICENSE_MANAGEMENT } from 'ee/vue_shared/license_management/store/constants';
import { LICENSE_MANAGEMENT } from 'ee/vue_shared/license_compliance/store/constants';
export default {
name: 'LicenseIssueBody',
......
......@@ -2,7 +2,7 @@
import {
getIssueStatusFromLicenseStatus,
getStatusTranslationsFromLicenseStatus,
} from 'ee/vue_shared/license_management/store/utils';
} from 'ee/vue_shared/license_compliance/store/utils';
import IssueStatusIcon from '~/reports/components/issue_status_icon.vue';
export default {
......
......@@ -5,7 +5,7 @@ import { s__ } from '~/locale';
import DeprecatedModal2 from '~/vue_shared/components/deprecated_modal_2.vue';
import LicensePackages from './license_packages.vue';
import { LICENSE_APPROVAL_STATUS } from '../constants';
import { LICENSE_MANAGEMENT } from 'ee/vue_shared/license_management/store/constants';
import { LICENSE_MANAGEMENT } from 'ee/vue_shared/license_compliance/store/constants';
export default {
name: 'LicenseSetApprovalStatusModal',
......
......@@ -8,7 +8,7 @@ import LicenseManagementRow from './components/license_management_row.vue';
import DeleteConfirmationModal from './components/delete_confirmation_modal.vue';
import PaginatedList from '~/vue_shared/components/paginated_list.vue';
import { LICENSE_MANAGEMENT } from 'ee/vue_shared/license_management/store/constants';
import { LICENSE_MANAGEMENT } from 'ee/vue_shared/license_compliance/store/constants';
export default {
name: 'LicenseManagement',
......
......@@ -2,12 +2,12 @@
import { mapState, mapGetters, mapActions } from 'vuex';
import { GlLink } from '@gitlab/ui';
import reportsMixin from 'ee/vue_shared/security_reports/mixins/reports_mixin';
import SetLicenseApprovalModal from 'ee/vue_shared/license_management/components/set_approval_status_modal.vue';
import SetLicenseApprovalModal from 'ee/vue_shared/license_compliance/components/set_approval_status_modal.vue';
import { componentNames } from 'ee/reports/components/issue_body';
import Icon from '~/vue_shared/components/icon.vue';
import ReportSection from '~/reports/components/report_section.vue';
import { LICENSE_MANAGEMENT } from 'ee/vue_shared/license_management/store/constants';
import { LICENSE_MANAGEMENT } from 'ee/vue_shared/license_compliance/store/constants';
import createStore from './store';
......
import { LICENSE_APPROVAL_STATUS } from 'ee/vue_shared/license_management/constants';
import { LICENSE_APPROVAL_STATUS } from 'ee/vue_shared/license_compliance/constants';
import { s__, n__, sprintf } from '~/locale';
import { STATUS_FAILED, STATUS_NEUTRAL, STATUS_SUCCESS } from '~/reports/constants';
......
......@@ -17,7 +17,7 @@
window.gl.mrWidgetData.approvals_help_path = '#{help_page_path("user/project/merge_requests/merge_request_approvals")}';
window.gl.mrWidgetData.codequality_help_path = '#{help_page_path("user/project/merge_requests/code_quality", anchor: "code-quality-reports")}';
window.gl.mrWidgetData.visual_review_app_available = '#{@project.feature_available?(:visual_review_app)}' === 'true';
window.gl.mrWidgetData.license_management_comparison_path = '#{license_management_reports_project_merge_request_path(@project, @merge_request) if @project.feature_available?(:license_management)}'
window.gl.mrWidgetData.license_scanning_comparison_path = '#{license_management_reports_project_merge_request_path(@project, @merge_request) if @project.feature_available?(:license_management)}'
window.gl.mrWidgetData.container_scanning_comparison_path = '#{container_scanning_reports_project_merge_request_path(@project, @merge_request) if @project.feature_available?(:container_scanning)}'
window.gl.mrWidgetData.dependency_scanning_comparison_path = '#{dependency_scanning_reports_project_merge_request_path(@project, @merge_request) if @project.feature_available?(:dependency_scanning)}'
window.gl.mrWidgetData.sast_comparison_path = '#{sast_reports_project_merge_request_path(@project, @merge_request) if @project.feature_available?(:sast)}'
......
......@@ -5,16 +5,19 @@ import Vuex from 'vuex';
import { GlEmptyState, GlLoadingIcon, GlTab, GlTabs } from '@gitlab/ui';
import { TEST_HOST } from 'helpers/test_constants';
import { REPORT_STATUS } from 'ee/project_licenses/store/modules/list/constants';
import { REPORT_STATUS } from 'ee/license_compliance/store/modules/list/constants';
import ProjectLicensesApp from 'ee/project_licenses/components/app.vue';
import PaginatedLicensesTable from 'ee/project_licenses/components/paginated_licenses_table.vue';
import PipelineInfo from 'ee/project_licenses/components/pipeline_info.vue';
import LicenseManagement from 'ee/vue_shared/license_management/license_management.vue';
import LicenseComplianceApp from 'ee/license_compliance/components/app.vue';
import DetectedLicensesTable from 'ee/license_compliance/components/detected_licenses_table.vue';
import PipelineInfo from 'ee/license_compliance/components/pipeline_info.vue';
import LicenseManagement from 'ee/vue_shared/license_compliance/license_management.vue';
import * as getters from 'ee/project_licenses/store/modules/list/getters';
import * as getters from 'ee/license_compliance/store/modules/list/getters';
import { approvedLicense, blacklistedLicense } from 'ee_jest/license_management/mock_data';
import {
approvedLicense,
blacklistedLicense,
} from 'ee_jest/vue_shared/license_compliance/mock_data';
Vue.use(Vuex);
......@@ -55,7 +58,7 @@ const createComponent = ({ state, props, options }) => {
},
});
wrapper = shallowMount(ProjectLicensesApp, {
wrapper = shallowMount(LicenseComplianceApp, {
propsData: {
emptyStateSvgPath,
documentationPath,
......@@ -89,7 +92,7 @@ describe('Project Licenses', () => {
});
it('does not show the list of detected in project licenses', () => {
expect(wrapper.find(PaginatedLicensesTable).exists()).toBe(false);
expect(wrapper.find(DetectedLicensesTable).exists()).toBe(false);
});
it('does not show the list of license policies', () => {
......@@ -125,7 +128,7 @@ describe('Project Licenses', () => {
});
it('does not show the list of detected in project licenses', () => {
expect(wrapper.find(PaginatedLicensesTable).exists()).toBe(false);
expect(wrapper.find(DetectedLicensesTable).exists()).toBe(false);
});
it('does not show the list of license policies', () => {
......@@ -164,7 +167,7 @@ describe('Project Licenses', () => {
});
it('it renders the "Detected in project" table', () => {
expect(wrapper.find(PaginatedLicensesTable).exists()).toBe(true);
expect(wrapper.find(DetectedLicensesTable).exists()).toBe(true);
});
it('it renders the "Policies" table', () => {
......@@ -196,7 +199,7 @@ describe('Project Licenses', () => {
});
it('only renders the "Detected in project" table', () => {
expect(wrapper.find(PaginatedLicensesTable).exists()).toBe(true);
expect(wrapper.find(DetectedLicensesTable).exists()).toBe(true);
expect(wrapper.find(LicenseManagement).exists()).toBe(false);
});
......
import { shallowMount } from '@vue/test-utils';
import createStore from 'ee/project_licenses/store';
import LicensesTable from 'ee/project_licenses/components/licenses_table.vue';
import { toLicenseObject } from 'ee/project_licenses/utils/mappers';
import { LICENSE_LIST } from 'ee/project_licenses/store/constants';
import PaginatedLicensesTable from 'ee/project_licenses/components/paginated_licenses_table.vue';
import createStore from 'ee/license_compliance/store';
import LicensesTable from 'ee/license_compliance/components/licenses_table.vue';
import { toLicenseObject } from 'ee/license_compliance/utils/mappers';
import { LICENSE_LIST } from 'ee/license_compliance/store/constants';
import DetectedLicensesTable from 'ee/license_compliance/components/detected_licenses_table.vue';
import Pagination from '~/vue_shared/components/pagination_links.vue';
import mockLicensesResponse from '../store/modules/list/data/mock_licenses.json';
jest.mock('lodash/uniqueId', () => () => 'fakeUniqueId');
describe('PaginatedLicensesTable component', () => {
describe('DetectedLicenesTable component', () => {
const namespace = LICENSE_LIST;
let store;
......@@ -18,7 +18,7 @@ describe('PaginatedLicensesTable component', () => {
const factory = () => {
store = createStore();
wrapper = shallowMount(PaginatedLicensesTable, {
wrapper = shallowMount(DetectedLicensesTable, {
store,
});
};
......
......@@ -3,7 +3,7 @@ import { GlModal, GlLink, GlIntersperse } from '@gitlab/ui';
import LicenseComponentLinks, {
VISIBLE_COMPONENT_COUNT,
} from 'ee/project_licenses/components/license_component_links.vue';
} from 'ee/license_compliance/components/license_component_links.vue';
describe('LicenseComponentLinks component', () => {
// data helpers
......
import { shallowMount } from '@vue/test-utils';
import { GlLink, GlSkeletonLoading } from '@gitlab/ui';
import LicenseComponentLinks from 'ee/project_licenses/components/license_component_links.vue';
import LicensesTableRow from 'ee/project_licenses/components/licenses_table_row.vue';
import LicenseComponentLinks from 'ee/license_compliance/components/license_component_links.vue';
import LicensesTableRow from 'ee/license_compliance/components/licenses_table_row.vue';
import { makeLicense } from './utils';
describe('LicensesTableRow component', () => {
......
import { shallowMount } from '@vue/test-utils';
import LicensesTable from 'ee/project_licenses/components/licenses_table.vue';
import LicensesTableRow from 'ee/project_licenses/components/licenses_table_row.vue';
import LicensesTable from 'ee/license_compliance/components/licenses_table.vue';
import LicensesTableRow from 'ee/license_compliance/components/licenses_table_row.vue';
import { makeLicense } from './utils';
describe('LicensesTable component', () => {
......
......@@ -2,11 +2,11 @@ import axios from 'axios';
import MockAdapter from 'axios-mock-adapter';
import testAction from 'helpers/vuex_action_helper';
import { TEST_HOST } from 'helpers/test_constants';
import * as actions from 'ee/project_licenses/store/modules/list/actions';
import * as types from 'ee/project_licenses/store/modules/list/mutation_types';
import getInitialState from 'ee/project_licenses/store/modules/list/state';
import * as actions from 'ee/license_compliance/store/modules/list/actions';
import * as types from 'ee/license_compliance/store/modules/list/mutation_types';
import getInitialState from 'ee/license_compliance/store/modules/list/state';
import { FETCH_ERROR_MESSAGE } from 'ee/project_licenses/store/modules/list/constants';
import { FETCH_ERROR_MESSAGE } from 'ee/license_compliance/store/modules/list/constants';
import createFlash from '~/flash';
import mockLicensesResponse from './data/mock_licenses.json';
......
import * as getters from 'ee/project_licenses/store/modules/list/getters';
import { REPORT_STATUS } from 'ee/project_licenses/store/modules/list/constants';
import * as getters from 'ee/license_compliance/store/modules/list/getters';
import { REPORT_STATUS } from 'ee/license_compliance/store/modules/list/constants';
describe('Licenses getters', () => {
describe.each`
......
import * as types from 'ee/project_licenses/store/modules/list/mutation_types';
import mutations from 'ee/project_licenses/store/modules/list/mutations';
import { toLicenseObject } from 'ee/project_licenses/utils/mappers';
import getInitialState from 'ee/project_licenses/store/modules/list/state';
import { REPORT_STATUS } from 'ee/project_licenses/store/modules/list/constants';
import * as types from 'ee/license_compliance/store/modules/list/mutation_types';
import mutations from 'ee/license_compliance/store/modules/list/mutations';
import { toLicenseObject } from 'ee/license_compliance/utils/mappers';
import getInitialState from 'ee/license_compliance/store/modules/list/state';
import { REPORT_STATUS } from 'ee/license_compliance/store/modules/list/constants';
import { TEST_HOST } from 'helpers/test_constants';
describe('Licenses mutations', () => {
......
import { toLicenseObject } from 'ee/project_licenses/utils/mappers';
import { toLicenseObject } from 'ee/license_compliance/utils/mappers';
const UNIQUE_ID = 'fakeUniqueId';
jest.mock('lodash/uniqueId', () => () => 'fakeUniqueId');
describe('ee/project_licenses/utils/mappers', () => {
describe('ee/license_compliance/utils/mappers', () => {
describe('toLicenseObject', () => {
describe.each`
input | key
......
import Vue from 'vue';
import $ from 'jquery';
import Dropdown from 'ee/vue_shared/license_management/components/add_license_form_dropdown.vue';
import { KNOWN_LICENSES } from 'ee/vue_shared/license_management/constants';
import Dropdown from 'ee/vue_shared/license_compliance/components/add_license_form_dropdown.vue';
import { KNOWN_LICENSES } from 'ee/vue_shared/license_compliance/constants';
import mountComponent from 'helpers/vue_mount_component_helper';
describe('AddLicenseFormDropdown', () => {
......
import Vue from 'vue';
import LicenseIssueBody from 'ee/vue_shared/license_management/components/add_license_form.vue';
import LicenseIssueBody from 'ee/vue_shared/license_compliance/components/add_license_form.vue';
import mountComponent from 'helpers/vue_mount_component_helper';
import { LICENSE_APPROVAL_STATUS } from 'ee/vue_shared/license_management/constants';
import { LICENSE_APPROVAL_STATUS } from 'ee/vue_shared/license_compliance/constants';
describe('AddLicenseForm', () => {
const Component = Vue.extend(LicenseIssueBody);
......
import Vue from 'vue';
import Vuex from 'vuex';
import AdminLicenseManagementRow from 'ee/vue_shared/license_management/components/admin_license_management_row.vue';
import { LICENSE_APPROVAL_STATUS } from 'ee/vue_shared/license_management/constants';
import AdminLicenseManagementRow from 'ee/vue_shared/license_compliance/components/admin_license_management_row.vue';
import { LICENSE_APPROVAL_STATUS } from 'ee/vue_shared/license_compliance/constants';
import { mountComponentWithStore } from 'helpers/vue_mount_component_helper';
import { approvedLicense } from '../mock_data';
......
import Vue from 'vue';
import Vuex from 'vuex';
import DeleteConfirmationModal from 'ee/vue_shared/license_management/components/delete_confirmation_modal.vue';
import DeleteConfirmationModal from 'ee/vue_shared/license_compliance/components/delete_confirmation_modal.vue';
import { trimText } from 'helpers/text_helper';
import { mountComponentWithStore } from 'helpers/vue_mount_component_helper';
import { approvedLicense } from '../mock_data';
......
import Vue from 'vue';
import LicenseIssueBody from 'ee/vue_shared/license_management/components/license_issue_body.vue';
import LicenseIssueBody from 'ee/vue_shared/license_compliance/components/license_issue_body.vue';
import { trimText } from 'helpers/text_helper';
import { mountComponentWithStore } from 'helpers/vue_mount_component_helper';
import createStore from 'ee/vue_shared/license_management/store';
import createStore from 'ee/vue_shared/license_compliance/store';
import { licenseReport } from '../mock_data';
describe('LicenseIssueBody', () => {
......
import { shallowMount } from '@vue/test-utils';
import LicenseManagementRow from 'ee/vue_shared/license_management/components/license_management_row.vue';
import { approvedLicense, blacklistedLicense } from 'ee_jest/license_management/mock_data';
import LicenseManagementRow from 'ee/vue_shared/license_compliance/components/license_management_row.vue';
import {
approvedLicense,
blacklistedLicense,
} from 'ee_jest/vue_shared/license_compliance/mock_data';
let wrapper;
......
import Vue from 'vue';
import LicensePackages from 'ee/vue_shared/license_management/components/license_packages.vue';
import LicensePackages from 'ee/vue_shared/license_compliance/components/license_packages.vue';
import mountComponent from 'helpers/vue_mount_component_helper';
import { licenseReport } from '../mock_data';
......
import Vue from 'vue';
import Vuex from 'vuex';
import SetApprovalModal from 'ee/vue_shared/license_management/components/set_approval_status_modal.vue';
import { LICENSE_APPROVAL_STATUS } from 'ee/vue_shared/license_management/constants';
import SetApprovalModal from 'ee/vue_shared/license_compliance/components/set_approval_status_modal.vue';
import { LICENSE_APPROVAL_STATUS } from 'ee/vue_shared/license_compliance/constants';
import { trimText } from 'helpers/text_helper';
import { mountComponentWithStore } from 'helpers/vue_mount_component_helper';
import { licenseReport } from '../mock_data';
......
......@@ -2,11 +2,11 @@ import { shallowMount } from '@vue/test-utils';
import { GlButton, GlLoadingIcon } from '@gitlab/ui';
import Vue from 'vue';
import Vuex from 'vuex';
import LicenseManagement from 'ee/vue_shared/license_management/license_management.vue';
import AdminLicenseManagementRow from 'ee/vue_shared/license_management/components/admin_license_management_row.vue';
import LicenseManagementRow from 'ee/vue_shared/license_management/components/license_management_row.vue';
import AddLicenseForm from 'ee/vue_shared/license_management/components/add_license_form.vue';
import DeleteConfirmationModal from 'ee/vue_shared/license_management/components/delete_confirmation_modal.vue';
import LicenseManagement from 'ee/vue_shared/license_compliance/license_management.vue';
import AdminLicenseManagementRow from 'ee/vue_shared/license_compliance/components/admin_license_management_row.vue';
import LicenseManagementRow from 'ee/vue_shared/license_compliance/components/license_management_row.vue';
import AddLicenseForm from 'ee/vue_shared/license_compliance/components/add_license_form.vue';
import DeleteConfirmationModal from 'ee/vue_shared/license_compliance/components/delete_confirmation_modal.vue';
import { approvedLicense, blacklistedLicense } from './mock_data';
Vue.use(Vuex);
......
import { LICENSE_APPROVAL_STATUS } from 'ee/vue_shared/license_management/constants';
import { LICENSE_APPROVAL_STATUS } from 'ee/vue_shared/license_compliance/constants';
export const approvedLicense = {
id: 5,
......
import Vue from 'vue';
import Vuex from 'vuex';
import LicenseManagement from 'ee/vue_shared/license_management/mr_widget_license_report.vue';
import LicenseManagement from 'ee/vue_shared/license_compliance/mr_widget_license_report.vue';
import { LOADING, ERROR, SUCCESS } from 'ee/vue_shared/security_reports/store/constants';
import { mountComponentWithStore } from 'helpers/vue_mount_component_helper';
import { TEST_HOST } from 'spec/test_constants';
......
import MockAdapter from 'axios-mock-adapter';
import * as actions from 'ee/vue_shared/license_management/store/actions';
import * as mutationTypes from 'ee/vue_shared/license_management/store/mutation_types';
import createState from 'ee/vue_shared/license_management/store/state';
import { LICENSE_APPROVAL_STATUS } from 'ee/vue_shared/license_management/constants';
import * as actions from 'ee/vue_shared/license_compliance/store/actions';
import * as mutationTypes from 'ee/vue_shared/license_compliance/store/mutation_types';
import createState from 'ee/vue_shared/license_compliance/store/state';
import { LICENSE_APPROVAL_STATUS } from 'ee/vue_shared/license_compliance/constants';
import { TEST_HOST } from 'spec/test_constants';
import testAction from 'helpers/vuex_action_helper';
import { approvedLicense, blacklistedLicense } from '../mock_data';
......
import createState from 'ee/vue_shared/license_management/store/state';
import * as getters from 'ee/vue_shared/license_management/store/getters';
import createState from 'ee/vue_shared/license_compliance/store/state';
import * as getters from 'ee/vue_shared/license_compliance/store/getters';
import { licenseReport as licenseReportMock } from '../mock_data';
......
import createStore from 'ee/vue_shared/license_management/store';
import * as types from 'ee/vue_shared/license_management/store/mutation_types';
import { LICENSE_APPROVAL_STATUS } from 'ee/vue_shared/license_management/constants';
import createStore from 'ee/vue_shared/license_compliance/store';
import * as types from 'ee/vue_shared/license_compliance/store/mutation_types';
import { LICENSE_APPROVAL_STATUS } from 'ee/vue_shared/license_compliance/constants';
import { TEST_HOST } from 'spec/test_constants';
import { approvedLicense } from '../mock_data';
......
......@@ -4,8 +4,8 @@ import {
getStatusTranslationsFromLicenseStatus,
getIssueStatusFromLicenseStatus,
convertToOldReportFormat,
} from 'ee/vue_shared/license_management/store/utils';
import { LICENSE_APPROVAL_STATUS } from 'ee/vue_shared/license_management/constants';
} from 'ee/vue_shared/license_compliance/store/utils';
import { LICENSE_APPROVAL_STATUS } from 'ee/vue_shared/license_compliance/constants';
import { licenseReport } from '../mock_data';
import { STATUS_FAILED, STATUS_NEUTRAL, STATUS_SUCCESS } from '~/reports/constants';
......
......@@ -789,7 +789,7 @@ describe('ee merge request widget options', () => {
enabled_reports: {
license_management: true,
},
license_management: {
license_scanning: {
managed_licenses_path: licenseManagementApiUrl,
can_manage_licenses: false,
},
......@@ -1114,7 +1114,7 @@ describe('ee merge request widget options', () => {
if (noSecurityReportsEnabled?.license_management) {
// Provide license report config if it's going to be rendered
gl.mrWidgetData.license_management = {
gl.mrWidgetData.license_scanning = {
managed_licenses_path: `${TEST_HOST}/manage_license_api`,
can_manage_licenses: false,
};
......
......@@ -15,13 +15,13 @@ module QA
element :icon_status, ':data-qa-selector="`status_${status}_icon`" ' # rubocop:disable QA/ElementWithPattern
end
view 'ee/app/assets/javascripts/vue_shared/license_management/components/set_approval_status_modal.vue' do
view 'ee/app/assets/javascripts/vue_shared/license_compliance/components/set_approval_status_modal.vue' do
element :license_management_modal
element :approve_license_button
element :blacklist_license_button
end
view 'ee/app/assets/javascripts/vue_shared/license_management/mr_widget_license_report.vue' do
view 'ee/app/assets/javascripts/vue_shared/license_compliance/mr_widget_license_report.vue' do
element :license_report_widget
end
end
......
......@@ -7,20 +7,20 @@ module QA::EE
class LicenseCompliance < QA::Page::Base
include QA::Page::Component::Select2 # Select2 is an external library, so we can't add our own selectors
view 'ee/app/assets/javascripts/vue_shared/license_management/license_management.vue' do
view 'ee/app/assets/javascripts/vue_shared/license_compliance/license_management.vue' do
element :license_add_button
end
view 'ee/app/assets/javascripts/vue_shared/license_management/components/add_license_form.vue' do
view 'ee/app/assets/javascripts/vue_shared/license_compliance/components/add_license_form.vue' do
element :license_radio, 'data-qa-selector="`${option.value}_license_radio`"' # rubocop:disable QA/ElementWithPattern
element :add_license_submit_button
end
view 'ee/app/assets/javascripts/vue_shared/license_management/license_management.vue' do
view 'ee/app/assets/javascripts/vue_shared/license_compliance/license_management.vue' do
element :license_compliance_list
end
view 'ee/app/assets/javascripts/vue_shared/license_management/components/admin_license_management_row.vue' do
view 'ee/app/assets/javascripts/vue_shared/license_compliance/components/admin_license_management_row.vue' do
element :admin_license_compliance_row
element :license_name_content
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment