* #21451 Fix WebGl disabled error message * #21451 Fix WebGl disabled error message Signed-off-by: Rashmit Pankhania <rashmitpankhania@gmail.com> Signed-off-by: Rashmit Pankhania <raspankh@publicisgroupe.net> * Fix message Signed-off-by: Rashmit Pankhania <raspankh@publicisgroupe.net> * Fix ordering of cases in LocationShareErrors.ts Signed-off-by: Rashmit Pankhania <raspankh@publicisgroupe.net> * Fix linting LocationPicker.tsx Signed-off-by: Rashmit Pankhania <raspankh@publicisgroupe.net> * Fix eslint Signed-off-by: Rashmit Pankhania <raspankh@publicisgroupe.net> * Fix file encoding for i18n CI issue Signed-off-by: Rashmit Pankhania <raspankh@publicisgroupe.net> * Fix ts strict CI issue Signed-off-by: Rashmit Pankhania <raspankh@publicisgroupe.net> --------- Signed-off-by: Rashmit Pankhania <rashmitpankhania@gmail.com> Signed-off-by: Rashmit Pankhania <raspankh@publicisgroupe.net> Co-authored-by: Rashmit Pankhania <raspankh@publicisgroupe.net> Co-authored-by: Kerry <kerrya@element.io>
This commit is contained in:
parent
41c0b0881a
commit
7751f9c622
5 changed files with 27 additions and 4 deletions
|
@ -118,6 +118,20 @@ describe("LocationPicker", () => {
|
|||
expect(getByText("This homeserver is not configured to display maps.")).toBeInTheDocument();
|
||||
});
|
||||
|
||||
it("displays error when WebGl is not enabled", () => {
|
||||
// suppress expected error log
|
||||
jest.spyOn(logger, "error").mockImplementation(() => {});
|
||||
mocked(findMapStyleUrl).mockImplementation(() => {
|
||||
throw new Error("Failed to initialize WebGL");
|
||||
});
|
||||
|
||||
const { getByText } = getComponent();
|
||||
|
||||
expect(
|
||||
getByText("WebGL is required to display maps, please enable it in your browser settings."),
|
||||
).toBeInTheDocument();
|
||||
});
|
||||
|
||||
it("displays error when map setup throws", () => {
|
||||
// suppress expected error log
|
||||
jest.spyOn(logger, "error").mockImplementation(() => {});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue