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
|
@ -111,7 +111,7 @@ describe("<LeftPanelLiveShareWarning />", () => {
|
|||
const { container } = getComponent();
|
||||
const dispatchSpy = jest.spyOn(dispatcher, "dispatch");
|
||||
|
||||
fireEvent.click(container.querySelector("[role=button]"));
|
||||
fireEvent.click(container.querySelector("[role=button]")!);
|
||||
|
||||
expect(dispatchSpy).toHaveBeenCalledWith({
|
||||
action: Action.ViewRoom,
|
||||
|
@ -144,7 +144,7 @@ describe("<LeftPanelLiveShareWarning />", () => {
|
|||
const { container } = getComponent();
|
||||
const dispatchSpy = jest.spyOn(dispatcher, "dispatch");
|
||||
|
||||
fireEvent.click(container.querySelector("[role=button]"));
|
||||
fireEvent.click(container.querySelector("[role=button]")!);
|
||||
|
||||
expect(dispatchSpy).toHaveBeenCalledWith({
|
||||
action: Action.ViewRoom,
|
||||
|
@ -163,7 +163,7 @@ describe("<LeftPanelLiveShareWarning />", () => {
|
|||
]);
|
||||
const { container, rerender } = getComponent();
|
||||
// error mode
|
||||
expect(container.querySelector(".mx_LeftPanelLiveShareWarning").textContent).toEqual(
|
||||
expect(container.querySelector(".mx_LeftPanelLiveShareWarning")?.textContent).toEqual(
|
||||
"An error occurred whilst sharing your live location",
|
||||
);
|
||||
|
||||
|
@ -175,7 +175,7 @@ describe("<LeftPanelLiveShareWarning />", () => {
|
|||
rerender(<LeftPanelLiveShareWarning />);
|
||||
|
||||
// default mode
|
||||
expect(container.querySelector(".mx_LeftPanelLiveShareWarning").textContent).toEqual(
|
||||
expect(container.querySelector(".mx_LeftPanelLiveShareWarning")?.textContent).toEqual(
|
||||
"You are sharing your live location",
|
||||
);
|
||||
});
|
||||
|
@ -252,7 +252,7 @@ describe("<LeftPanelLiveShareWarning />", () => {
|
|||
const { container } = getComponent();
|
||||
const dispatchSpy = jest.spyOn(dispatcher, "dispatch");
|
||||
|
||||
fireEvent.click(container.querySelector("[role=button]"));
|
||||
fireEvent.click(container.querySelector("[role=button]")!);
|
||||
|
||||
expect(dispatchSpy).toHaveBeenCalledWith({
|
||||
action: Action.ViewRoom,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue