Conform more code to strict null checking (#10153)
* Conform more code to strict null checking * Conform more code to strict null checking * Iterate * Iterate
This commit is contained in:
parent
a4ff959aa1
commit
145a5a8a8d
89 changed files with 520 additions and 551 deletions
|
@ -68,7 +68,7 @@ describe("ThreadPanel", () => {
|
|||
const found = container.querySelector(".mx_ThreadPanel_dropdown");
|
||||
expect(found).toBeTruthy();
|
||||
expect(screen.queryByRole("menu")).toBeFalsy();
|
||||
fireEvent.click(found);
|
||||
fireEvent.click(found!);
|
||||
expect(screen.queryByRole("menu")).toBeTruthy();
|
||||
});
|
||||
|
||||
|
@ -80,11 +80,13 @@ describe("ThreadPanel", () => {
|
|||
setFilterOption={() => undefined}
|
||||
/>,
|
||||
);
|
||||
fireEvent.click(container.querySelector(".mx_ThreadPanel_dropdown"));
|
||||
fireEvent.click(container.querySelector(".mx_ThreadPanel_dropdown")!);
|
||||
const found = screen.queryAllByRole("menuitemradio");
|
||||
expect(found).toHaveLength(2);
|
||||
const foundButton = screen.queryByRole("menuitemradio", { checked: true });
|
||||
expect(foundButton.textContent).toEqual(`${_t("All threads")}${_t("Shows all threads from current room")}`);
|
||||
expect(foundButton?.textContent).toEqual(
|
||||
`${_t("All threads")}${_t("Shows all threads from current room")}`,
|
||||
);
|
||||
expect(foundButton).toMatchSnapshot();
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue