TAC: Fix hover state when expanded (#12337)

* Fix TAC hover state

* Add playwright test

* Update playwright snapshot after last compound style changes
This commit is contained in:
Florian Duros 2024-03-14 17:21:18 +01:00 committed by GitHub
parent 49be30bbc3
commit e309410266
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 23 additions and 0 deletions

View file

@ -265,6 +265,13 @@ export class Helpers {
return this.getTacButton().click();
}
/**
* Hover over the Threads Activity Centre button
*/
hoverTacButton() {
return this.getTacButton().hover();
}
/**
* Click on a room in the Threads Activity Centre
* @param name - room name

View file

@ -134,4 +134,14 @@ test.describe("Threads Activity Centre", () => {
await toggleSpotlight();
await expect(page.locator(".mx_SpotlightDialog")).not.toBeVisible();
});
test("should have the correct hover state", async ({ util, page }) => {
await util.hoverTacButton();
await expect(util.getSpacePanel()).toMatchScreenshot("tac-hovered.png");
// Expand the space panel, hover the button and take a screenshot
await util.expandSpacePanel();
await util.hoverTacButton();
await expect(util.getSpacePanel()).toMatchScreenshot("tac-hovered-expanded.png");
});
});