@lvce-editor/test-worker 4.37.0 → 4.38.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 -2
- package/dist/testWorkerMain.js +11 -1
- package/package.json +1 -1
package/dist/api.d.ts
CHANGED
|
@@ -84,6 +84,8 @@ declare const getText: () => Promise<string>;
|
|
|
84
84
|
declare const rename: () => Promise<void>;
|
|
85
85
|
declare const showHover: () => Promise<void>;
|
|
86
86
|
declare const openRename: () => Promise<void>;
|
|
87
|
+
declare const growSelection: () => Promise<void>;
|
|
88
|
+
declare const getSelections: () => Promise<Uint32Array>;
|
|
87
89
|
declare const shouldHaveText: (expectedText: string) => Promise<void>;
|
|
88
90
|
declare const selectIndex: (index: number) => Promise<void>;
|
|
89
91
|
declare const selectCurrentIndex: () => Promise<void>;
|
|
@@ -139,7 +141,7 @@ declare const openJsonValidation: () => Promise<void>;
|
|
|
139
141
|
declare const openSettings: () => Promise<void>;
|
|
140
142
|
declare const handleScroll: (scrollTop: number) => Promise<void>;
|
|
141
143
|
declare const writeFile: (uri: string, content: string) => Promise<void>;
|
|
142
|
-
declare const readFile: (uri: string) => Promise<
|
|
144
|
+
declare const readFile: (uri: string) => Promise<string>;
|
|
143
145
|
declare const mkdir: (uri: string) => Promise<void>;
|
|
144
146
|
declare const remove: (uri: string) => Promise<void>;
|
|
145
147
|
declare const getTmpDir: ({ scheme }?: {
|
|
@@ -321,7 +323,7 @@ declare namespace Dialog {
|
|
|
321
323
|
export { executeMock, mockSaveFilePicker, showSaveFilePicker };
|
|
322
324
|
}
|
|
323
325
|
declare namespace Editor {
|
|
324
|
-
export { addAllMissingImports, closeColorPicker, closeCompletion, closeCompletionDetails, copy, copyLineDown, copyLineUp, cursorCharacterLeft, cursorCharacterRight, cursorDown, cursorEnd, cursorHome, cursorUp, cursorWordLeft, cursorWordPartLeft, cursorWordPartRight, cursorWordRight, deleteAllLeft, deleteAllRight, executeTabCompletion, findAllImplementations, findAllReferences, format, getText, goToDefinition, goToTypeDefinition, insertLineBreak, invokeBraceCompletion, invokeTabCompletion, openColorPicker, openCompletion, openCompletionDetails, openContextMenu, openEditorContextMenu, openFind, openFindWidget, openHover, openRename, openSourceActions, organizeImports, rename, selectAll, setCursor, setDeltaY, setSelections, shouldHaveText, showHover, sortImports, sourceActionsSelectCurrent, toggleBlockComment, toggleCompletionDetails, toggleLineComment, type };
|
|
326
|
+
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, selectAll, setCursor, setDeltaY, setSelections, shouldHaveText, showHover, sortImports, sourceActionsSelectCurrent, toggleBlockComment, toggleCompletionDetails, toggleLineComment, type };
|
|
325
327
|
}
|
|
326
328
|
declare namespace EditorCompletion {
|
|
327
329
|
export { selectCurrentIndex, selectIndex };
|
package/dist/testWorkerMain.js
CHANGED
|
@@ -1976,6 +1976,14 @@ const showHover = async () => {
|
|
|
1976
1976
|
const openRename = async () => {
|
|
1977
1977
|
await invoke('Editor.openRename');
|
|
1978
1978
|
};
|
|
1979
|
+
const growSelection = async () => {
|
|
1980
|
+
// @ts-ignore
|
|
1981
|
+
await invoke('Editor.selectionGrow');
|
|
1982
|
+
};
|
|
1983
|
+
const getSelections = async () => {
|
|
1984
|
+
// @ts-ignore
|
|
1985
|
+
return invoke('Editor.getSelections');
|
|
1986
|
+
};
|
|
1979
1987
|
const shouldHaveText = async expectedText => {
|
|
1980
1988
|
const text = await invoke('Editor.getText');
|
|
1981
1989
|
if (text !== expectedText) {
|
|
@@ -2008,9 +2016,11 @@ const TestFrameWorkComponentEditor = {
|
|
|
2008
2016
|
findAllImplementations,
|
|
2009
2017
|
findAllReferences,
|
|
2010
2018
|
format,
|
|
2019
|
+
getSelections,
|
|
2011
2020
|
getText,
|
|
2012
2021
|
goToDefinition,
|
|
2013
2022
|
goToTypeDefinition,
|
|
2023
|
+
growSelection,
|
|
2014
2024
|
insertLineBreak,
|
|
2015
2025
|
invokeBraceCompletion,
|
|
2016
2026
|
invokeTabCompletion,
|
|
@@ -2308,7 +2318,7 @@ const writeFile = async (uri, content) => {
|
|
|
2308
2318
|
await invoke('FileSystem.writeFile', uri, content);
|
|
2309
2319
|
};
|
|
2310
2320
|
const readFile = async uri => {
|
|
2311
|
-
|
|
2321
|
+
return invoke('FileSystem.readFile', uri);
|
|
2312
2322
|
};
|
|
2313
2323
|
const mkdir = async uri => {
|
|
2314
2324
|
await invoke('FileSystem.mkdir', uri);
|