Skip to content

Commit 98a1647

Browse files
committed
Merge remote-tracking branch 'origin/integration/code-editor' into LG-5464/ce-cleanup
2 parents 56a4c32 + e5f6ed4 commit 98a1647

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

.changeset/sixty-turtles-tell.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
- **Panel integration**: Existing undo/redo buttons in Panel secondary menu now perform actual operations instead of just triggering callbacks
99
- **Context support**: Undo/redo functions available to child components via `CodeEditorContext` for custom UI implementations
1010
- **Enhanced TypeScript**: Complete `CodeEditorHandle` interface documentation with all imperative methods (`getContents`, `formatCode`, `undo`, `redo`, `getEditorViewInstance`)
11-
- **Test utilities**: New testing helpers including `editor.getContent()`, `editor.getHandle()`, `editor.interactions.undo()`, and `editor.interactions.redo()`
11+
- **Test utilities**: New testing helpers including `editor.getContent()`, `editor.getHandle()`, `editor.interactions.undo()`, and `editor.interactions.redo()`, plus dedicated Panel testing utilities with selectors, interaction helpers, and context configuration for testing Panel components
1212
- **Improved testing**: Functional tests verify actual content changes rather than just mock function calls
1313
- **Documentation**: New "Imperative API" section in README with comprehensive examples and reorganized structure
1414

packages/code-editor/src/Panel/Panel.spec.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,8 @@ describe('Panel', () => {
8181

8282
await panel.interactions.clickFormatButton();
8383

84+
await panel.interactions.clickFormatButton();
85+
8486
expect(onFormatClick).toHaveBeenCalledTimes(1);
8587
});
8688

@@ -117,6 +119,8 @@ describe('Panel', () => {
117119

118120
await panel.interactions.clickCopyButton();
119121

122+
await panel.interactions.clickCopyButton();
123+
120124
expect(onCopyClick).toHaveBeenCalledTimes(1);
121125
});
122126

0 commit comments

Comments
 (0)