Skip to content

Commit 6c7e60d

Browse files
committed
test(ccb): assert title-only swap on design-mode toggle
Follow-up to 1b3e6ce: the design-mode toggle no longer swaps the pen-nib SVG for fa-code — only the title changes between CCB_SWITCH_TO_DESIGN_MODE and CCB_SWITCH_TO_CODE_EDITOR. Rewrite the existing icon-swap test to match the new behavior: still assert the title flips and that the button's is-active wiring works, but check that the SVG stays in both states instead of expecting an fa-code icon in design mode.
1 parent 1b3e6ce commit 6c7e60d

1 file changed

Lines changed: 2 additions & 8 deletions

File tree

test/spec/CentralControlBar-integ-test.js

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -332,26 +332,20 @@ define(function (require, exports, module) {
332332
"design mode to deactivate from click", 10000);
333333
});
334334

335-
it("should swap icon (pen-nib svg ↔ fa-code) and title on state change", async function () {
335+
it("should swap title on state change (pen-nib svg stays in both states)", async function () {
336336
const $btn = _$("#ccbCollapseEditorBtn");
337337

338-
// Expanded (not in design mode): svg pen-nib + "Switch to Design Mode".
339338
expect($btn.find("svg").length).toBe(1);
340-
expect($btn.find("i.fa-code").length).toBe(0);
341339
expect($btn.attr("title")).toBe(Strings.CCB_SWITCH_TO_DESIGN_MODE);
342340

343341
await enterDesignMode();
344342

345-
// Design mode: <i class="fa-solid fa-code"> + "Switch to Code Editor".
346-
expect($btn.find("i.fa-code").length).toBe(1);
347-
expect($btn.find("svg").length).toBe(0);
343+
expect($btn.find("svg").length).toBe(1);
348344
expect($btn.attr("title")).toBe(Strings.CCB_SWITCH_TO_CODE_EDITOR);
349345

350346
await exitDesignMode();
351347

352-
// Back to expanded — svg restored, title restored.
353348
expect($btn.find("svg").length).toBe(1);
354-
expect($btn.find("i.fa-code").length).toBe(0);
355349
expect($btn.attr("title")).toBe(Strings.CCB_SWITCH_TO_DESIGN_MODE);
356350
});
357351
});

0 commit comments

Comments
 (0)