mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Fixing tests
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
parent
08a4d15494
commit
2213de5b20
@ -28,6 +28,7 @@ import { getDiForUnitTesting } from "../../getDiForUnitTesting";
|
|||||||
import { AppPreferenceRegistry } from "../../../../extensions/registries";
|
import { AppPreferenceRegistry } from "../../../../extensions/registries";
|
||||||
import { computed } from "mobx";
|
import { computed } from "mobx";
|
||||||
import { MemoryRouter } from "react-router-dom";
|
import { MemoryRouter } from "react-router-dom";
|
||||||
|
import "@testing-library/jest-dom/extend-expect";
|
||||||
|
|
||||||
describe("Preferences", () => {
|
describe("Preferences", () => {
|
||||||
let di: ConfigurableDependencyInjectionContainer;
|
let di: ConfigurableDependencyInjectionContainer;
|
||||||
@ -55,8 +56,8 @@ describe("Preferences", () => {
|
|||||||
return computed(() => [] as any);
|
return computed(() => [] as any);
|
||||||
});
|
});
|
||||||
|
|
||||||
const { getByTestId } = render(<MemoryRouter><Preferences /></MemoryRouter>);
|
const { queryByTestId } = render(<MemoryRouter><Preferences /></MemoryRouter>);
|
||||||
|
|
||||||
expect(getByTestId("custom-settings")).not.toBeInTheDocument();
|
expect(queryByTestId("custom-settings")).not.toBeInTheDocument();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@ -80,7 +80,6 @@ class Preferences extends React.Component<Dependencies> {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Tabs className="flex column" scrollable={false} onChange={(url) => {
|
<Tabs className="flex column" scrollable={false} onChange={(url) => {
|
||||||
console.log("URL ", url)
|
|
||||||
navigateWithoutHistoryChange({ pathname: url });
|
navigateWithoutHistoryChange({ pathname: url });
|
||||||
}}>
|
}}>
|
||||||
<div className="header">Preferences</div>
|
<div className="header">Preferences</div>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user