mirror of
https://github.com/tdurieux/anonymous_github.git
synced 2026-12-02 09:03:37 +01:00
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 <noreply@anthropic.com>
This commit is contained in:
1 parent
2633fadba7
commit
14694e9242
1 file changed
+3
-2
+3
-2
@@ -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([]);
|
||||
|
||||
Reference in new issue
Block a user