Browse Source

Maintenance: Desktop View - Blocked aria-hidden on an element because its...

Benjamin Scharf 3 months ago
parent
commit
d71d67f799

+ 0 - 1
app/frontend/apps/desktop/components/CommonOverlayContainer/CommonOverlayContainer.vue

@@ -35,7 +35,6 @@ defineEmits<{
         :class="backdropClass"
         role="presentation"
         tabindex="-1"
-        aria-hidden="true"
         @click="!noCloseOnBackdropClick && $emit('click-background')"
       />
     </teleport>

+ 12 - 5
app/frontend/apps/desktop/pages/ticket/__tests__/ticket-detail-view/ticket-detail-view-edit.spec.ts

@@ -1,7 +1,12 @@
 // Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
 
 import { getNode } from '@formkit/core'
-import { getByLabelText, getByRole, within } from '@testing-library/vue'
+import {
+  getByLabelText,
+  getByRole,
+  waitFor,
+  within,
+} from '@testing-library/vue'
 import { expect } from 'vitest'
 
 import { visitView } from '#tests/support/components/visitView.ts'
@@ -939,14 +944,16 @@ describe('Ticket detail view', () => {
         view.getByRole('button', { name: 'Discard unsaved reply' }),
       )
 
-      expect(
-        await view.findByRole('dialog', { name: 'Unsaved Changes' }),
-      ).toBeInTheDocument()
+      const dialog = await view.findByRole('dialog', {
+        name: 'Unsaved Changes',
+      })
 
       await view.events.click(
-        view.getByRole('button', { name: 'Discard Changes' }),
+        within(dialog).getByRole('button', { name: 'Discard Changes' }),
       )
 
+      await waitFor(() => expect(dialog).not.toBeInTheDocument())
+
       expect(
         view.queryByRole('button', {
           name: 'Discard your unsaved changes',