@lvce-editor/test-worker 4.43.0 → 4.44.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api.d.ts +4 -3
- package/dist/testWorkerMain.js +8 -0
- package/package.json +1 -1
package/dist/api.d.ts
CHANGED
|
@@ -19,6 +19,7 @@ declare const readNativeFiles: () => Promise<void>;
|
|
|
19
19
|
declare const writeNativeFiles: (uris: readonly string[]) => Promise<void>;
|
|
20
20
|
declare const enableMemoryClipBoard: () => Promise<void>;
|
|
21
21
|
declare const disableMemoryClipBoard: () => Promise<void>;
|
|
22
|
+
declare const shouldHaveText: (expectedText: string) => Promise<void>;
|
|
22
23
|
declare const execute: (id: string, ...args: readonly any[]) => Promise<any>;
|
|
23
24
|
declare const selectItem: (text: string) => Promise<void>;
|
|
24
25
|
declare const openIframeInspector: () => Promise<void>;
|
|
@@ -87,7 +88,7 @@ declare const openRename: () => Promise<void>;
|
|
|
87
88
|
declare const rename2: (newName: string) => Promise<void>;
|
|
88
89
|
declare const growSelection: () => Promise<void>;
|
|
89
90
|
declare const getSelections: () => Promise<Uint32Array>;
|
|
90
|
-
declare const shouldHaveText: (expectedText: string) => Promise<void>;
|
|
91
|
+
declare const shouldHaveText$1: (expectedText: string) => Promise<void>;
|
|
91
92
|
declare const shouldHaveSelections: (expectedSelections: Uint32Array) => Promise<void>;
|
|
92
93
|
declare const selectIndex: (index: number) => Promise<void>;
|
|
93
94
|
declare const selectCurrentIndex: () => Promise<void>;
|
|
@@ -315,7 +316,7 @@ declare namespace BaseUrl {
|
|
|
315
316
|
export { getBaseUrl };
|
|
316
317
|
}
|
|
317
318
|
declare namespace ClipBoard {
|
|
318
|
-
export { disableMemoryClipBoard, enableMemoryClipBoard, readNativeFiles, writeNativeFiles };
|
|
319
|
+
export { disableMemoryClipBoard, enableMemoryClipBoard, readNativeFiles, shouldHaveText, writeNativeFiles };
|
|
319
320
|
}
|
|
320
321
|
declare namespace Command {
|
|
321
322
|
export { execute };
|
|
@@ -330,7 +331,7 @@ declare namespace Dialog {
|
|
|
330
331
|
export { executeMock, mockSaveFilePicker, showSaveFilePicker };
|
|
331
332
|
}
|
|
332
333
|
declare namespace Editor {
|
|
333
|
-
export { addAllMissingImports, closeColorPicker, closeCompletion, closeCompletionDetails, copy, copyLineDown, copyLineUp, cursorCharacterLeft, cursorCharacterRight, cursorDown, cursorEnd, cursorHome, cursorUp, cursorWordLeft, cursorWordPartLeft, cursorWordPartRight, cursorWordRight, deleteAllLeft, deleteAllRight, executeTabCompletion, findAllImplementations, findAllReferences, format, getSelections, getText, goToDefinition, goToTypeDefinition, growSelection, insertLineBreak, invokeBraceCompletion, invokeTabCompletion, openColorPicker, openCompletion, openCompletionDetails, openContextMenu, openEditorContextMenu, openFind, openFindWidget, openHover, openRename, openSourceActions, organizeImports, rename, rename2, selectAll, setCursor, setDeltaY, setSelections, shouldHaveSelections, shouldHaveText, showHover, sortImports, sourceActionsSelectCurrent, toggleBlockComment, toggleCompletionDetails, toggleLineComment, type };
|
|
334
|
+
export { addAllMissingImports, closeColorPicker, closeCompletion, closeCompletionDetails, copy, copyLineDown, copyLineUp, cursorCharacterLeft, cursorCharacterRight, cursorDown, cursorEnd, cursorHome, cursorUp, cursorWordLeft, cursorWordPartLeft, cursorWordPartRight, cursorWordRight, deleteAllLeft, deleteAllRight, executeTabCompletion, findAllImplementations, findAllReferences, format, getSelections, getText, goToDefinition, goToTypeDefinition, growSelection, insertLineBreak, invokeBraceCompletion, invokeTabCompletion, openColorPicker, openCompletion, openCompletionDetails, openContextMenu, openEditorContextMenu, openFind, openFindWidget, openHover, openRename, openSourceActions, organizeImports, rename, rename2, selectAll, setCursor, setDeltaY, setSelections, shouldHaveSelections, shouldHaveText$1 as shouldHaveText, showHover, sortImports, sourceActionsSelectCurrent, toggleBlockComment, toggleCompletionDetails, toggleLineComment, type };
|
|
334
335
|
}
|
|
335
336
|
declare namespace EditorCompletion {
|
|
336
337
|
export { selectCurrentIndex, selectIndex };
|
package/dist/testWorkerMain.js
CHANGED
|
@@ -1744,12 +1744,20 @@ const disableMemoryClipBoard = async () => {
|
|
|
1744
1744
|
// @ts-ignore
|
|
1745
1745
|
await invoke$1('ClipBoard.disableMemoryClipBoard');
|
|
1746
1746
|
};
|
|
1747
|
+
const shouldHaveText$1 = async expectedText => {
|
|
1748
|
+
// @ts-ignore
|
|
1749
|
+
const actualText = await invoke$1('ClipBoard.readMemoryText');
|
|
1750
|
+
if (actualText !== expectedText) {
|
|
1751
|
+
throw new AssertionError(`expected clipboard to have text "${expectedText}" but was "${actualText}"`);
|
|
1752
|
+
}
|
|
1753
|
+
};
|
|
1747
1754
|
|
|
1748
1755
|
const TestFrameworkComponentClipBoard = {
|
|
1749
1756
|
__proto__: null,
|
|
1750
1757
|
disableMemoryClipBoard,
|
|
1751
1758
|
enableMemoryClipBoard,
|
|
1752
1759
|
readNativeFiles,
|
|
1760
|
+
shouldHaveText: shouldHaveText$1,
|
|
1753
1761
|
writeNativeFiles
|
|
1754
1762
|
};
|
|
1755
1763
|
|