fix(matrix): match the invite tile on the button, not on a row that is absent

9661800cb0 scoped the tile to [role="row"][aria-level="2"], taken from
upstream's test helpers for Element 1.12.28. meta/services.yml pinned v1.12.27
then and has never held 1.12.28 on any ref, so the selector described markup
the deployment does not render.

Read out of biber's DOM in the trace of the failing job: role="row" occurs zero
times, aria-expanded zero times, aria-label="Toggle " zero times, and every
aria-level in the document is "1" on a heading. The only aria-level="2" in the
whole trace is inside the test's own injected script. The invite is a bare
button in a virtuoso list:

  DIV[data-testid="virtuoso-item-list"] > DIV[data-index="0"]
    > BUTTON[aria-label="Open room Administrator Infinito.Nexus invitation."]

So the tile was never clicked, biber stayed on the welcome screen, and the poll
spent its 120 seconds on a page that could not change. The screenshots of all
three attempts show the same state: the invite row visible in the list, a
device-verification prompt beside it, no room open.

Matching the button directly drops the dependency on the wrapper. The label
prefix and the partner match are unchanged, and "Open room settings" is the
only other button carrying the prefix, which the partner match excludes.

The section expansion stays. It is a no-op against 1.12.27, where nothing
reports aria-expanded, and it is what upstream's helpers describe for the
release after it.

Not verified: the accept step behind the tile. biber never reached the invite
view in any attempt, so which of "Start chatting", "Accept" or "Join" 1.12.27
renders there is unobserved, and the anchored regex covering all three is
carried over untested.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
kevinveenbirkenbachandClaude Opus 5 committed 2026-09-18 03:49:39 +02:00
1 parent 4b0c7423cb
commit df19dd103c
1 file changed
+3 -3
@@ -100,8 +100,6 @@ exports.register = function (shared) {
await expect
.poll(async () => {
return await biberPage.evaluate(() => {
// Pending invites sit in a section that renders collapsed, so the
// invite row is absent from the DOM until it is expanded.
const sections = document.querySelectorAll(
'button[aria-expanded="false"][aria-label^="Toggle "]',
);
@@ -109,8 +107,10 @@ exports.register = function (shared) {
section.click();
}
// Not scoped to a row wrapper: the list is virtualised and 1.12.27
// renders no role=row, aria-level or aria-expanded at all.
const roomTiles = document.querySelectorAll(
'[role="row"][aria-level="2"] button[aria-label^="Open room"]',
'button[aria-label^="Open room"]',
);
for (const tile of roomTiles) {
const name = `${tile.getAttribute("aria-label") || ""} ${tile.textContent || ""}`;