mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
fix tests
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
parent
9fbcac482c
commit
a8ab69de87
@ -57,18 +57,25 @@ describe("<SidebarCluster/>", () => {
|
||||
});
|
||||
|
||||
it("renders cluster avatar and name", () => {
|
||||
const { getByText } = render(<SidebarCluster clusterEntity={clusterEntity}/>);
|
||||
const { getByText, getAllByText } = render(<SidebarCluster clusterEntity={clusterEntity}/>);
|
||||
|
||||
expect(getByText("tc")).toBeInTheDocument();
|
||||
expect(getByText("test-cluster")).toBeInTheDocument();
|
||||
|
||||
const v = getAllByText("test-cluster");
|
||||
|
||||
expect(v.length).toBeGreaterThan(0);
|
||||
|
||||
for (const e of v) {
|
||||
expect(e).toBeInTheDocument();
|
||||
}
|
||||
});
|
||||
|
||||
it("renders cluster menu", async () => {
|
||||
it("renders cluster menu", () => {
|
||||
const { getByTestId, getByText } = render(<SidebarCluster clusterEntity={clusterEntity}/>);
|
||||
const link = getByTestId("sidebar-cluster-dropdown");
|
||||
|
||||
fireEvent.click(link);
|
||||
expect(await getByText("Add to Hotbar")).toBeInTheDocument();
|
||||
expect(getByText("Add to Hotbar")).toBeInTheDocument();
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user