mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Fix top-bar extension render errors (#3049)
* fix top-bar extension render errors Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com> * fix tests Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
1 parent
a320516963
commit
80f66f0569
4 files changed
+33
-5
No files matched your search
+3
-3
@@ -22,8 +22,8 @@
|
||||
import React from "react";
|
||||
import { render } from "@testing-library/react";
|
||||
import "@testing-library/jest-dom/extend-expect";
|
||||
import { TopBar } from "../layout/topbar";
|
||||
import { TopBarRegistry } from "../../../extensions/registries";
|
||||
import { TopBar } from "../topbar";
|
||||
import { TopBarRegistry } from "../../../../extensions/registries";
|
||||
|
||||
describe("<TopBar/>", () => {
|
||||
beforeEach(() => {
|
||||
@@ -53,7 +53,7 @@ describe("<TopBar/>", () => {
|
||||
TopBarRegistry.getInstance().getItems = jest.fn().mockImplementationOnce(() => [
|
||||
{
|
||||
components: {
|
||||
Item: <span data-testid={testId}>{text}</span>
|
||||
Item: () => <span data-testid={testId}>{text}</span>
|
||||
}
|
||||
}
|
||||
]);
|
||||
@@ -45,7 +45,7 @@ export const TopBar = observer(({ label, children, ...rest }: Props) => {
|
||||
|
||||
return (
|
||||
<div key={index}>
|
||||
{registration.components.Item}
|
||||
<registration.components.Item />
|
||||
</div>
|
||||
);
|
||||
})}
|
||||
|
||||
Reference in new issue
Block a user