1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-07-28 15:22:05 +03:00

Fix spotlight opening in TAC (#12315)

* Fix spotlight opening in TAC

* Add tests

* Remove `RovingTabIndexProvider`
This commit is contained in:
Florian Duros
2024-03-08 11:18:30 +01:00
committed by GitHub
parent 70365c891b
commit ddbc6439ce
4 changed files with 95 additions and 31 deletions

View File

@ -17,6 +17,7 @@
*/
import { expect, test } from ".";
import { CommandOrControl } from "../../utils";
test.describe("Threads Activity Centre", () => {
test.use({
@ -118,4 +119,19 @@ test.describe("Threads Activity Centre", () => {
]);
await expect(util.getTacPanel()).toMatchScreenshot("tac-panel-notification-unread.png");
});
test("should block the Spotlight to open when the TAC is opened", async ({ util, page }) => {
const toggleSpotlight = () => page.keyboard.press(`${CommandOrControl}+k`);
// Sanity check
// Open and close the spotlight
await toggleSpotlight();
await expect(page.locator(".mx_SpotlightDialog")).toBeVisible();
await toggleSpotlight();
await util.openTac();
// The spotlight should not be opened
await toggleSpotlight();
await expect(page.locator(".mx_SpotlightDialog")).not.toBeVisible();
});
});