CommonOrganizationAvatar.spec.ts 754 B

1234567891011121314151617181920212223242526272829
  1. // Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. import { renderComponent } from '#tests/support/components/index.ts'
  3. import CommonOrganizationAvatar from '../CommonOrganizationAvatar.vue'
  4. describe('CommonOrganizationAvatar', () => {
  5. it('renders avatar', async () => {
  6. const view = renderComponent(CommonOrganizationAvatar, {
  7. props: {
  8. entity: {
  9. name: 'Zammad Foundation',
  10. active: true,
  11. },
  12. },
  13. })
  14. expect(view.getByIconName('organization')).toBeInTheDocument()
  15. await view.rerender({
  16. entity: {
  17. name: 'Zammad Foundation',
  18. active: false,
  19. },
  20. })
  21. expect(view.getByIconName('inactive-organization')).toBeInTheDocument()
  22. })
  23. })