@lvce-editor/test-worker 3.1.0 → 3.3.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/testWorkerMain.js +13 -0
- package/package.json +1 -1
package/dist/testWorkerMain.js
CHANGED
|
@@ -999,6 +999,12 @@ const expect$1 = locator => {
|
|
|
999
999
|
text
|
|
1000
1000
|
});
|
|
1001
1001
|
},
|
|
1002
|
+
async toContainText(text) {
|
|
1003
|
+
Assert.string(text, 'text must be of type string');
|
|
1004
|
+
return this.checkSingleElementCondition('toContainText', {
|
|
1005
|
+
text
|
|
1006
|
+
});
|
|
1007
|
+
},
|
|
1002
1008
|
async toHaveValue(value) {
|
|
1003
1009
|
Assert.string(value, 'value must be of type string');
|
|
1004
1010
|
return this.checkSingleElementCondition('toHaveValue', {
|
|
@@ -1464,6 +1470,12 @@ const showHover = async () => {
|
|
|
1464
1470
|
const openRename = async () => {
|
|
1465
1471
|
await invoke('Editor.openRename');
|
|
1466
1472
|
};
|
|
1473
|
+
const shouldHaveText = async expectedText => {
|
|
1474
|
+
const text = await invoke('Editor.getText');
|
|
1475
|
+
if (text !== expectedText) {
|
|
1476
|
+
throw new Error(`Expected editor to have text ${expectedText} but was ${text}`);
|
|
1477
|
+
}
|
|
1478
|
+
};
|
|
1467
1479
|
|
|
1468
1480
|
const TestFrameWorkComponentEditor = {
|
|
1469
1481
|
__proto__: null,
|
|
@@ -1511,6 +1523,7 @@ const TestFrameWorkComponentEditor = {
|
|
|
1511
1523
|
setCursor,
|
|
1512
1524
|
setDeltaY,
|
|
1513
1525
|
setSelections,
|
|
1526
|
+
shouldHaveText,
|
|
1514
1527
|
showHover,
|
|
1515
1528
|
sortImports,
|
|
1516
1529
|
sourceActionsSelectCurrent,
|