Browse Source

Fixes #5455 - Mobile Ticket Information View displaying internalId instead of ticket number.

Dominik Klein 2 months ago
parent
commit
df374f06b8

+ 2 - 4
app/frontend/apps/mobile/pages/ticket/__tests__/ticket-information-update.spec.ts

@@ -28,10 +28,6 @@ vi.hoisted(() => {
   vi.setSystemTime(now)
   vi.setSystemTime(now)
 })
 })
 
 
-// Vitest has a bug where vi.hoisted is not hoisted if there is no vi.mock
-// TODO: remove when updating to Vitest 1.0
-vi.mock('./non-existing.js')
-
 const visitTicketInformation = async (ticket?: TicketQuery) => {
 const visitTicketInformation = async (ticket?: TicketQuery) => {
   mockPermissions(['ticket.agent'])
   mockPermissions(['ticket.agent'])
   mockGraphQLApi(ObjectManagerFrontendAttributesDocument).willBehave(
   mockGraphQLApi(ObjectManagerFrontendAttributesDocument).willBehave(
@@ -101,6 +97,8 @@ describe('updating ticket information', () => {
   it('shows confirm popup, when leaving', async () => {
   it('shows confirm popup, when leaving', async () => {
     const { view } = await visitTicketInformation()
     const { view } = await visitTicketInformation()
 
 
+    expect(await view.findByText('#610001')).toBeInTheDocument()
+
     await getNode('form-ticket-edit')?.settled
     await getNode('form-ticket-edit')?.settled
 
 
     await view.events.type(view.getByLabelText('Ticket title'), '55')
     await view.events.type(view.getByLabelText('Ticket title'), '55')

+ 1 - 1
app/frontend/apps/mobile/pages/ticket/views/TicketInformation/TicketInformationView.vue

@@ -67,7 +67,7 @@ const router = useRouter()
   <LayoutHeader
   <LayoutHeader
     ref="headerElement"
     ref="headerElement"
     :refetch="refetchingStatus"
     :refetch="refetchingStatus"
-    :back-title="`#${internalId}`"
+    :back-title="`#${ticket?.number}`"
     :title="$t('Ticket information')"
     :title="$t('Ticket information')"
     :back-url="`/tickets/${internalId}`"
     :back-url="`/tickets/${internalId}`"
     :style="stickyStyles.header"
     :style="stickyStyles.header"