Fix TechDocs test

Signed-off-by: Philipp Hugenroth <philipph@spotify.com>
This commit is contained in:
Philipp Hugenroth
2023-05-03 14:49:48 +02:00
parent 9b714a9bfd
commit 103cd94ef1
3 changed files with 5 additions and 5 deletions
+1 -2
View File
@@ -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,
-1
View File
@@ -9631,7 +9631,6 @@ __metadata:
"@emotion/react": ^11.10.5
"@emotion/styled": ^11.10.5
"@mui/material": ^5.12.2
"@mui/styles": ^5.11.2
"@types/react": ^16.13.1 || ^17.0.0
peerDependencies:
"@material-ui/core": ^4.12.2