mirror of
https://github.com/portainer/portainer.git
synced 2025-07-22 23:09:41 +02:00
fix(help): add versioned doc links to support LTS/STS docs [EE-6780] (#11281)
This commit is contained in:
parent
385fd95779
commit
eda2dd20ee
3 changed files with 32 additions and 10 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue