Always show back button in the right panel (#29128)

* Construct history on setCard

So that back buttons are always shown in the right panel

* Check card state to ensure operation is atomic

* Fix tests

* Fix lint

* Remove null case

* Fix broken test
This commit is contained in:
R Midhun Suresh
2025-02-02 18:37:12 +00:00
committed by GitHub
parent 4cba79ddcc
commit aa01b17f9e
4 changed files with 61 additions and 11 deletions
+2 -1
View File
@@ -526,9 +526,10 @@ class Helpers {
await expect(threadPanel).toBeVisible();
await threadPanel.evaluate(($panel) => {
const $button = $panel.querySelector<HTMLElement>('[data-testid="base-card-back-button"]');
const title = $panel.querySelector<HTMLElement>(".mx_BaseCard_header_title")?.textContent;
// If the Threads back button is present then click it - the
// threads button can open either threads list or thread panel
if ($button) {
if ($button && title !== "Threads") {
$button.click();
}
});