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
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
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();
});
});