From 14694e9242d57ff216fa3bd60ddbd3b623e763ce Mon Sep 17 00:00:00 2001 From: Thomas Durieux <5577568+tdurieux@users.noreply.github.com> Date: Sat, 28 Nov 2026 20:17:34 +0000 Subject: [PATCH] test(ui): click Expand preview, not the preview's Files toggle "keeps all settings and the live preview visible in the split workspace" clicked the first .reviewer-preview .rp-open. Since #950 the caption also has a "Files" button with that class, which toggles the preview's file tree, so preview-expanded never turned on. The UI behaves as intended; the test now targets .rp-open.is-toggle. Co-Authored-By: Claude Opus 5.5 --- test/vue-ui.test.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/vue-ui.test.js b/test/vue-ui.test.js index 6660f70..6beae24 100644 --- a/test/vue-ui.test.js +++ b/test/vue-ui.test.js @@ -1109,9 +1109,10 @@ describe("Vue 3 UI", function () { state.options.expirationMode = "never"; await delay(20); expect(doc.querySelector('.hosting-options').textContent).to.include("20 repositories"); expect(doc.querySelector('.anonymize-submit-bar').textContent).to.include("Continue to checkout"); - doc.querySelector('.reviewer-preview .rp-open').click(); await delay(10); + // The caption also has a "Files" toggle (.rp-open) for the preview's tree; target Expand preview. + doc.querySelector('.reviewer-preview .rp-open.is-toggle').click(); await delay(10); expect(doc.querySelector('.anonymize-page').classList.contains('preview-expanded')).to.equal(true); - doc.querySelector('.reviewer-preview .rp-open').click(); await delay(10); + doc.querySelector('.reviewer-preview .rp-open.is-toggle').click(); await delay(10); expect(state.terms).to.equal("Private Author"); expect(ui.requests.some(r => r.method === "POST" && r.url.pathname === "/api/repo/")).to.equal(false); expect(ui.errors).to.deep.equal([]);