diff --git a/apps/website/src/components/workshop/ModelsCatalogue.test.ts b/apps/website/src/components/workshop/ModelsCatalogue.test.ts index cf392dd16ec..3a07d02f887 100644 --- a/apps/website/src/components/workshop/ModelsCatalogue.test.ts +++ b/apps/website/src/components/workshop/ModelsCatalogue.test.ts @@ -87,6 +87,20 @@ describe('ModelsCatalogue', () => { ).toBeNull() }) + // The line under the title belongs to the half that is open, so the eyebrow + // is what has to hold still: it names the whole catalogue, not the tab. + it('names the Hub in the eyebrow on every tab', async () => { + const user = userEvent.setup() + render(ModelsCatalogue, { props: { models: launchModels } }) + + const hero = () => screen.getByTestId('workshop-hero') + expect(hero()).toHaveTextContent('Hub') + + await user.click(screen.getByRole('button', { name: 'Workflows' })) + await screen.findByRole('heading', { name: 'Create product photos & ads' }) + expect(hero()).toHaveTextContent('Hub') + }) + it('opens the workflow tab from its return link and filters by its own categories', async () => { history.replaceState(null, '', '/models/?type=workflows') const user = userEvent.setup() diff --git a/apps/website/src/components/workshop/ModelsCatalogue.vue b/apps/website/src/components/workshop/ModelsCatalogue.vue index 2005864f481..f745856aad5 100644 --- a/apps/website/src/components/workshop/ModelsCatalogue.vue +++ b/apps/website/src/components/workshop/ModelsCatalogue.vue @@ -79,7 +79,7 @@ watch(