codeceptjs 3.5.10 → 3.5.11
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/docs/build/Appium.js +36 -36
- package/docs/build/Expect.js +33 -33
- package/docs/build/Nightmare.js +50 -50
- package/docs/build/Playwright.js +126 -122
- package/docs/build/Protractor.js +59 -59
- package/docs/build/Puppeteer.js +93 -89
- package/docs/build/TestCafe.js +48 -48
- package/docs/build/WebDriver.js +90 -92
- package/docs/helpers/Appium.md +1 -1
- package/docs/helpers/Expect.md +33 -33
- package/docs/helpers/Playwright.md +73 -35
- package/docs/helpers/Puppeteer.md +35 -24
- package/docs/helpers/WebDriver.md +26 -13
- package/docs/parallel.md +2 -2
- package/docs/plugins.md +3 -3
- package/docs/react.md +2 -1
- package/docs/vue.md +22 -0
- package/docs/webapi/scrollIntoView.mustache +1 -1
- package/lib/command/workers/runTests.js +17 -1
- package/lib/helper/Expect.js +33 -33
- package/lib/helper/Playwright.js +28 -24
- package/lib/helper/Puppeteer.js +23 -19
- package/lib/helper/WebDriver.js +15 -17
- package/lib/helper/extras/PlaywrightReactVueLocator.js +38 -0
- package/lib/plugin/retryFailedStep.js +2 -2
- package/lib/plugin/tryTo.js +5 -4
- package/package.json +15 -15
- package/typings/index.d.ts +1 -1
- package/typings/promiseBasedTypes.d.ts +119 -74
- package/typings/types.d.ts +111 -143
- package/lib/helper/extras/PlaywrightReact.js +0 -9
package/docs/build/Appium.js
CHANGED
|
@@ -1058,7 +1058,7 @@ class Appium extends Webdriver {
|
|
|
1058
1058
|
*
|
|
1059
1059
|
* [See complete reference](http://webdriver.io/api/mobile/swipe.html)
|
|
1060
1060
|
*
|
|
1061
|
-
* @param {
|
|
1061
|
+
* @param {string | object} locator
|
|
1062
1062
|
* @param {number} xoffset
|
|
1063
1063
|
* @param {number} yoffset
|
|
1064
1064
|
* @param {number} [speed=1000] (optional), 1000 by default
|
|
@@ -1113,7 +1113,7 @@ class Appium extends Webdriver {
|
|
|
1113
1113
|
* I.swipeDown(locator, 1200, 1000); // set offset and speed
|
|
1114
1114
|
* ```
|
|
1115
1115
|
*
|
|
1116
|
-
* @param {
|
|
1116
|
+
* @param {string | object} locator
|
|
1117
1117
|
* @param {number} [yoffset] (optional)
|
|
1118
1118
|
* @param {number} [speed=1000] (optional), 1000 by default
|
|
1119
1119
|
* @return {Promise<void>}
|
|
@@ -1142,7 +1142,7 @@ class Appium extends Webdriver {
|
|
|
1142
1142
|
* I.swipeLeft(locator, 1200, 1000); // set offset and speed
|
|
1143
1143
|
* ```
|
|
1144
1144
|
*
|
|
1145
|
-
* @param {
|
|
1145
|
+
* @param {string | object} locator
|
|
1146
1146
|
* @param {number} [xoffset] (optional)
|
|
1147
1147
|
* @param {number} [speed=1000] (optional), 1000 by default
|
|
1148
1148
|
* @return {Promise<void>}
|
|
@@ -1169,7 +1169,7 @@ class Appium extends Webdriver {
|
|
|
1169
1169
|
* I.swipeRight(locator, 1200, 1000); // set offset and speed
|
|
1170
1170
|
* ```
|
|
1171
1171
|
*
|
|
1172
|
-
* @param {
|
|
1172
|
+
* @param {string | object} locator
|
|
1173
1173
|
* @param {number} [xoffset] (optional)
|
|
1174
1174
|
* @param {number} [speed=1000] (optional), 1000 by default
|
|
1175
1175
|
* @return {Promise<void>}
|
|
@@ -1196,7 +1196,7 @@ class Appium extends Webdriver {
|
|
|
1196
1196
|
* I.swipeUp(locator, 1200, 1000); // set offset and speed
|
|
1197
1197
|
* ```
|
|
1198
1198
|
*
|
|
1199
|
-
* @param {
|
|
1199
|
+
* @param {string | object} locator
|
|
1200
1200
|
* @param {number} [yoffset] (optional)
|
|
1201
1201
|
* @param {number} [speed=1000] (optional), 1000 by default
|
|
1202
1202
|
* @return {Promise<void>}
|
|
@@ -1440,7 +1440,7 @@ class Appium extends Webdriver {
|
|
|
1440
1440
|
* // typing secret
|
|
1441
1441
|
* I.appendField('password', secret('123456'));
|
|
1442
1442
|
* ```
|
|
1443
|
-
* @param {
|
|
1443
|
+
* @param {string | object} field located by label|name|CSS|XPath|strict locator
|
|
1444
1444
|
* @param {string} value text value to append.
|
|
1445
1445
|
* @returns {void} automatically synchronized promise through #recorder
|
|
1446
1446
|
*
|
|
@@ -1462,8 +1462,8 @@ class Appium extends Webdriver {
|
|
|
1462
1462
|
* I.checkOption('I Agree to Terms and Conditions');
|
|
1463
1463
|
* I.checkOption('agree', '//form');
|
|
1464
1464
|
* ```
|
|
1465
|
-
* @param {
|
|
1466
|
-
* @param {?
|
|
1465
|
+
* @param {string | object} field checkbox located by label | name | CSS | XPath | strict locator.
|
|
1466
|
+
* @param {?string | object} [context=null] (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
1467
1467
|
* @returns {void} automatically synchronized promise through #recorder
|
|
1468
1468
|
*
|
|
1469
1469
|
*
|
|
@@ -1496,8 +1496,8 @@ class Appium extends Webdriver {
|
|
|
1496
1496
|
* I.click({css: 'nav a.login'});
|
|
1497
1497
|
* ```
|
|
1498
1498
|
*
|
|
1499
|
-
* @param {
|
|
1500
|
-
* @param {?
|
|
1499
|
+
* @param {string | object} locator clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
1500
|
+
* @param {?string | object | null} [context=null] (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
1501
1501
|
* @returns {void} automatically synchronized promise through #recorder
|
|
1502
1502
|
*
|
|
1503
1503
|
*
|
|
@@ -1516,7 +1516,7 @@ class Appium extends Webdriver {
|
|
|
1516
1516
|
* I.dontSeeCheckboxIsChecked('agree'); // located by name
|
|
1517
1517
|
* ```
|
|
1518
1518
|
*
|
|
1519
|
-
* @param {
|
|
1519
|
+
* @param {string | object} field located by label|name|CSS|XPath|strict locator.
|
|
1520
1520
|
* @returns {void} automatically synchronized promise through #recorder
|
|
1521
1521
|
*
|
|
1522
1522
|
*
|
|
@@ -1533,7 +1533,7 @@ class Appium extends Webdriver {
|
|
|
1533
1533
|
* I.dontSeeElement('.modal'); // modal is not shown
|
|
1534
1534
|
* ```
|
|
1535
1535
|
*
|
|
1536
|
-
* @param {
|
|
1536
|
+
* @param {string | object} locator located by CSS|XPath|Strict locator.
|
|
1537
1537
|
* @returns {void} automatically synchronized promise through #recorder
|
|
1538
1538
|
*
|
|
1539
1539
|
*/
|
|
@@ -1551,8 +1551,8 @@ class Appium extends Webdriver {
|
|
|
1551
1551
|
* I.dontSeeInField({ css: 'form input.email' }, 'user@user.com'); // field by CSS
|
|
1552
1552
|
* ```
|
|
1553
1553
|
*
|
|
1554
|
-
* @param {
|
|
1555
|
-
* @param {
|
|
1554
|
+
* @param {string | object} field located by label|name|CSS|XPath|strict locator.
|
|
1555
|
+
* @param {string | object} value value to check.
|
|
1556
1556
|
* @returns {void} automatically synchronized promise through #recorder
|
|
1557
1557
|
*
|
|
1558
1558
|
*
|
|
@@ -1573,7 +1573,7 @@ class Appium extends Webdriver {
|
|
|
1573
1573
|
* ```
|
|
1574
1574
|
*
|
|
1575
1575
|
* @param {string} text which is not present.
|
|
1576
|
-
* @param {
|
|
1576
|
+
* @param {string | object} [context] (optional) element located by CSS|XPath|strict locator in which to perfrom search.
|
|
1577
1577
|
* @returns {void} automatically synchronized promise through #recorder
|
|
1578
1578
|
*
|
|
1579
1579
|
*/
|
|
@@ -1596,8 +1596,8 @@ class Appium extends Webdriver {
|
|
|
1596
1596
|
* // or by strict locator
|
|
1597
1597
|
* I.fillField({css: 'form#login input[name=username]'}, 'John');
|
|
1598
1598
|
* ```
|
|
1599
|
-
* @param {
|
|
1600
|
-
* @param {
|
|
1599
|
+
* @param {string | object} field located by label|name|CSS|XPath|strict locator.
|
|
1600
|
+
* @param {string | object} value text value to fill.
|
|
1601
1601
|
* @returns {void} automatically synchronized promise through #recorder
|
|
1602
1602
|
*
|
|
1603
1603
|
*
|
|
@@ -1616,7 +1616,7 @@ class Appium extends Webdriver {
|
|
|
1616
1616
|
* let pins = await I.grabTextFromAll('#pin li');
|
|
1617
1617
|
* ```
|
|
1618
1618
|
*
|
|
1619
|
-
* @param {
|
|
1619
|
+
* @param {string | object} locator element located by CSS|XPath|strict locator.
|
|
1620
1620
|
* @returns {Promise<string[]>} attribute value
|
|
1621
1621
|
*
|
|
1622
1622
|
*
|
|
@@ -1635,7 +1635,7 @@ class Appium extends Webdriver {
|
|
|
1635
1635
|
* ```
|
|
1636
1636
|
* If multiple elements found returns first element.
|
|
1637
1637
|
*
|
|
1638
|
-
* @param {
|
|
1638
|
+
* @param {string | object} locator element located by CSS|XPath|strict locator.
|
|
1639
1639
|
* @returns {Promise<string>} attribute value
|
|
1640
1640
|
*
|
|
1641
1641
|
*
|
|
@@ -1653,7 +1653,7 @@ class Appium extends Webdriver {
|
|
|
1653
1653
|
* let numOfElements = await I.grabNumberOfVisibleElements('p');
|
|
1654
1654
|
* ```
|
|
1655
1655
|
*
|
|
1656
|
-
* @param {
|
|
1656
|
+
* @param {string | object} locator located by CSS|XPath|strict locator.
|
|
1657
1657
|
* @returns {Promise<number>} number of visible elements
|
|
1658
1658
|
*/
|
|
1659
1659
|
async grabNumberOfVisibleElements(locator) {
|
|
@@ -1671,7 +1671,7 @@ class Appium extends Webdriver {
|
|
|
1671
1671
|
* ```js
|
|
1672
1672
|
* let hint = await I.grabAttributeFrom('#tooltip', 'title');
|
|
1673
1673
|
* ```
|
|
1674
|
-
* @param {
|
|
1674
|
+
* @param {string | object} locator element located by CSS|XPath|strict locator.
|
|
1675
1675
|
* @param {string} attr attribute name.
|
|
1676
1676
|
* @returns {Promise<string>} attribute value
|
|
1677
1677
|
*
|
|
@@ -1689,7 +1689,7 @@ class Appium extends Webdriver {
|
|
|
1689
1689
|
* ```js
|
|
1690
1690
|
* let hints = await I.grabAttributeFromAll('.tooltip', 'title');
|
|
1691
1691
|
* ```
|
|
1692
|
-
* @param {
|
|
1692
|
+
* @param {string | object} locator element located by CSS|XPath|strict locator.
|
|
1693
1693
|
* @param {string} attr attribute name.
|
|
1694
1694
|
* @returns {Promise<string[]>} attribute value
|
|
1695
1695
|
*
|
|
@@ -1706,7 +1706,7 @@ class Appium extends Webdriver {
|
|
|
1706
1706
|
* ```js
|
|
1707
1707
|
* let inputs = await I.grabValueFromAll('//form/input');
|
|
1708
1708
|
* ```
|
|
1709
|
-
* @param {
|
|
1709
|
+
* @param {string | object} locator field located by label|name|CSS|XPath|strict locator.
|
|
1710
1710
|
* @returns {Promise<string[]>} attribute value
|
|
1711
1711
|
*
|
|
1712
1712
|
*
|
|
@@ -1724,7 +1724,7 @@ class Appium extends Webdriver {
|
|
|
1724
1724
|
* ```js
|
|
1725
1725
|
* let email = await I.grabValueFrom('input[name=email]');
|
|
1726
1726
|
* ```
|
|
1727
|
-
* @param {
|
|
1727
|
+
* @param {string | object} locator field located by label|name|CSS|XPath|strict locator.
|
|
1728
1728
|
* @returns {Promise<string>} attribute value
|
|
1729
1729
|
*
|
|
1730
1730
|
*
|
|
@@ -1758,8 +1758,8 @@ class Appium extends Webdriver {
|
|
|
1758
1758
|
* I.scrollIntoView('#submit', { behavior: "smooth", block: "center", inline: "center" });
|
|
1759
1759
|
* ```
|
|
1760
1760
|
*
|
|
1761
|
-
* @param {
|
|
1762
|
-
* @param {ScrollIntoViewOptions} scrollIntoViewOptions
|
|
1761
|
+
* @param {string | object} locator located by CSS|XPath|strict locator.
|
|
1762
|
+
* @param {ScrollIntoViewOptions|boolean} scrollIntoViewOptions either alignToTop=true|false or scrollIntoViewOptions. See https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView.
|
|
1763
1763
|
* @returns {void} automatically synchronized promise through #recorder
|
|
1764
1764
|
*
|
|
1765
1765
|
*
|
|
@@ -1778,7 +1778,7 @@ class Appium extends Webdriver {
|
|
|
1778
1778
|
* I.seeCheckboxIsChecked({css: '#signup_form input[type=checkbox]'});
|
|
1779
1779
|
* ```
|
|
1780
1780
|
*
|
|
1781
|
-
* @param {
|
|
1781
|
+
* @param {string | object} field located by label|name|CSS|XPath|strict locator.
|
|
1782
1782
|
* @returns {void} automatically synchronized promise through #recorder
|
|
1783
1783
|
*
|
|
1784
1784
|
*
|
|
@@ -1795,7 +1795,7 @@ class Appium extends Webdriver {
|
|
|
1795
1795
|
* ```js
|
|
1796
1796
|
* I.seeElement('#modal');
|
|
1797
1797
|
* ```
|
|
1798
|
-
* @param {
|
|
1798
|
+
* @param {string | object} locator located by CSS|XPath|strict locator.
|
|
1799
1799
|
* @returns {void} automatically synchronized promise through #recorder
|
|
1800
1800
|
*
|
|
1801
1801
|
*
|
|
@@ -1815,8 +1815,8 @@ class Appium extends Webdriver {
|
|
|
1815
1815
|
* I.seeInField('form input[type=hidden]','hidden_value');
|
|
1816
1816
|
* I.seeInField('#searchform input','Search');
|
|
1817
1817
|
* ```
|
|
1818
|
-
* @param {
|
|
1819
|
-
* @param {
|
|
1818
|
+
* @param {string | object} field located by label|name|CSS|XPath|strict locator.
|
|
1819
|
+
* @param {string | object} value value to check.
|
|
1820
1820
|
* @returns {void} automatically synchronized promise through #recorder
|
|
1821
1821
|
*
|
|
1822
1822
|
*
|
|
@@ -1837,7 +1837,7 @@ class Appium extends Webdriver {
|
|
|
1837
1837
|
* I.see('Register', {css: 'form.register'}); // use strict locator
|
|
1838
1838
|
* ```
|
|
1839
1839
|
* @param {string} text expected on page.
|
|
1840
|
-
* @param {?
|
|
1840
|
+
* @param {?string | object} [context=null] (optional, `null` by default) element located by CSS|Xpath|strict locator in which to search for text.
|
|
1841
1841
|
* @returns {void} automatically synchronized promise through #recorder
|
|
1842
1842
|
*
|
|
1843
1843
|
*
|
|
@@ -1866,7 +1866,7 @@ class Appium extends Webdriver {
|
|
|
1866
1866
|
* ```js
|
|
1867
1867
|
* I.selectOption('Which OS do you use?', ['Android', 'iOS']);
|
|
1868
1868
|
* ```
|
|
1869
|
-
* @param {
|
|
1869
|
+
* @param {string | object} select field located by label|name|CSS|XPath|strict locator.
|
|
1870
1870
|
* @param {string|Array<*>} option visible text or value of option.
|
|
1871
1871
|
* @returns {void} automatically synchronized promise through #recorder
|
|
1872
1872
|
*
|
|
@@ -1887,7 +1887,7 @@ class Appium extends Webdriver {
|
|
|
1887
1887
|
* I.waitForElement('.btn.continue', 5); // wait for 5 secs
|
|
1888
1888
|
* ```
|
|
1889
1889
|
*
|
|
1890
|
-
* @param {
|
|
1890
|
+
* @param {string | object} locator element located by CSS|XPath|strict locator.
|
|
1891
1891
|
* @param {number} [sec] (optional, `1` by default) time in seconds to wait
|
|
1892
1892
|
* @returns {void} automatically synchronized promise through #recorder
|
|
1893
1893
|
*
|
|
@@ -1906,7 +1906,7 @@ class Appium extends Webdriver {
|
|
|
1906
1906
|
* I.waitForVisible('#popup');
|
|
1907
1907
|
* ```
|
|
1908
1908
|
*
|
|
1909
|
-
* @param {
|
|
1909
|
+
* @param {string | object} locator element located by CSS|XPath|strict locator.
|
|
1910
1910
|
* @param {number} [sec=1] (optional, `1` by default) time in seconds to wait
|
|
1911
1911
|
* @returns {void} automatically synchronized promise through #recorder
|
|
1912
1912
|
*
|
|
@@ -1925,7 +1925,7 @@ class Appium extends Webdriver {
|
|
|
1925
1925
|
* I.waitForInvisible('#popup');
|
|
1926
1926
|
* ```
|
|
1927
1927
|
*
|
|
1928
|
-
* @param {
|
|
1928
|
+
* @param {string | object} locator element located by CSS|XPath|strict locator.
|
|
1929
1929
|
* @param {number} [sec=1] (optional, `1` by default) time in seconds to wait
|
|
1930
1930
|
* @returns {void} automatically synchronized promise through #recorder
|
|
1931
1931
|
*
|
|
@@ -1948,7 +1948,7 @@ class Appium extends Webdriver {
|
|
|
1948
1948
|
*
|
|
1949
1949
|
* @param {string }text to wait for.
|
|
1950
1950
|
* @param {number} [sec=1] (optional, `1` by default) time in seconds to wait
|
|
1951
|
-
* @param {
|
|
1951
|
+
* @param {string | object} [context] (optional) element located by CSS|XPath|strict locator.
|
|
1952
1952
|
* @returns {void} automatically synchronized promise through #recorder
|
|
1953
1953
|
*
|
|
1954
1954
|
*
|
package/docs/build/Expect.js
CHANGED
|
@@ -20,7 +20,7 @@ chai.use(require('chai-match-pattern'));
|
|
|
20
20
|
*{
|
|
21
21
|
* helpers: {
|
|
22
22
|
* Playwright: {...},
|
|
23
|
-
*
|
|
23
|
+
* Expect: {},
|
|
24
24
|
* }
|
|
25
25
|
*}
|
|
26
26
|
* ```
|
|
@@ -32,7 +32,7 @@ class ExpectHelper {
|
|
|
32
32
|
*
|
|
33
33
|
* @param {*} actualValue
|
|
34
34
|
* @param {*} expectedValue
|
|
35
|
-
* @param {*} customErrorMsg
|
|
35
|
+
* @param {*} [customErrorMsg]
|
|
36
36
|
*/
|
|
37
37
|
expectEqual(actualValue, expectedValue, customErrorMsg = '') {
|
|
38
38
|
// @ts-ignore
|
|
@@ -44,7 +44,7 @@ class ExpectHelper {
|
|
|
44
44
|
*
|
|
45
45
|
* @param {*} actualValue
|
|
46
46
|
* @param {*} expectedValue
|
|
47
|
-
* @param {*} customErrorMsg
|
|
47
|
+
* @param {*} [customErrorMsg]
|
|
48
48
|
*/
|
|
49
49
|
expectNotEqual(actualValue, expectedValue, customErrorMsg = '') {
|
|
50
50
|
// @ts-ignore
|
|
@@ -56,7 +56,7 @@ class ExpectHelper {
|
|
|
56
56
|
*
|
|
57
57
|
* @param {*} actualValue
|
|
58
58
|
* @param {*} expectedValue
|
|
59
|
-
* @param {*} customErrorMsg
|
|
59
|
+
* @param {*} [customErrorMsg]
|
|
60
60
|
|
|
61
61
|
*/
|
|
62
62
|
expectDeepEqual(actualValue, expectedValue, customErrorMsg = '') {
|
|
@@ -69,7 +69,7 @@ class ExpectHelper {
|
|
|
69
69
|
*
|
|
70
70
|
* @param {*} actualValue
|
|
71
71
|
* @param {*} expectedValue
|
|
72
|
-
* @param {*} customErrorMsg
|
|
72
|
+
* @param {*} [customErrorMsg]
|
|
73
73
|
*/
|
|
74
74
|
expectNotDeepEqual(actualValue, expectedValue, customErrorMsg = '') {
|
|
75
75
|
// @ts-ignore
|
|
@@ -81,7 +81,7 @@ class ExpectHelper {
|
|
|
81
81
|
*
|
|
82
82
|
* @param {*} actualValue
|
|
83
83
|
* @param {*} expectedValueToContain
|
|
84
|
-
* @param {*} customErrorMsg
|
|
84
|
+
* @param {*} [customErrorMsg]
|
|
85
85
|
*/
|
|
86
86
|
expectContain(actualValue, expectedValueToContain, customErrorMsg = '') {
|
|
87
87
|
// @ts-ignore
|
|
@@ -95,7 +95,7 @@ class ExpectHelper {
|
|
|
95
95
|
*
|
|
96
96
|
* @param {*} actualValue
|
|
97
97
|
* @param {*} expectedValueToNotContain
|
|
98
|
-
* @param {*} customErrorMsg
|
|
98
|
+
* @param {*} [customErrorMsg]
|
|
99
99
|
*/
|
|
100
100
|
expectNotContain(
|
|
101
101
|
actualValue,
|
|
@@ -113,7 +113,7 @@ class ExpectHelper {
|
|
|
113
113
|
*
|
|
114
114
|
* @param {*} actualValue
|
|
115
115
|
* @param {*} expectedValueToStartWith
|
|
116
|
-
* @param {*} customErrorMsg
|
|
116
|
+
* @param {*} [customErrorMsg]
|
|
117
117
|
*/
|
|
118
118
|
expectStartsWith(actualValue, expectedValueToStartWith, customErrorMsg = '') {
|
|
119
119
|
// @ts-ignore
|
|
@@ -127,7 +127,7 @@ class ExpectHelper {
|
|
|
127
127
|
*
|
|
128
128
|
* @param {*} actualValue
|
|
129
129
|
* @param {*} expectedValueToNotStartWith
|
|
130
|
-
* @param {*} customErrorMsg
|
|
130
|
+
* @param {*} [customErrorMsg]
|
|
131
131
|
*/
|
|
132
132
|
expectNotStartsWith(
|
|
133
133
|
actualValue,
|
|
@@ -144,7 +144,7 @@ class ExpectHelper {
|
|
|
144
144
|
/**
|
|
145
145
|
* @param {*} actualValue
|
|
146
146
|
* @param {*} expectedValueToEndWith
|
|
147
|
-
* @param {*} customErrorMsg
|
|
147
|
+
* @param {*} [customErrorMsg]
|
|
148
148
|
*/
|
|
149
149
|
expectEndsWith(actualValue, expectedValueToEndWith, customErrorMsg = '') {
|
|
150
150
|
// @ts-ignore
|
|
@@ -157,7 +157,7 @@ class ExpectHelper {
|
|
|
157
157
|
/**
|
|
158
158
|
* @param {*} actualValue
|
|
159
159
|
* @param {*} expectedValueToNotEndWith
|
|
160
|
-
* @param {*} customErrorMsg
|
|
160
|
+
* @param {*} [customErrorMsg]
|
|
161
161
|
*/
|
|
162
162
|
expectNotEndsWith(
|
|
163
163
|
actualValue,
|
|
@@ -174,7 +174,7 @@ class ExpectHelper {
|
|
|
174
174
|
/**
|
|
175
175
|
* @param {*} targetData
|
|
176
176
|
* @param {*} jsonSchema
|
|
177
|
-
* @param {*} customErrorMsg
|
|
177
|
+
* @param {*} [customErrorMsg]
|
|
178
178
|
*/
|
|
179
179
|
expectJsonSchema(targetData, jsonSchema, customErrorMsg = '') {
|
|
180
180
|
// @ts-ignore
|
|
@@ -186,7 +186,7 @@ class ExpectHelper {
|
|
|
186
186
|
/**
|
|
187
187
|
* @param {*} targetData
|
|
188
188
|
* @param {*} jsonSchema
|
|
189
|
-
* @param {*} customErrorMsg
|
|
189
|
+
* @param {*} [customErrorMsg]
|
|
190
190
|
* @param {*} ajvOptions Pass AJV options
|
|
191
191
|
*/
|
|
192
192
|
expectJsonSchemaUsingAJV(
|
|
@@ -204,7 +204,7 @@ class ExpectHelper {
|
|
|
204
204
|
/**
|
|
205
205
|
* @param {*} targetData
|
|
206
206
|
* @param {*} propertyName
|
|
207
|
-
* @param {*} customErrorMsg
|
|
207
|
+
* @param {*} [customErrorMsg]
|
|
208
208
|
*/
|
|
209
209
|
expectHasProperty(targetData, propertyName, customErrorMsg = '') {
|
|
210
210
|
// @ts-ignore
|
|
@@ -215,7 +215,7 @@ class ExpectHelper {
|
|
|
215
215
|
/**
|
|
216
216
|
* @param {*} targetData
|
|
217
217
|
* @param {*} propertyName
|
|
218
|
-
* @param {*} customErrorMsg
|
|
218
|
+
* @param {*} [customErrorMsg]
|
|
219
219
|
*/
|
|
220
220
|
expectHasAProperty(targetData, propertyName, customErrorMsg = '') {
|
|
221
221
|
// @ts-ignore
|
|
@@ -226,7 +226,7 @@ class ExpectHelper {
|
|
|
226
226
|
/**
|
|
227
227
|
* @param {*} targetData
|
|
228
228
|
* @param {*} type
|
|
229
|
-
* @param {*} customErrorMsg
|
|
229
|
+
* @param {*} [customErrorMsg]
|
|
230
230
|
*/
|
|
231
231
|
expectToBeA(targetData, type, customErrorMsg = '') {
|
|
232
232
|
// @ts-ignore
|
|
@@ -237,7 +237,7 @@ class ExpectHelper {
|
|
|
237
237
|
/**
|
|
238
238
|
* @param {*} targetData
|
|
239
239
|
* @param {*} type
|
|
240
|
-
* @param {*} customErrorMsg
|
|
240
|
+
* @param {*} [customErrorMsg]
|
|
241
241
|
*/
|
|
242
242
|
expectToBeAn(targetData, type, customErrorMsg = '') {
|
|
243
243
|
// @ts-ignore
|
|
@@ -248,7 +248,7 @@ class ExpectHelper {
|
|
|
248
248
|
/**
|
|
249
249
|
* @param {*} targetData
|
|
250
250
|
* @param {*} regex
|
|
251
|
-
* @param {*} customErrorMsg
|
|
251
|
+
* @param {*} [customErrorMsg]
|
|
252
252
|
*/
|
|
253
253
|
expectMatchRegex(targetData, regex, customErrorMsg = '') {
|
|
254
254
|
// @ts-ignore
|
|
@@ -259,7 +259,7 @@ class ExpectHelper {
|
|
|
259
259
|
/**
|
|
260
260
|
* @param {*} targetData
|
|
261
261
|
* @param {*} length
|
|
262
|
-
* @param {*} customErrorMsg
|
|
262
|
+
* @param {*} [customErrorMsg]
|
|
263
263
|
*/
|
|
264
264
|
expectLengthOf(targetData, length, customErrorMsg = '') {
|
|
265
265
|
// @ts-ignore
|
|
@@ -269,7 +269,7 @@ class ExpectHelper {
|
|
|
269
269
|
|
|
270
270
|
/**
|
|
271
271
|
* @param {*} targetData
|
|
272
|
-
* @param {*} customErrorMsg
|
|
272
|
+
* @param {*} [customErrorMsg]
|
|
273
273
|
*/
|
|
274
274
|
expectEmpty(targetData, customErrorMsg = '') {
|
|
275
275
|
// @ts-ignore
|
|
@@ -279,7 +279,7 @@ class ExpectHelper {
|
|
|
279
279
|
|
|
280
280
|
/**
|
|
281
281
|
* @param {*} targetData
|
|
282
|
-
* @param {*} customErrorMsg
|
|
282
|
+
* @param {*} [customErrorMsg]
|
|
283
283
|
*/
|
|
284
284
|
expectTrue(targetData, customErrorMsg = '') {
|
|
285
285
|
// @ts-ignore
|
|
@@ -289,7 +289,7 @@ class ExpectHelper {
|
|
|
289
289
|
|
|
290
290
|
/**
|
|
291
291
|
* @param {*} targetData
|
|
292
|
-
* @param {*} customErrorMsg
|
|
292
|
+
* @param {*} [customErrorMsg]
|
|
293
293
|
*/
|
|
294
294
|
expectFalse(targetData, customErrorMsg = '') {
|
|
295
295
|
// @ts-ignore
|
|
@@ -299,8 +299,8 @@ class ExpectHelper {
|
|
|
299
299
|
|
|
300
300
|
/**
|
|
301
301
|
* @param {*} targetData
|
|
302
|
-
* @param {*} aboveThan
|
|
303
|
-
* @param {*} customErrorMsg
|
|
302
|
+
* @param {*} aboveThan
|
|
303
|
+
* @param {*} [customErrorMsg]
|
|
304
304
|
*/
|
|
305
305
|
expectAbove(targetData, aboveThan, customErrorMsg = '') {
|
|
306
306
|
// @ts-ignore
|
|
@@ -310,8 +310,8 @@ class ExpectHelper {
|
|
|
310
310
|
|
|
311
311
|
/**
|
|
312
312
|
* @param {*} targetData
|
|
313
|
-
* @param {*} belowThan
|
|
314
|
-
* @param {*} customErrorMsg
|
|
313
|
+
* @param {*} belowThan
|
|
314
|
+
* @param {*} [customErrorMsg]
|
|
315
315
|
*/
|
|
316
316
|
expectBelow(targetData, belowThan, customErrorMsg = '') {
|
|
317
317
|
// @ts-ignore
|
|
@@ -322,7 +322,7 @@ class ExpectHelper {
|
|
|
322
322
|
/**
|
|
323
323
|
* @param {*} targetData
|
|
324
324
|
* @param {*} lengthAboveThan
|
|
325
|
-
* @param {*} customErrorMsg
|
|
325
|
+
* @param {*} [customErrorMsg]
|
|
326
326
|
*/
|
|
327
327
|
expectLengthAboveThan(targetData, lengthAboveThan, customErrorMsg = '') {
|
|
328
328
|
// @ts-ignore
|
|
@@ -335,7 +335,7 @@ class ExpectHelper {
|
|
|
335
335
|
/**
|
|
336
336
|
* @param {*} targetData
|
|
337
337
|
* @param {*} lengthBelowThan
|
|
338
|
-
* @param {*} customErrorMsg
|
|
338
|
+
* @param {*} [customErrorMsg]
|
|
339
339
|
*/
|
|
340
340
|
expectLengthBelowThan(targetData, lengthBelowThan, customErrorMsg = '') {
|
|
341
341
|
// @ts-ignore
|
|
@@ -348,7 +348,7 @@ class ExpectHelper {
|
|
|
348
348
|
/**
|
|
349
349
|
* @param {*} actualValue
|
|
350
350
|
* @param {*} expectedValue
|
|
351
|
-
* @param {*} customErrorMsg
|
|
351
|
+
* @param {*} [customErrorMsg]
|
|
352
352
|
*/
|
|
353
353
|
expectEqualIgnoreCase(actualValue, expectedValue, customErrorMsg = '') {
|
|
354
354
|
// @ts-ignore
|
|
@@ -362,7 +362,7 @@ class ExpectHelper {
|
|
|
362
362
|
* expects members of two arrays are deeply equal
|
|
363
363
|
* @param {*} actualValue
|
|
364
364
|
* @param {*} expectedValue
|
|
365
|
-
* @param {*} customErrorMsg
|
|
365
|
+
* @param {*} [customErrorMsg]
|
|
366
366
|
*/
|
|
367
367
|
expectDeepMembers(actualValue, expectedValue, customErrorMsg = '') {
|
|
368
368
|
// @ts-ignore
|
|
@@ -376,7 +376,7 @@ class ExpectHelper {
|
|
|
376
376
|
* expects an array to be a superset of another array
|
|
377
377
|
* @param {*} superset
|
|
378
378
|
* @param {*} set
|
|
379
|
-
* @param {*} customErrorMsg
|
|
379
|
+
* @param {*} [customErrorMsg]
|
|
380
380
|
*/
|
|
381
381
|
expectDeepIncludeMembers(superset, set, customErrorMsg = '') {
|
|
382
382
|
// @ts-ignore
|
|
@@ -391,7 +391,7 @@ class ExpectHelper {
|
|
|
391
391
|
* @param {*} actualValue
|
|
392
392
|
* @param {*} expectedValue
|
|
393
393
|
* @param {*} fieldsToExclude
|
|
394
|
-
* @param {*} customErrorMsg
|
|
394
|
+
* @param {*} [customErrorMsg]
|
|
395
395
|
*/
|
|
396
396
|
expectDeepEqualExcluding(
|
|
397
397
|
actualValue,
|
|
@@ -410,7 +410,7 @@ class ExpectHelper {
|
|
|
410
410
|
* expects a JSON object matches a provided pattern
|
|
411
411
|
* @param {*} actualValue
|
|
412
412
|
* @param {*} expectedPattern
|
|
413
|
-
* @param {*} customErrorMsg
|
|
413
|
+
* @param {*} [customErrorMsg]
|
|
414
414
|
*/
|
|
415
415
|
expectMatchesPattern(actualValue, expectedPattern, customErrorMsg = '') {
|
|
416
416
|
// @ts-ignore
|