LayoutPublicPage.spec.ts 901 B

1234567891011121314151617181920212223242526272829303132
  1. // Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. import { renderComponent } from '#tests/support/components/index.ts'
  3. import { mockApplicationConfig } from '#tests/support/mock-applicationConfig.ts'
  4. import LayoutPublicPage from '../LayoutPublicPage/LayoutPublicPage.vue'
  5. const applicationConfig = {
  6. product_name: 'Zammad Example App',
  7. product_logo: 'example-logo.svg',
  8. }
  9. describe('public page layout', () => {
  10. beforeEach(() => {
  11. mockApplicationConfig(applicationConfig)
  12. })
  13. it('renders title and logo', async () => {
  14. const view = renderComponent(LayoutPublicPage, {
  15. props: {
  16. title: 'Example Title',
  17. showLogo: true,
  18. },
  19. router: true,
  20. })
  21. expect(view.getByText('Example Title')).toBeInTheDocument()
  22. const logo = view.getByAltText(applicationConfig.product_name)
  23. expect(logo).toBeInTheDocument()
  24. })
  25. })