Commit 6a0199bd authored by Kushal Pandya's avatar Kushal Pandya

Merge branch 'Refactor-folder-structure-for-security-dashboard-GraphQL-files' into 'master'

Refactor folder structure for security dashboard GraphQL files

See merge request gitlab-org/gitlab!51117
parents b5b1eab1 715cc455
...@@ -4,7 +4,7 @@ import SecurityDashboardLayout from 'ee/security_dashboard/components/security_d ...@@ -4,7 +4,7 @@ import SecurityDashboardLayout from 'ee/security_dashboard/components/security_d
import GroupSecurityVulnerabilities from 'ee/security_dashboard/components/first_class_group_security_dashboard_vulnerabilities.vue'; import GroupSecurityVulnerabilities from 'ee/security_dashboard/components/first_class_group_security_dashboard_vulnerabilities.vue';
import Filters from 'ee/security_dashboard/components/first_class_vulnerability_filters.vue'; import Filters from 'ee/security_dashboard/components/first_class_vulnerability_filters.vue';
import CsvExportButton from './csv_export_button.vue'; import CsvExportButton from './csv_export_button.vue';
import vulnerableProjectsQuery from '../graphql/vulnerable_projects.query.graphql'; import vulnerableProjectsQuery from '../graphql/queries/vulnerable_projects.query.graphql';
import DashboardNotConfigured from './empty_states/group_dashboard_not_configured.vue'; import DashboardNotConfigured from './empty_states/group_dashboard_not_configured.vue';
import VulnerabilitiesCountList from './vulnerability_count_list.vue'; import VulnerabilitiesCountList from './vulnerability_count_list.vue';
import { vulnerabilitiesSeverityCountScopes } from '../constants'; import { vulnerabilitiesSeverityCountScopes } from '../constants';
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
import produce from 'immer'; import produce from 'immer';
import { GlAlert, GlLoadingIcon, GlIntersectionObserver } from '@gitlab/ui'; import { GlAlert, GlLoadingIcon, GlIntersectionObserver } from '@gitlab/ui';
import VulnerabilityList from './vulnerability_list.vue'; import VulnerabilityList from './vulnerability_list.vue';
import vulnerabilitiesQuery from '../graphql/group_vulnerabilities.graphql'; import vulnerabilitiesQuery from '../graphql/queries/group_vulnerabilities.query.graphql';
import { VULNERABILITIES_PER_PAGE } from '../store/constants'; import { VULNERABILITIES_PER_PAGE } from '../store/constants';
import { preparePageInfo } from '../helpers'; import { preparePageInfo } from '../helpers';
......
<script> <script>
import SecurityDashboardLayout from 'ee/security_dashboard/components/security_dashboard_layout.vue'; import SecurityDashboardLayout from 'ee/security_dashboard/components/security_dashboard_layout.vue';
import Filters from 'ee/security_dashboard/components/first_class_vulnerability_filters.vue'; import Filters from 'ee/security_dashboard/components/first_class_vulnerability_filters.vue';
import projectsQuery from 'ee/security_dashboard/graphql/get_instance_security_dashboard_projects.query.graphql'; import projectsQuery from 'ee/security_dashboard/graphql/queries/get_instance_security_dashboard_projects.query.graphql';
import createFlash from '~/flash'; import createFlash from '~/flash';
import { createProjectLoadingError } from '../helpers'; import { createProjectLoadingError } from '../helpers';
import InstanceSecurityVulnerabilities from './first_class_instance_security_dashboard_vulnerabilities.vue'; import InstanceSecurityVulnerabilities from './first_class_instance_security_dashboard_vulnerabilities.vue';
......
<script> <script>
import { GlAlert } from '@gitlab/ui'; import { GlAlert } from '@gitlab/ui';
import SecurityDashboardLayout from 'ee/security_dashboard/components/security_dashboard_layout.vue'; import SecurityDashboardLayout from 'ee/security_dashboard/components/security_dashboard_layout.vue';
import projectsQuery from 'ee/security_dashboard/graphql/get_instance_security_dashboard_projects.query.graphql'; import projectsQuery from 'ee/security_dashboard/graphql/queries/get_instance_security_dashboard_projects.query.graphql';
import { createProjectLoadingError } from '../helpers'; import { createProjectLoadingError } from '../helpers';
import ProjectManager from './first_class_project_manager/project_manager.vue'; import ProjectManager from './first_class_project_manager/project_manager.vue';
......
...@@ -3,7 +3,7 @@ import produce from 'immer'; ...@@ -3,7 +3,7 @@ import produce from 'immer';
import { GlAlert, GlIntersectionObserver, GlLoadingIcon } from '@gitlab/ui'; import { GlAlert, GlIntersectionObserver, GlLoadingIcon } from '@gitlab/ui';
import { fetchPolicies } from '~/lib/graphql'; import { fetchPolicies } from '~/lib/graphql';
import VulnerabilityList from './vulnerability_list.vue'; import VulnerabilityList from './vulnerability_list.vue';
import vulnerabilitiesQuery from '../graphql/instance_vulnerabilities.graphql'; import vulnerabilitiesQuery from '../graphql/queries/instance_vulnerabilities.query.graphql';
import { VULNERABILITIES_PER_PAGE } from '../store/constants'; import { VULNERABILITIES_PER_PAGE } from '../store/constants';
import { preparePageInfo } from '../helpers'; import { preparePageInfo } from '../helpers';
......
<script> <script>
import { GlButton } from '@gitlab/ui'; import { GlButton } from '@gitlab/ui';
import produce from 'immer'; import produce from 'immer';
import getProjects from 'ee/security_dashboard/graphql/get_projects.query.graphql'; import getProjects from 'ee/security_dashboard/graphql/queries/get_projects.query.graphql';
import projectsQuery from 'ee/security_dashboard/graphql/get_instance_security_dashboard_projects.query.graphql'; import projectsQuery from 'ee/security_dashboard/graphql/queries/get_instance_security_dashboard_projects.query.graphql';
import addProjectToSecurityDashboard from 'ee/security_dashboard/graphql/add_project_to_security_dashboard.mutation.graphql'; import addProjectToSecurityDashboard from 'ee/security_dashboard/graphql/mutations/add_project_to_security_dashboard.mutation.graphql';
import deleteProjectFromSecurityDashboard from 'ee/security_dashboard/graphql/delete_project_from_security_dashboard.mutation.graphql'; import deleteProjectFromSecurityDashboard from 'ee/security_dashboard/graphql/mutations/delete_project_from_security_dashboard.mutation.graphql';
import { createInvalidProjectMessage } from 'ee/security_dashboard/utils/first_class_project_manager_utils'; import { createInvalidProjectMessage } from 'ee/security_dashboard/utils/first_class_project_manager_utils';
import ProjectList from './project_list.vue'; import ProjectList from './project_list.vue';
import ProjectSelector from '~/vue_shared/components/project_selector/project_selector.vue'; import ProjectSelector from '~/vue_shared/components/project_selector/project_selector.vue';
......
...@@ -6,9 +6,9 @@ import DashboardNotConfigured from './empty_states/group_dashboard_not_configure ...@@ -6,9 +6,9 @@ import DashboardNotConfigured from './empty_states/group_dashboard_not_configure
import SecurityChartsLayout from './security_charts_layout.vue'; import SecurityChartsLayout from './security_charts_layout.vue';
import VulnerabilityChart from './first_class_vulnerability_chart.vue'; import VulnerabilityChart from './first_class_vulnerability_chart.vue';
import VulnerabilitySeverities from './first_class_vulnerability_severities.vue'; import VulnerabilitySeverities from './first_class_vulnerability_severities.vue';
import vulnerabilityHistoryQuery from '../graphql/group_vulnerability_history.query.graphql'; import vulnerabilityHistoryQuery from '../graphql/queries/group_vulnerability_history.query.graphql';
import vulnerabilityGradesQuery from '../graphql/group_vulnerability_grades.query.graphql'; import vulnerabilityGradesQuery from '../graphql/queries/group_vulnerability_grades.query.graphql';
import vulnerableProjectsQuery from '../graphql/vulnerable_projects.query.graphql'; import vulnerableProjectsQuery from '../graphql/queries/vulnerable_projects.query.graphql';
export default { export default {
components: { components: {
......
...@@ -6,9 +6,9 @@ import DashboardNotConfigured from './empty_states/instance_dashboard_not_config ...@@ -6,9 +6,9 @@ import DashboardNotConfigured from './empty_states/instance_dashboard_not_config
import SecurityChartsLayout from './security_charts_layout.vue'; import SecurityChartsLayout from './security_charts_layout.vue';
import VulnerabilityChart from './first_class_vulnerability_chart.vue'; import VulnerabilityChart from './first_class_vulnerability_chart.vue';
import VulnerabilitySeverities from './first_class_vulnerability_severities.vue'; import VulnerabilitySeverities from './first_class_vulnerability_severities.vue';
import projectsQuery from '../graphql/get_instance_security_dashboard_projects.query.graphql'; import projectsQuery from '../graphql/queries/get_instance_security_dashboard_projects.query.graphql';
import vulnerabilityHistoryQuery from '../graphql/instance_vulnerability_history.query.graphql'; import vulnerabilityHistoryQuery from '../graphql/queries/instance_vulnerability_history.query.graphql';
import vulnerabilityGradesQuery from '../graphql/instance_vulnerability_grades.query.graphql'; import vulnerabilityGradesQuery from '../graphql/queries/instance_vulnerability_grades.query.graphql';
export default { export default {
components: { components: {
......
...@@ -5,7 +5,7 @@ import { s__ } from '~/locale'; ...@@ -5,7 +5,7 @@ import { s__ } from '~/locale';
import SecurityReportsSummary from './security_reports_summary.vue'; import SecurityReportsSummary from './security_reports_summary.vue';
import SecurityDashboard from './security_dashboard_vuex.vue'; import SecurityDashboard from './security_dashboard_vuex.vue';
import { fetchPolicies } from '~/lib/graphql'; import { fetchPolicies } from '~/lib/graphql';
import pipelineSecurityReportSummaryQuery from '../graphql/pipeline_security_report_summary.query.graphql'; import pipelineSecurityReportSummaryQuery from '../graphql/queries/pipeline_security_report_summary.query.graphql';
import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin'; import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
export default { export default {
......
...@@ -3,7 +3,7 @@ import { GlLink } from '@gitlab/ui'; ...@@ -3,7 +3,7 @@ import { GlLink } from '@gitlab/ui';
import { __, s__ } from '~/locale'; import { __, s__ } from '~/locale';
import TimeAgoTooltip from '~/vue_shared/components/time_ago_tooltip.vue'; import TimeAgoTooltip from '~/vue_shared/components/time_ago_tooltip.vue';
import PipelineStatusBadge from './pipeline_status_badge.vue'; import PipelineStatusBadge from './pipeline_status_badge.vue';
import projectAutoFixMrsCountQuery from '../graphql/project_auto_fix_mrs_count.query.graphql'; import projectAutoFixMrsCountQuery from '../graphql/queries/project_auto_fix_mrs_count.query.graphql';
import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin'; import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
export default { export default {
......
...@@ -7,7 +7,7 @@ import { formatDate, getDateInPast } from '~/lib/utils/datetime_utility'; ...@@ -7,7 +7,7 @@ import { formatDate, getDateInPast } from '~/lib/utils/datetime_utility';
import { createProjectLoadingError } from '../helpers'; import { createProjectLoadingError } from '../helpers';
import DashboardNotConfigured from './empty_states/reports_not_configured.vue'; import DashboardNotConfigured from './empty_states/reports_not_configured.vue';
import SecurityChartsLayout from './security_charts_layout.vue'; import SecurityChartsLayout from './security_charts_layout.vue';
import projectsHistoryQuery from '../graphql/project_vulnerabilities_by_day_and_count.graphql'; import projectsHistoryQuery from '../graphql/queries/project_vulnerabilities_by_day_and_count.query.graphql';
const MAX_DAYS = 100; const MAX_DAYS = 100;
const ISO_DATE = 'isoDate'; const ISO_DATE = 'isoDate';
......
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
import { GlAlert, GlLoadingIcon, GlIntersectionObserver } from '@gitlab/ui'; import { GlAlert, GlLoadingIcon, GlIntersectionObserver } from '@gitlab/ui';
import produce from 'immer'; import produce from 'immer';
import { __ } from '~/locale'; import { __ } from '~/locale';
import securityScannersQuery from '../graphql/project_security_scanners.graphql'; import securityScannersQuery from '../graphql/queries/project_security_scanners.query.graphql';
import vulnerabilitiesQuery from '../graphql/project_vulnerabilities.query.graphql'; import vulnerabilitiesQuery from '../graphql/queries/project_vulnerabilities.query.graphql';
import vulnerabilitiesQueryAutoFix from '../graphql/project_vulnerabilities_autofix.query.graphql'; import vulnerabilitiesQueryAutoFix from '../graphql/queries/project_vulnerabilities_autofix.query.graphql';
import { preparePageInfo } from '../helpers'; import { preparePageInfo } from '../helpers';
import { VULNERABILITIES_PER_PAGE } from '../store/constants'; import { VULNERABILITIES_PER_PAGE } from '../store/constants';
import VulnerabilityList from './vulnerability_list.vue'; import VulnerabilityList from './vulnerability_list.vue';
......
...@@ -3,7 +3,7 @@ import { GlButton, GlFormSelect } from '@gitlab/ui'; ...@@ -3,7 +3,7 @@ import { GlButton, GlFormSelect } from '@gitlab/ui';
import { s__, n__ } from '~/locale'; import { s__, n__ } from '~/locale';
import toast from '~/vue_shared/plugins/global_toast'; import toast from '~/vue_shared/plugins/global_toast';
import createFlash from '~/flash'; import createFlash from '~/flash';
import vulnerabilityDismiss from '../graphql/vulnerability_dismiss.mutation.graphql'; import vulnerabilityDismiss from '../graphql/mutations/vulnerability_dismiss.mutation.graphql';
const REASON_NONE = s__('SecurityReports|[No reason]'); const REASON_NONE = s__('SecurityReports|[No reason]');
const REASON_WONT_FIX = s__("SecurityReports|Won't fix / Accept risk"); const REASON_WONT_FIX = s__("SecurityReports|Won't fix / Accept risk");
......
<script> <script>
import vulnerabilitySeveritiesCountQuery from '../graphql/vulnerability_severities_count.graphql'; import vulnerabilitySeveritiesCountQuery from '../graphql/queries/vulnerability_severities_count.query.graphql';
import VulnerabilityCountListLayout from './vulnerability_count_list_layout.vue'; import VulnerabilityCountListLayout from './vulnerability_count_list_layout.vue';
import { vulnerabilitiesSeverityCountScopes } from '../constants'; import { vulnerabilitiesSeverityCountScopes } from '../constants';
......
#import "ee/security_dashboard/graphql/vulnerability_severities_count.fragment.graphql" #import "ee/security_dashboard/graphql/fragments/vulnerability_severities_count.fragment.graphql"
fragment ProjectVulnerabilitySeveritiesCount on Project { fragment ProjectVulnerabilitySeveritiesCount on Project {
vulnerabilitySeveritiesCount { vulnerabilitySeveritiesCount {
......
import vulnerabilityConfirm from './vulnerability_confirm.mutation.graphql'; import vulnerabilityConfirm from './mutations/vulnerability_confirm.mutation.graphql';
import vulnerabilityDismiss from './vulnerability_dismiss.mutation.graphql'; import vulnerabilityDismiss from './mutations/vulnerability_dismiss.mutation.graphql';
import vulnerabilityResolve from './vulnerability_resolve.mutation.graphql'; import vulnerabilityResolve from './mutations/vulnerability_resolve.mutation.graphql';
import vulnerabilityRevertToDetected from './vulnerability_revert_to_detected.mutation.graphql'; import vulnerabilityRevertToDetected from './mutations/vulnerability_revert_to_detected.mutation.graphql';
export default { export default {
revert: vulnerabilityRevertToDetected, revert: vulnerabilityRevertToDetected,
......
#import "ee/security_dashboard/graphql/project.fragment.graphql" #import "ee/security_dashboard/graphql/fragments/project.fragment.graphql"
mutation addProjectToSecurityDashboard($id: ID!) { mutation addProjectToSecurityDashboard($id: ID!) {
addProjectToSecurityDashboard(input: { id: $id }) { addProjectToSecurityDashboard(input: { id: $id }) {
......
#import "ee/security_dashboard/graphql/project.fragment.graphql" #import "ee/security_dashboard/graphql/fragments/project.fragment.graphql"
#import "ee/security_dashboard/graphql/project_vulnerability_severities_count.fragment.graphql" #import "ee/security_dashboard/graphql/fragments/project_vulnerability_severities_count.fragment.graphql"
query projectsQuery { query projectsQuery {
instanceSecurityDashboard { instanceSecurityDashboard {
......
#import "~/graphql_shared/fragments/pageInfo.fragment.graphql" #import "~/graphql_shared/fragments/pageInfo.fragment.graphql"
#import "ee/security_dashboard/graphql/project.fragment.graphql" #import "ee/security_dashboard/graphql/fragments/project.fragment.graphql"
query getProjects( query getProjects(
$search: String! $search: String!
......
#import "./vulnerability_scanner.fragment.graphql" #import "ee/security_dashboard/graphql/fragments/vulnerability_scanner.fragment.graphql"
query groupSpecificScanners($fullPath: ID!) { query groupSpecificScanners($fullPath: ID!) {
group(fullPath: $fullPath) { group(fullPath: $fullPath) {
......
#import "~/graphql_shared/fragments/pageInfoCursorsOnly.fragment.graphql" #import "~/graphql_shared/fragments/pageInfoCursorsOnly.fragment.graphql"
#import "./vulnerability.fragment.graphql" #import "../fragments/vulnerability.fragment.graphql"
query group( query group(
$fullPath: ID! $fullPath: ID!
......
#import "ee/security_dashboard/graphql/project.fragment.graphql" #import "ee/security_dashboard/graphql/fragments/project.fragment.graphql"
#import "ee/security_dashboard/graphql/project_vulnerability_severities_count.fragment.graphql" #import "ee/security_dashboard/graphql/fragments/project_vulnerability_severities_count.fragment.graphql"
query groupVulnerabilityGrades($fullPath: ID!) { query groupVulnerabilityGrades($fullPath: ID!) {
group(fullPath: $fullPath) { group(fullPath: $fullPath) {
......
#import "./vulnerability_scanner.fragment.graphql" #import "ee/security_dashboard/graphql/fragments/vulnerability_scanner.fragment.graphql"
query instanceSpecificScanners { query instanceSpecificScanners {
instanceSecurityDashboard { instanceSecurityDashboard {
......
#import "~/graphql_shared/fragments/pageInfoCursorsOnly.fragment.graphql" #import "~/graphql_shared/fragments/pageInfoCursorsOnly.fragment.graphql"
#import "./vulnerability.fragment.graphql" #import "../fragments/vulnerability.fragment.graphql"
query instance( query instance(
$after: String $after: String
......
#import "ee/security_dashboard/graphql/project.fragment.graphql" #import "ee/security_dashboard/graphql/fragments/project.fragment.graphql"
#import "ee/security_dashboard/graphql/project_vulnerability_severities_count.fragment.graphql" #import "ee/security_dashboard/graphql/fragments/project_vulnerability_severities_count.fragment.graphql"
query instanceVulnerabilityGrades { query instanceVulnerabilityGrades {
instanceSecurityDashboard { instanceSecurityDashboard {
......
#import "./vulnerability_scanner.fragment.graphql" #import "ee/security_dashboard/graphql/fragments/vulnerability_scanner.fragment.graphql"
query projectSpecificScanners($fullPath: ID!) { query projectSpecificScanners($fullPath: ID!) {
project(fullPath: $fullPath) { project(fullPath: $fullPath) {
......
#import "~/graphql_shared/fragments/pageInfoCursorsOnly.fragment.graphql" #import "~/graphql_shared/fragments/pageInfoCursorsOnly.fragment.graphql"
#import "./vulnerability.fragment.graphql" #import "../fragments/vulnerability.fragment.graphql"
query project( query project(
$fullPath: ID! $fullPath: ID!
......
#import "~/graphql_shared/fragments/pageInfoCursorsOnly.fragment.graphql" #import "~/graphql_shared/fragments/pageInfoCursorsOnly.fragment.graphql"
#import "./vulnerability.fragment.graphql" #import "../fragments/vulnerability.fragment.graphql"
query project( query project(
$fullPath: ID! $fullPath: ID!
......
#import "ee/security_dashboard/graphql/vulnerability_severities_count.fragment.graphql" #import "ee/security_dashboard/graphql/fragments/vulnerability_severities_count.fragment.graphql"
query vulnerabilitySeveritiesCount( query vulnerabilitySeveritiesCount(
$fullPath: ID = "" $fullPath: ID = ""
......
#import "./project.fragment.graphql" #import "../fragments/project.fragment.graphql"
query group($fullPath: ID!) { query group($fullPath: ID!) {
group(fullPath: $fullPath) { group(fullPath: $fullPath) {
......
---
title: Refactor folder structure for security dashboard GraphQL files
merge_request: 51117
author: Kev @KevSlashNull
type: other
...@@ -3,7 +3,7 @@ import { shallowMount } from '@vue/test-utils'; ...@@ -3,7 +3,7 @@ import { shallowMount } from '@vue/test-utils';
import ProjectList from 'ee/security_dashboard/components/first_class_project_manager/project_list.vue'; import ProjectList from 'ee/security_dashboard/components/first_class_project_manager/project_list.vue';
import ProjectManager from 'ee/security_dashboard/components/first_class_project_manager/project_manager.vue'; import ProjectManager from 'ee/security_dashboard/components/first_class_project_manager/project_manager.vue';
import getProjects from 'ee/security_dashboard/graphql/get_projects.query.graphql'; import getProjects from 'ee/security_dashboard/graphql/queries/get_projects.query.graphql';
import waitForPromises from 'helpers/wait_for_promises'; import waitForPromises from 'helpers/wait_for_promises';
import { deprecatedCreateFlash as createFlash } from '~/flash'; import { deprecatedCreateFlash as createFlash } from '~/flash';
import ProjectSelector from '~/vue_shared/components/project_selector/project_selector.vue'; import ProjectSelector from '~/vue_shared/components/project_selector/project_selector.vue';
......
...@@ -2,8 +2,8 @@ import { GlLink } from '@gitlab/ui'; ...@@ -2,8 +2,8 @@ import { GlLink } from '@gitlab/ui';
import { shallowMount, createLocalVue } from '@vue/test-utils'; import { shallowMount, createLocalVue } from '@vue/test-utils';
import VueApollo from 'vue-apollo'; import VueApollo from 'vue-apollo';
import VulnerabilitySeverity from 'ee/security_dashboard/components/first_class_vulnerability_severities.vue'; import VulnerabilitySeverity from 'ee/security_dashboard/components/first_class_vulnerability_severities.vue';
import groupVulnerabilityGradesQuery from 'ee/security_dashboard/graphql/group_vulnerability_grades.query.graphql'; import groupVulnerabilityGradesQuery from 'ee/security_dashboard/graphql/queries/group_vulnerability_grades.query.graphql';
import instanceVulnerabilityGradesQuery from 'ee/security_dashboard/graphql/instance_vulnerability_grades.query.graphql'; import instanceVulnerabilityGradesQuery from 'ee/security_dashboard/graphql/queries/instance_vulnerability_grades.query.graphql';
import { severityGroupTypes } from 'ee/security_dashboard/store/modules/vulnerable_projects/constants'; import { severityGroupTypes } from 'ee/security_dashboard/store/modules/vulnerable_projects/constants';
import { Accordion, AccordionItem } from 'ee/vue_shared/components/accordion'; import { Accordion, AccordionItem } from 'ee/vue_shared/components/accordion';
import { trimText } from 'helpers/text_helper'; import { trimText } from 'helpers/text_helper';
......
...@@ -5,16 +5,19 @@ import VulnerabilityChart from 'ee/security_dashboard/components/first_class_vul ...@@ -5,16 +5,19 @@ import VulnerabilityChart from 'ee/security_dashboard/components/first_class_vul
import VulnerabilitySeverities from 'ee/security_dashboard/components/first_class_vulnerability_severities.vue'; import VulnerabilitySeverities from 'ee/security_dashboard/components/first_class_vulnerability_severities.vue';
import GroupSecurityCharts from 'ee/security_dashboard/components/group_security_charts.vue'; import GroupSecurityCharts from 'ee/security_dashboard/components/group_security_charts.vue';
import SecurityChartsLayout from 'ee/security_dashboard/components/security_charts_layout.vue'; import SecurityChartsLayout from 'ee/security_dashboard/components/security_charts_layout.vue';
import vulnerabilityGradesQuery from 'ee/security_dashboard/graphql/group_vulnerability_grades.query.graphql'; import vulnerabilityGradesQuery from 'ee/security_dashboard/graphql/queries/group_vulnerability_grades.query.graphql';
import vulnerabilityHistoryQuery from 'ee/security_dashboard/graphql/group_vulnerability_history.query.graphql'; import vulnerabilityHistoryQuery from 'ee/security_dashboard/graphql/queries/group_vulnerability_history.query.graphql';
import { TEST_HOST } from 'jest/helpers/test_constants'; import { TEST_HOST } from 'jest/helpers/test_constants';
jest.mock('ee/security_dashboard/graphql/group_vulnerability_grades.query.graphql', () => ({ jest.mock('ee/security_dashboard/graphql/queries/group_vulnerability_grades.query.graphql', () => ({
mockGrades: true, mockGrades: true,
})); }));
jest.mock('ee/security_dashboard/graphql/group_vulnerability_history.query.graphql', () => ({ jest.mock(
mockHistory: true, 'ee/security_dashboard/graphql/queries/group_vulnerability_history.query.graphql',
})); () => ({
mockHistory: true,
}),
);
describe('Group Security Charts component', () => { describe('Group Security Charts component', () => {
let wrapper; let wrapper;
......
...@@ -5,15 +5,21 @@ import VulnerabilityChart from 'ee/security_dashboard/components/first_class_vul ...@@ -5,15 +5,21 @@ import VulnerabilityChart from 'ee/security_dashboard/components/first_class_vul
import VulnerabilitySeverities from 'ee/security_dashboard/components/first_class_vulnerability_severities.vue'; import VulnerabilitySeverities from 'ee/security_dashboard/components/first_class_vulnerability_severities.vue';
import InstanceSecurityCharts from 'ee/security_dashboard/components/instance_security_charts.vue'; import InstanceSecurityCharts from 'ee/security_dashboard/components/instance_security_charts.vue';
import SecurityChartsLayout from 'ee/security_dashboard/components/security_charts_layout.vue'; import SecurityChartsLayout from 'ee/security_dashboard/components/security_charts_layout.vue';
import vulnerabilityGradesQuery from 'ee/security_dashboard/graphql/instance_vulnerability_grades.query.graphql'; import vulnerabilityGradesQuery from 'ee/security_dashboard/graphql/queries/instance_vulnerability_grades.query.graphql';
import vulnerabilityHistoryQuery from 'ee/security_dashboard/graphql/instance_vulnerability_history.query.graphql'; import vulnerabilityHistoryQuery from 'ee/security_dashboard/graphql/queries/instance_vulnerability_history.query.graphql';
jest.mock('ee/security_dashboard/graphql/instance_vulnerability_grades.query.graphql', () => ({ jest.mock(
mockGrades: true, 'ee/security_dashboard/graphql/queries/instance_vulnerability_grades.query.graphql',
})); () => ({
jest.mock('ee/security_dashboard/graphql/instance_vulnerability_history.query.graphql', () => ({ mockGrades: true,
mockHistory: true, }),
})); );
jest.mock(
'ee/security_dashboard/graphql/queries/instance_vulnerability_history.query.graphql',
() => ({
mockHistory: true,
}),
);
describe('Instance Security Charts component', () => { describe('Instance Security Charts component', () => {
let wrapper; let wrapper;
......
...@@ -5,7 +5,7 @@ import VueApollo from 'vue-apollo'; ...@@ -5,7 +5,7 @@ import VueApollo from 'vue-apollo';
import DashboardNotConfigured from 'ee/security_dashboard/components/empty_states/reports_not_configured.vue'; import DashboardNotConfigured from 'ee/security_dashboard/components/empty_states/reports_not_configured.vue';
import ProjectSecurityCharts from 'ee/security_dashboard/components/project_security_charts.vue'; import ProjectSecurityCharts from 'ee/security_dashboard/components/project_security_charts.vue';
import SecurityChartsLayout from 'ee/security_dashboard/components/security_charts_layout.vue'; import SecurityChartsLayout from 'ee/security_dashboard/components/security_charts_layout.vue';
import projectsHistoryQuery from 'ee/security_dashboard/graphql/project_vulnerabilities_by_day_and_count.graphql'; import projectsHistoryQuery from 'ee/security_dashboard/graphql/queries/project_vulnerabilities_by_day_and_count.query.graphql';
import createMockApollo from 'jest/helpers/mock_apollo_helper'; import createMockApollo from 'jest/helpers/mock_apollo_helper';
import { import {
mockProjectSecurityChartsWithData, mockProjectSecurityChartsWithData,
......
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