fix(vscode): scope render tab assertions to the editor tab - #6076
Conversation
The render e2e tests asserted on the rendered model's tab title with a bare
text selector. Recent VS Code builds show the active editor's name in the
chat view as well, so the selector matches two elements and Playwright fails
with a strict mode violation:
locator('text=sushi.customers (rendered)') resolved to 2 elements:
1) <a class="label-name">sushi.customers (rendered)</a>
2) <span class="monaco-highlighted-label">sushi.customers (rendered)</span>
aka getByLabel('Enable current file context').locator('a')
Match the editor tab by role instead, which ignores the chat entry. Verified
against code-server 4.107.1 and 4.137.0.
Signed-off-by: Adegbite Ayoade <tripleaceme@gmail.com>
|
@cmgoffena13 — first fix out of the #6071 reproduction. Deliberately small: it fixes The detail is on the issue, but the part that bears on your lead hypothesis is worth repeating here: this failure is identical on code-server 4.107.1 and 4.137.0, and 4.107.1 is the newest build that existed when the job was turned off. So pinning would not have fixed it — the drift predates the pin date. Still worth pinning for reproducibility, just not as the fix. Happy to fold this into a larger PR later if you would rather land the e2e work in one go. |
|
@tripleaceme -- you need to run |
The role-based locators pushed those lines past the 80 column print width, which failed `pnpm run fmt:check`. Pure reformatting, no change in behaviour. Signed-off-by: Adegbite Ayoade <tripleaceme@gmail.com>
|
Thanks @cmgoffena13 — fixed in cec118b. The role-based locators pushed those lines past prettier's 80 column print width. Reformatted; no behaviour change. Both failing jobs were the same cause, since |
Description
Part of #6071. This is the first fix out of the reproduction, not the whole issue —
test-vscode-e2estaysif: falsehere, because the suite is not green yet. Full findings are on the issue.render.spec.tsasserted on the rendered model's tab title with a bare text selector:Recent VS Code builds ship Copilot/Chat, and the chat view echoes the active editor's name. The selector therefore matches two elements and Playwright fails strict mode:
Matching the editor tab by role instead ignores the chat entry.
Worth flagging for the pinning question in the issue: this fails identically on code-server 4.107.1 and 4.137.0. 4.107.1 is the newest release that existed when the job was disabled (
if: falselanded in529ed005, authored 2026-01-11 23:42 UTC; 4.108.0 shipped 19:24 UTC the next day). So this particular breakage was already present at the pin date — pinning code-server would not have fixed it, which is consistent with the job failing 100% of the time rather than flaking.Test Plan
Local Playwright run against code-server 4.107.1 and 4.137.0, both with the extension vsix installed and the repo
.venvas the interpreter. All 4render.spec.tstests fail before this change and pass after, on both versions.pnpm run lintclean.The rest of the suite is not green — 26 failures remain on a full run, covered in the issue. None of them are in this file.
Checklist
make styleand fixed any issuesmake fast-test)git commit -s) per the DCO