Skip to content

fix(vscode): scope render tab assertions to the editor tab - #6076

Open
tripleaceme wants to merge 2 commits into
SQLMesh:mainfrom
tripleaceme:fix/vscode-e2e
Open

tripleaceme wants to merge 2 commits into
SQLMesh:mainfrom
tripleaceme:fix/vscode-e2e

Conversation

@tripleaceme

Copy link
Copy Markdown
Contributor

Description

Part of #6071. This is the first fix out of the reproduction, not the whole issue — test-vscode-e2e stays if: false here, because the suite is not green yet. Full findings are on the issue.

render.spec.ts asserted on the rendered model's tab title with a bare text selector:

await expect(page.locator('text=sushi.customers (rendered)')).toBeVisible()

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:

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')

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: false landed in 529ed005, 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 .venv as the interpreter. All 4 render.spec.ts tests fail before this change and pass after, on both versions.

pnpm exec playwright test tests/render.spec.ts
4 passed

pnpm run lint clean.

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

  • I have run make style and fixed any issues
  • I have added tests for my changes (if applicable)
  • All existing tests pass (make fast-test)
  • My commits are signed off (git commit -s) per the DCO

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>
@tripleaceme

Copy link
Copy Markdown
Contributor Author

@cmgoffena13 — first fix out of the #6071 reproduction. Deliberately small: it fixes render.spec.ts only and leaves test-vscode-e2e disabled, since the suite is not green yet.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants