0
  A   	ˆl–Ãa¾”Ò~êq@µq \”Å£�þZq•œp¸ËíAxÏÈƒDÏÇ_ŠI|¥ŠGgYâ¯ÇÆ c    	# Sources

This is a fork of the official PHP repository which receives backport of security fixes from maintained branches.

This branch is **PHP version 8.1.34** with security fixes (see the NEWS file).

# Binary distributions

Known list of providers using this repository as sources for build of old PHP version with extended security support:

## RPM

### Fedora / RHEL / CentOS / AlmaLinux / RockyLinux

* [Remi's RPM repository](https://rpms.remirepo.net/)

## DEB

### Debian / Ubuntu

* [DEB.SURY.ORG](https://deb.sury.org) - Debian [stable](https://wiki.debian.org/DebianStable) and [oldstable](https://wiki.debian.org/DebianOldStable); Ubuntu [LTS](https://ubuntu.com/about/release-cycle)
* [PHP LTS by Freexian](https://www.freexian.com/lts/php/) - Debian [LTS](https://wiki.debian.org/LTS) and [ELTS](https://wiki.debian.org/LTS/Extended) releases; Ubuntu [LTS](https://ubuntu.com/about/release-cycle) and [ESM](https://ubuntu.com/security/esm) releases

## ZIP

### Windows

* [php-eol-security](https://github.com/Jamalofski/php-eol-security) - unofficial builds for Windows x64 and x86, Thread Safe and NTS
  J   ˆl–Ü4ý()¸µ¨ 	• íÀ†àžS�ÿŽþZÎ¦Ç)O ÏÊ74Éa–ßi~” T¾R( 	Å�?p@S�ÿÈ  J    ; configuration for php pgsql module
; priority=20
extension=pdo_pgsql.so
  K   ˆl–Ü4ý('ÜZÔâ€vàZ¸ÓJbÑ¿�þCAYÆÈÜ�¸ÛmÊÿŸÌƒq÷]Ë_“I|¥ŽõHºl=$¤�zTÖ™	ÀÊ A    // Copyright (C) 2012-2026 Zammad Foundation, https://zammad-foundation.org/

import { within } from '@testing-library/vue'
import { flushPromises } from '@vue/test-utils'
import { computed } from 'vue'

import renderComponent from '#tests/support/components/renderComponent.ts'
import { mockPermissions } from '#tests/support/mock-permissions.ts'

import { convertToGraphQLId } from '#shared/graphql/utils.ts'
import QueryHandler from '#shared/server/apollo/handler/QueryHandler.ts'
import { SYSTEM_USER_ID, SYSTEM_USER_INTERNAL_ID } from '#shared/utils/constants.ts'

import {
  mockUserInfoForPopoverQuery,
  waitForUserInfoForPopoverQueryCalls,
} from '../UserPopoverWithTrigger/graphql/queries/userInfoForPopover.mocks.ts'
import UserPopover from '../UserPopoverWithTrigger/UserPopover.vue'
import UserPopoverWithTrigger, { type Props } from '../UserPopoverWithTrigger.vue'

const dummyUser = {
  id: convertToGraphQLId('User', 3),
  internalId: 3,
  fullname: 'Nicole Braun',
  vip: false,
  organization: {
    id: convertToGraphQLId('Organization', 1),
    internalId: 1,
    name: 'Zammad Foundation',
    active: true,
    vip: false,
    ticketsCount: {
      open: 5,
      closed: 0,
    },
  },
  secondaryOrganizations: {
    edges: [
      {
        node: {
          id: convertToGraphQLId('Organization', 2),
          internalId: 2,
          active: true,
          vip: false,
          name: 'Apple',
        },
      },
    ],
    totalCount: 1,
  },
  hasSecondaryOrganizations: true,
}

const systemUser = {
  id: SYSTEM_USER_ID,
  internalId: SYSTEM_USER_INTERNAL_ID,
  fullname: 'System',
  vip: false,
  organization: {
    id: convertToGraphQLId('Organization', 1),
    internalId: 1,
    name: 'Zammad Foundation',
    active: true,
    vip: false,
    ticketsCount: {
      open: 5,
      closed: 0,
    },
  },
}

const renderUserPopover = (
  props?: Partial<Props>,
  permission = 'ticket.agent',
  isSystemUser = false,
) => {
  mockUserInfoForPopoverQuery({
    user: props?.user ?? dummyUser,
  })

  mockPermissions([permission])

  return renderComponent(UserPopoverWithTrigger, {
    props: {
      ...props,
      user: isSystemUser ? systemUser : (props?.user ?? dummyUser),
    },
    router: true,
    form: true,
  })
}

describe('UserPopover', () => {
  it('displays the user avatar by default', () => {
    const wrapper = renderUserPopover()
    expect(wrapper.getByRole('img', { name: `Avatar (${dummyUser.fullname})` })).toBeVisible()
  })

  it('shows a skeleton when user info is not available', async () => {
    vi.useFakeTimers()

    vi.spyOn(QueryHandler.prototype, 'loadi