@lvce-editor/test-worker 5.10.0 → 5.12.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 +5 -3
- package/dist/testWorkerMain.js +31 -15
- package/package.json +1 -1
package/dist/api.d.ts
CHANGED
|
@@ -288,6 +288,8 @@ declare const toggleMatchWholeWord$1: () => Promise<void>;
|
|
|
288
288
|
declare const togglePreserveCase: () => Promise<void>;
|
|
289
289
|
declare const toggleUseRegularExpression$1: () => Promise<void>;
|
|
290
290
|
declare const toggleReplace$1: () => Promise<void>;
|
|
291
|
+
declare const open$4: () => Promise<void>;
|
|
292
|
+
declare const setLimit: (limit: number) => Promise<void>;
|
|
291
293
|
declare const update: (settings: any) => Promise<void>;
|
|
292
294
|
declare const show$3: () => Promise<void>;
|
|
293
295
|
declare const handleInput$2: (searchValue: string) => Promise<void>;
|
|
@@ -299,7 +301,7 @@ declare const selectWorkspace: () => Promise<void>;
|
|
|
299
301
|
declare const selectTextEditor: () => Promise<void>;
|
|
300
302
|
declare const selectExtensions: () => Promise<void>;
|
|
301
303
|
declare const handleScroll$1: (scrollTop: number) => Promise<void>;
|
|
302
|
-
declare const open$
|
|
304
|
+
declare const open$5: (id: string) => Promise<void>;
|
|
303
305
|
declare const hide: () => Promise<void>;
|
|
304
306
|
declare const selectIndex$6: (index: number) => Promise<void>;
|
|
305
307
|
declare const acceptInput: () => Promise<void>;
|
|
@@ -417,7 +419,7 @@ declare namespace RunAndDebug {
|
|
|
417
419
|
export { acceptWatchExpressionEdit, addWatchExpression, handleClickSectionWatch, handleRename, handleSpace, handleWatchValueChange, selectIndex$4 as selectIndex, setPauseOnExceptions };
|
|
418
420
|
}
|
|
419
421
|
declare namespace Search {
|
|
420
|
-
export { clearSearchResults, collapseDetails, dismissItem, focusFirst$6 as focusFirst, focusIndex$4 as focusIndex, focusNext$8 as focusNext, focusNextPage, focusPrevious$7 as focusPrevious, focusPreviousPage, handleWheel$2 as handleWheel, openDetails, replaceAll$1 as replaceAll, selectIndex$5 as selectIndex, setExcludeValue, setIncludeValue, setReplaceValue$1 as setReplaceValue, setValue$2 as setValue, toggleMatchCase$1 as toggleMatchCase, toggleMatchWholeWord$1 as toggleMatchWholeWord, togglePreserveCase, toggleReplace$1 as toggleReplace, toggleSearchDetails, toggleUseRegularExpression$1 as toggleUseRegularExpression };
|
|
422
|
+
export { clearSearchResults, collapseDetails, dismissItem, focusFirst$6 as focusFirst, focusIndex$4 as focusIndex, focusNext$8 as focusNext, focusNextPage, focusPrevious$7 as focusPrevious, focusPreviousPage, handleWheel$2 as handleWheel, open$4 as open, openDetails, replaceAll$1 as replaceAll, selectIndex$5 as selectIndex, setExcludeValue, setIncludeValue, setLimit, setReplaceValue$1 as setReplaceValue, setValue$2 as setValue, toggleMatchCase$1 as toggleMatchCase, toggleMatchWholeWord$1 as toggleMatchWholeWord, togglePreserveCase, toggleReplace$1 as toggleReplace, toggleSearchDetails, toggleUseRegularExpression$1 as toggleUseRegularExpression };
|
|
421
423
|
}
|
|
422
424
|
declare namespace Settings {
|
|
423
425
|
export { update };
|
|
@@ -426,7 +428,7 @@ declare namespace SettingsView {
|
|
|
426
428
|
export { clear$2 as clear, handleInput$2 as handleInput, handleScroll$1 as handleScroll, selectExtensions, selectTab$1 as selectTab, selectTextEditor, selectWorkspace, show$3 as show, useNextSearchValue, usePreviousSearchValue };
|
|
427
429
|
}
|
|
428
430
|
declare namespace SideBar {
|
|
429
|
-
export { hide, open$
|
|
431
|
+
export { hide, open$5 as open };
|
|
430
432
|
}
|
|
431
433
|
declare namespace SourceControl {
|
|
432
434
|
export { acceptInput, handleClickSourceControlButtons, handleInput$3 as handleInput, selectIndex$6 as selectIndex };
|
package/dist/testWorkerMain.js
CHANGED
|
@@ -2084,18 +2084,25 @@ const getSelections = async () => {
|
|
|
2084
2084
|
// @ts-ignore
|
|
2085
2085
|
return invoke('Editor.getSelections', numeric);
|
|
2086
2086
|
};
|
|
2087
|
+
const getKey = async () => {
|
|
2088
|
+
const keys = await invoke('Editor.getKeys');
|
|
2089
|
+
if (keys.length === 0) {
|
|
2090
|
+
throw new Error(`no editor found`);
|
|
2091
|
+
}
|
|
2092
|
+
const key = keys.at(-1);
|
|
2093
|
+
const numeric = Number.parseInt(key);
|
|
2094
|
+
return numeric;
|
|
2095
|
+
};
|
|
2087
2096
|
const shouldHaveText = async expectedText => {
|
|
2088
|
-
const
|
|
2097
|
+
const key = await getKey();
|
|
2098
|
+
const text = await invoke('Editor.getText', key);
|
|
2089
2099
|
if (text !== expectedText) {
|
|
2090
2100
|
throw new Error(`Expected editor to have text ${expectedText} but was ${text}`);
|
|
2091
2101
|
}
|
|
2092
2102
|
};
|
|
2093
2103
|
const shouldHaveSelections = async expectedSelections => {
|
|
2094
|
-
const
|
|
2095
|
-
const
|
|
2096
|
-
const numeric = Number.parseInt(key);
|
|
2097
|
-
// @ts-ignore
|
|
2098
|
-
const selections = await invoke('Editor.getSelections', numeric);
|
|
2104
|
+
const key = await getKey();
|
|
2105
|
+
const selections = await invoke('Editor.getSelections', key);
|
|
2099
2106
|
if (!areSelectionsEqual(selections, expectedSelections)) {
|
|
2100
2107
|
throw new Error(`Expected editor to have selections ${expectedSelections} but was ${selections}`);
|
|
2101
2108
|
}
|
|
@@ -2403,7 +2410,7 @@ const selectFeatures = async () => {
|
|
|
2403
2410
|
const selectChangelog = async () => {
|
|
2404
2411
|
await selectTab$1('Changelog');
|
|
2405
2412
|
};
|
|
2406
|
-
const open$
|
|
2413
|
+
const open$5 = extensionId => {
|
|
2407
2414
|
const uri = `extension-detail://${extensionId}`;
|
|
2408
2415
|
return invoke$1('Main.openUri', uri);
|
|
2409
2416
|
};
|
|
@@ -2441,7 +2448,7 @@ const TestFrameWorkComponentExtensionDetail = {
|
|
|
2441
2448
|
handleClickEnable,
|
|
2442
2449
|
handleClickSetColorTheme,
|
|
2443
2450
|
handleScroll: handleScroll$1,
|
|
2444
|
-
open: open$
|
|
2451
|
+
open: open$5,
|
|
2445
2452
|
openCommands,
|
|
2446
2453
|
openFeature,
|
|
2447
2454
|
openJsonValidation,
|
|
@@ -2657,7 +2664,7 @@ const TestFrameWorkComponentIframeInspector = {
|
|
|
2657
2664
|
selectIndex: selectIndex$4
|
|
2658
2665
|
};
|
|
2659
2666
|
|
|
2660
|
-
const open$
|
|
2667
|
+
const open$4 = async () => {
|
|
2661
2668
|
await invoke$1('Main.openUri', 'app://keybindings');
|
|
2662
2669
|
};
|
|
2663
2670
|
const handleInput$3 = value => {
|
|
@@ -2745,7 +2752,7 @@ const TestFrameWorkComponentKeyBindingsEditor = {
|
|
|
2745
2752
|
handleDoubleClick,
|
|
2746
2753
|
handleInput: handleInput$3,
|
|
2747
2754
|
handleWheel: handleWheel$1,
|
|
2748
|
-
open: open$
|
|
2755
|
+
open: open$4,
|
|
2749
2756
|
removeKeyBinding,
|
|
2750
2757
|
resetKeyBinding,
|
|
2751
2758
|
showSameKeyBindings,
|
|
@@ -2888,18 +2895,18 @@ const TestFrameWorkComponentOutput = {
|
|
|
2888
2895
|
show: show$2
|
|
2889
2896
|
};
|
|
2890
2897
|
|
|
2891
|
-
const open$
|
|
2898
|
+
const open$3 = async id => {
|
|
2892
2899
|
await invoke$1('Layout.showPanel', id);
|
|
2893
2900
|
};
|
|
2894
2901
|
const openProblems = async () => {
|
|
2895
|
-
await open$
|
|
2902
|
+
await open$3('Problems');
|
|
2896
2903
|
// @ts-ignore
|
|
2897
2904
|
await invoke$1('Panel.selectIndex', 0);
|
|
2898
2905
|
};
|
|
2899
2906
|
|
|
2900
2907
|
const TestFrameWorkComponentPanel = {
|
|
2901
2908
|
__proto__: null,
|
|
2902
|
-
open: open$
|
|
2909
|
+
open: open$3,
|
|
2903
2910
|
openProblems
|
|
2904
2911
|
};
|
|
2905
2912
|
|
|
@@ -2996,7 +3003,7 @@ const TestFrameWorkComponentProblems = {
|
|
|
2996
3003
|
|
|
2997
3004
|
const QuickPick = 'QuickPick';
|
|
2998
3005
|
|
|
2999
|
-
const open$
|
|
3006
|
+
const open$2 = async () => {
|
|
3000
3007
|
// @ts-ignore
|
|
3001
3008
|
await invoke$1('Viewlet.openWidget', QuickPick, 'everything');
|
|
3002
3009
|
};
|
|
@@ -3063,7 +3070,7 @@ const TestFrameWorkComponentQuickPick = {
|
|
|
3063
3070
|
focusPrevious: focusPrevious$2,
|
|
3064
3071
|
handleClickAt,
|
|
3065
3072
|
handleInput: handleInput$2,
|
|
3066
|
-
open: open$
|
|
3073
|
+
open: open$2,
|
|
3067
3074
|
selectCurrentIndex,
|
|
3068
3075
|
selectIndex: selectIndex$3,
|
|
3069
3076
|
selectItem,
|
|
@@ -3209,6 +3216,13 @@ const toggleUseRegularExpression = async () => {
|
|
|
3209
3216
|
const toggleReplace = async () => {
|
|
3210
3217
|
await invoke$1('Search.toggleReplace');
|
|
3211
3218
|
};
|
|
3219
|
+
const open$1 = async () => {
|
|
3220
|
+
await invoke$1('SideBar.openViewlet', 'Search');
|
|
3221
|
+
};
|
|
3222
|
+
const setLimit = async limit => {
|
|
3223
|
+
// @ts-ignore
|
|
3224
|
+
await invoke$1('Search.setLimit', limit);
|
|
3225
|
+
};
|
|
3212
3226
|
|
|
3213
3227
|
const TestFrameWorkComponentSearch = {
|
|
3214
3228
|
__proto__: null,
|
|
@@ -3222,11 +3236,13 @@ const TestFrameWorkComponentSearch = {
|
|
|
3222
3236
|
focusPrevious: focusPrevious$1,
|
|
3223
3237
|
focusPreviousPage,
|
|
3224
3238
|
handleWheel,
|
|
3239
|
+
open: open$1,
|
|
3225
3240
|
openDetails,
|
|
3226
3241
|
replaceAll,
|
|
3227
3242
|
selectIndex: selectIndex$1,
|
|
3228
3243
|
setExcludeValue,
|
|
3229
3244
|
setIncludeValue,
|
|
3245
|
+
setLimit,
|
|
3230
3246
|
setReplaceValue,
|
|
3231
3247
|
setValue,
|
|
3232
3248
|
toggleMatchCase,
|