From 74cbcadfb6f23007c2c27d8b7aba1702caea10cc Mon Sep 17 00:00:00 2001 From: Artur Fedorov <afedorov@gitlab.com> Date: Tue, 25 Feb 2025 23:34:34 +0100 Subject: [PATCH] Fix specs for Vue 3 Fix failing specs in Vue 3 fix match snapshot --- .../scanner_profile_selector_spec.js.snap | 38 ++++++++++++++++--- .../scanner_profile_selector_spec.js | 4 ++ scripts/frontend/quarantined_vue3_specs.txt | 2 +- 3 files changed, 37 insertions(+), 7 deletions(-) diff --git a/ee/spec/frontend/security_configuration/dast_profiles/dast_profile_selector/__snapshots__/scanner_profile_selector_spec.js.snap b/ee/spec/frontend/security_configuration/dast_profiles/dast_profile_selector/__snapshots__/scanner_profile_selector_spec.js.snap index 26ff1a25d6121..c3c2e843e2212 100644 --- a/ee/spec/frontend/security_configuration/dast_profiles/dast_profile_selector/__snapshots__/scanner_profile_selector_spec.js.snap +++ b/ee/spec/frontend/security_configuration/dast_profiles/dast_profile_selector/__snapshots__/scanner_profile_selector_spec.js.snap @@ -19,11 +19,24 @@ exports[`ScannerProfileSelector renders properly with no profiles 1`] = ` /> </p> </div> - <empty-state-stub + <div class="gl-mb-4" > - No scanner profile selected Select a scanner profile to run a DAST scan - </empty-state-stub> + <div + class="gl-bg-subtle gl-flex gl-flex-col gl-items-center gl-mb-5 gl-p-6 gl-rounded-small gl-text-center" + > + <h5 + class="gl-h5 gl-mb-2 gl-mt-0 gl-text-subtle" + > + No scanner profile selected + </h5> + <span + class="gl-text-subtle" + > + Select a scanner profile to run a DAST scan + </span> + </div> + </div> <gl-button-stub buttontextclasses="" category="secondary" @@ -56,11 +69,24 @@ exports[`ScannerProfileSelector renders properly with profiles 1`] = ` /> </p> </div> - <empty-state-stub + <div class="gl-mb-4" > - No scanner profile selected Select a scanner profile to run a DAST scan - </empty-state-stub> + <div + class="gl-bg-subtle gl-flex gl-flex-col gl-items-center gl-mb-5 gl-p-6 gl-rounded-small gl-text-center" + > + <h5 + class="gl-h5 gl-mb-2 gl-mt-0 gl-text-subtle" + > + No scanner profile selected + </h5> + <span + class="gl-text-subtle" + > + Select a scanner profile to run a DAST scan + </span> + </div> + </div> <gl-button-stub buttontextclasses="" category="secondary" diff --git a/ee/spec/frontend/security_configuration/dast_profiles/dast_profile_selector/scanner_profile_selector_spec.js b/ee/spec/frontend/security_configuration/dast_profiles/dast_profile_selector/scanner_profile_selector_spec.js index d2084847f6a3d..3f11a8eb66753 100644 --- a/ee/spec/frontend/security_configuration/dast_profiles/dast_profile_selector/scanner_profile_selector_spec.js +++ b/ee/spec/frontend/security_configuration/dast_profiles/dast_profile_selector/scanner_profile_selector_spec.js @@ -1,5 +1,6 @@ import { shallowMount } from '@vue/test-utils'; import ScannerProfileSelector from 'ee/security_configuration/dast_profiles/dast_profile_selector/scanner_profile_selector.vue'; +import EmptyState from 'ee/security_configuration/dast_profiles/dast_profile_selector/empty_state.vue'; import { scannerProfiles } from 'ee_jest/security_configuration/dast_profiles/mocks/mock_data'; import { extendedWrapper } from 'helpers/vue_test_utils_helper'; @@ -13,6 +14,9 @@ describe('ScannerProfileSelector', () => { profiles: [], props, }, + stubs: { + EmptyState, + }, }), ); }; diff --git a/scripts/frontend/quarantined_vue3_specs.txt b/scripts/frontend/quarantined_vue3_specs.txt index 3155e3b5f5c9b..8ea5daa02a596 100644 --- a/scripts/frontend/quarantined_vue3_specs.txt +++ b/scripts/frontend/quarantined_vue3_specs.txt @@ -74,7 +74,7 @@ ee/spec/frontend/roles_and_permissions/components/role_selector_spec.js ee/spec/frontend/security_configuration/components/app_spec.js ee/spec/frontend/security_configuration/components/dynamic_fields_spec.js ee/spec/frontend/security_configuration/dast_profiles/components/dast_profiles_list_spec.js -ee/spec/frontend/security_configuration/dast_profiles/dast_profile_selector/scanner_profile_selector_spec.js +ee/spec/frontend/security_configuration/dast_profiles/dast_profile_selector/site_profile_selector_spec.js ee/spec/frontend/security_dashboard/components/shared/filters/querystring_sync_spec.js ee/spec/frontend/security_dashboard/components/shared/vulnerability_details_graphql/details_section_spec.js ee/spec/frontend/security_dashboard/components/shared/vulnerability_report/vulnerability_list_graphql_spec.js -- GitLab