1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-30 18:59:41 +02:00

fix(help): add versioned doc links to support LTS/STS docs [EE-6780] (#11282)

This commit is contained in:
Matt Hook 2024-03-01 15:36:19 +13:00 committed by GitHub
parent a43454076b
commit ff178641be
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 32 additions and 10 deletions

View file

@ -1,3 +1,5 @@
import { QueryClient, QueryClientProvider } from 'react-query';
import { UserContext } from '@/react/hooks/useUser';
import { UserViewModel } from '@/portainer/models/user';
import { render } from '@/react-tools/test-utils';
@ -23,14 +25,17 @@ test('should not render without a wrapping HeaderContainer', async () => {
test('should display a HeaderTitle', async () => {
const username = 'username';
const user = new UserViewModel({ Username: username });
const queryClient = new QueryClient();
const title = 'title';
const { queryByText } = render(
<UserContext.Provider value={{ user }}>
<HeaderContainer>
<HeaderTitle title={title} />
</HeaderContainer>
</UserContext.Provider>
<QueryClientProvider client={queryClient}>
<UserContext.Provider value={{ user }}>
<HeaderContainer>
<HeaderTitle title={title} />
</HeaderContainer>
</UserContext.Provider>
</QueryClientProvider>
);
const heading = queryByText(title);