@lvce-editor/test-worker 4.32.0 → 4.33.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 -1
- package/dist/testWorkerMain.js +35 -3
- package/package.json +1 -1
package/dist/api.d.ts
CHANGED
|
@@ -247,11 +247,14 @@ declare const toggleReplace: () => Promise<void>;
|
|
|
247
247
|
declare const update: (settings: any) => Promise<void>;
|
|
248
248
|
declare const show$2: () => Promise<void>;
|
|
249
249
|
declare const handleInput$2: (searchValue: string) => Promise<void>;
|
|
250
|
+
declare const usePreviousSearchValue: () => Promise<void>;
|
|
251
|
+
declare const useNextSearchValue: () => Promise<void>;
|
|
250
252
|
declare const clear: (searchValue: string) => Promise<void>;
|
|
251
253
|
declare const selectTab$1: (tabId: string) => Promise<void>;
|
|
252
254
|
declare const selectWorkspace: () => Promise<void>;
|
|
253
255
|
declare const selectTextEditor: () => Promise<void>;
|
|
254
256
|
declare const selectExtensions: () => Promise<void>;
|
|
257
|
+
declare const handleScroll$1: (scrollTop: number) => Promise<void>;
|
|
255
258
|
declare const open$4: (id: string) => Promise<void>;
|
|
256
259
|
declare const hide: () => Promise<void>;
|
|
257
260
|
declare const selectIndex$5: (index: number) => Promise<void>;
|
|
@@ -364,7 +367,7 @@ declare namespace Settings {
|
|
|
364
367
|
export { update };
|
|
365
368
|
}
|
|
366
369
|
declare namespace SettingsView {
|
|
367
|
-
export { clear, handleInput$2 as handleInput, selectExtensions, selectTab$1 as selectTab, selectTextEditor, selectWorkspace, show$2 as show };
|
|
370
|
+
export { clear, handleInput$2 as handleInput, handleScroll$1 as handleScroll, selectExtensions, selectTab$1 as selectTab, selectTextEditor, selectWorkspace, show$2 as show, useNextSearchValue, usePreviousSearchValue };
|
|
368
371
|
}
|
|
369
372
|
declare namespace SideBar {
|
|
370
373
|
export { hide, open$4 as open };
|
package/dist/testWorkerMain.js
CHANGED
|
@@ -1286,6 +1286,21 @@ const toHaveCss = async (locator, options) => {
|
|
|
1286
1286
|
}
|
|
1287
1287
|
return `expected ${locatorString} to have css ${key} ${value} but was ${actual}`;
|
|
1288
1288
|
};
|
|
1289
|
+
const toHaveJSProperty = async (locator, options) => {
|
|
1290
|
+
const {
|
|
1291
|
+
wasFound,
|
|
1292
|
+
actual
|
|
1293
|
+
} = await locatorInvoke(locator, 'TestFrameWork.checkConditionError', 'toHaveJSProperty', locator, options);
|
|
1294
|
+
const locatorString = printLocator(locator);
|
|
1295
|
+
const {
|
|
1296
|
+
key,
|
|
1297
|
+
value
|
|
1298
|
+
} = options;
|
|
1299
|
+
if (!wasFound) {
|
|
1300
|
+
return `expected ${locatorString} to have js property ${key} ${value} but element was not found`;
|
|
1301
|
+
}
|
|
1302
|
+
return `expected ${locatorString} to have js property ${key} ${value} but was ${actual}`;
|
|
1303
|
+
};
|
|
1289
1304
|
|
|
1290
1305
|
const getFunction = fnName => {
|
|
1291
1306
|
switch (fnName) {
|
|
@@ -1309,6 +1324,8 @@ const getFunction = fnName => {
|
|
|
1309
1324
|
return toHaveCss;
|
|
1310
1325
|
case 'toHaveClass':
|
|
1311
1326
|
return toHaveClass;
|
|
1327
|
+
case 'toHaveJSProperty':
|
|
1328
|
+
return toHaveJSProperty;
|
|
1312
1329
|
default:
|
|
1313
1330
|
throw new Error(`unexpected function name ${fnName}`);
|
|
1314
1331
|
}
|
|
@@ -2215,14 +2232,14 @@ const openJsonValidation = async () => {
|
|
|
2215
2232
|
const openSettings = async () => {
|
|
2216
2233
|
await openFeature('Settings');
|
|
2217
2234
|
};
|
|
2218
|
-
const handleScroll = async scrollTop => {
|
|
2235
|
+
const handleScroll$1 = async scrollTop => {
|
|
2219
2236
|
// @ts-ignore
|
|
2220
2237
|
return invoke('ExtensionDetail.handleScroll', scrollTop);
|
|
2221
2238
|
};
|
|
2222
2239
|
|
|
2223
2240
|
const TestFrameWorkComponentExtensionDetail = {
|
|
2224
2241
|
__proto__: null,
|
|
2225
|
-
handleScroll,
|
|
2242
|
+
handleScroll: handleScroll$1,
|
|
2226
2243
|
open: open$4,
|
|
2227
2244
|
openCommands,
|
|
2228
2245
|
openFeature,
|
|
@@ -2899,6 +2916,14 @@ const handleInput$1 = async searchValue => {
|
|
|
2899
2916
|
// @ts-ignore
|
|
2900
2917
|
return invoke('Settings.handleInput', searchValue, Script);
|
|
2901
2918
|
};
|
|
2919
|
+
const usePreviousSearchValue = async () => {
|
|
2920
|
+
// @ts-ignore
|
|
2921
|
+
return invoke('Settings.usePreviousSearchValue');
|
|
2922
|
+
};
|
|
2923
|
+
const useNextSearchValue = async () => {
|
|
2924
|
+
// @ts-ignore
|
|
2925
|
+
return invoke('Settings.useNextSearchValue');
|
|
2926
|
+
};
|
|
2902
2927
|
const clear = async searchValue => {
|
|
2903
2928
|
// @ts-ignore
|
|
2904
2929
|
return invoke('Settings.clear', searchValue, Script);
|
|
@@ -2916,16 +2941,23 @@ const selectTextEditor = async () => {
|
|
|
2916
2941
|
const selectExtensions = async () => {
|
|
2917
2942
|
await selectTab('extensions');
|
|
2918
2943
|
};
|
|
2944
|
+
const handleScroll = async scrollTop => {
|
|
2945
|
+
// @ts-ignore
|
|
2946
|
+
await invoke('Settings.handleScroll', scrollTop, Script);
|
|
2947
|
+
};
|
|
2919
2948
|
|
|
2920
2949
|
const TestFrameWorkComponentSettingsView = {
|
|
2921
2950
|
__proto__: null,
|
|
2922
2951
|
clear,
|
|
2923
2952
|
handleInput: handleInput$1,
|
|
2953
|
+
handleScroll,
|
|
2924
2954
|
selectExtensions,
|
|
2925
2955
|
selectTab,
|
|
2926
2956
|
selectTextEditor,
|
|
2927
2957
|
selectWorkspace,
|
|
2928
|
-
show
|
|
2958
|
+
show,
|
|
2959
|
+
useNextSearchValue,
|
|
2960
|
+
usePreviousSearchValue
|
|
2929
2961
|
};
|
|
2930
2962
|
|
|
2931
2963
|
const open = async id => {
|