From 989b1a146ca5e8287fc8fa61b13635892e5a8e02 Mon Sep 17 00:00:00 2001
From: Artur Fedorov <afedorov@gitlab.com>
Date: Thu, 26 Dec 2024 16:02:27 +0000
Subject: [PATCH] Fix Vue 3 failing test

Negative index is not
supported in VUE 3

EE: true
---
 .../vulnerabilities/generic_report/types/list_graphql_spec.js  | 3 ++-
 scripts/frontend/quarantined_vue3_specs.txt                    | 1 -
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/ee/spec/frontend/vulnerabilities/generic_report/types/list_graphql_spec.js b/ee/spec/frontend/vulnerabilities/generic_report/types/list_graphql_spec.js
index 9a578ac35b3d..8a4d04a05d31 100644
--- a/ee/spec/frontend/vulnerabilities/generic_report/types/list_graphql_spec.js
+++ b/ee/spec/frontend/vulnerabilities/generic_report/types/list_graphql_spec.js
@@ -58,7 +58,8 @@ describe('ee/vulnerabilities/components/generic_report/types/report_type_list_gr
     });
 
     it('applies the correct classes to the list items', () => {
-      const lastItem = findListItems().at(-1);
+      const lastIndex = items.length - 1;
+      const lastItem = findListItems().at(lastIndex);
       expect(lastItem.classes().includes('!gl-list-none')).toBe(hasNestedList);
     });
   });
diff --git a/scripts/frontend/quarantined_vue3_specs.txt b/scripts/frontend/quarantined_vue3_specs.txt
index 16215e8d6640..2bdc9396505c 100644
--- a/scripts/frontend/quarantined_vue3_specs.txt
+++ b/scripts/frontend/quarantined_vue3_specs.txt
@@ -105,7 +105,6 @@ ee/spec/frontend/users/identity_verification/components/verify_phone_verificatio
 ee/spec/frontend/vue_merge_request_widget/components/mr_widget_pipeline_container_spec.js
 ee/spec/frontend/vue_shared/components/groups_list/groups_list_item_spec.js
 ee/spec/frontend/vue_shared/components/projects_list/projects_list_item_spec.js
-ee/spec/frontend/vulnerabilities/generic_report/types/list_graphql_spec.js
 ee/spec/frontend/vulnerabilities/related_issues_spec.js
 spec/frontend/__helpers__/vue_test_utils_helper_spec.js
 spec/frontend/access_tokens/index_spec.js
-- 
GitLab