Fix TechDocs test
Signed-off-by: Philipp Hugenroth <philipph@spotify.com>
This commit is contained in:
@@ -34,8 +34,7 @@
|
||||
"dependencies": {
|
||||
"@emotion/react": "^11.10.5",
|
||||
"@emotion/styled": "^11.10.5",
|
||||
"@mui/material": "^5.12.2",
|
||||
"@mui/styles": "^5.11.2"
|
||||
"@mui/material": "^5.12.2"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@material-ui/core": "^4.12.2",
|
||||
|
||||
@@ -21,7 +21,7 @@ import React, { ReactElement } from 'react';
|
||||
import { screen } from 'testing-library__dom';
|
||||
import { renderToStaticMarkup } from 'react-dom/server';
|
||||
import { Route } from 'react-router-dom';
|
||||
import { act, render } from '@testing-library/react';
|
||||
import { act, render, waitFor } from '@testing-library/react';
|
||||
|
||||
import { wrapInTestApp, TestApiProvider } from '@backstage/test-utils';
|
||||
import { FlatRoutes } from '@backstage/core-app-api';
|
||||
@@ -278,7 +278,9 @@ export class TechDocsAddonTester {
|
||||
render(this.build());
|
||||
});
|
||||
|
||||
const shadowHost = screen.getByTestId('techdocs-native-shadowroot');
|
||||
await waitFor(() => screen.getByText('Documentation'));
|
||||
|
||||
const shadowHost = await screen.findByTestId('techdocs-native-shadowroot');
|
||||
|
||||
return {
|
||||
...screen,
|
||||
|
||||
Reference in New Issue
Block a user