Skip to content

Commit 39382f5

Browse files
authored
fix: support secret value for some methods (#3837)
1 parent a320bb1 commit 39382f5

19 files changed

+79
-32
lines changed

docs/helpers/Appium.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -941,7 +941,7 @@ I.dontSeeInField({ css: 'form input.email' }, '[email protected]'); // field by CSS
941941
#### Parameters
942942

943943
- `field` **([string][5] \| [object][10])** located by label|name|CSS|XPath|strict locator.
944-
- `value` **[string][5]** value to check.
944+
- `value` **([string][5] \| [object][10])** value to check.
945945
⚠️ returns a _promise_ which is synchronized internally by recorder
946946

947947
### dontSee
@@ -1171,7 +1171,7 @@ I.seeInField('#searchform input','Search');
11711171
#### Parameters
11721172

11731173
- `field` **([string][5] \| [object][10])** located by label|name|CSS|XPath|strict locator.
1174-
- `value` **[string][5]** value to check.
1174+
- `value` **([string][5] \| [object][10])** value to check.
11751175
⚠️ returns a _promise_ which is synchronized internally by recorder
11761176

11771177
### see

docs/helpers/Nightmare.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ I.dontSeeInField({ css: 'form input.email' }, '[email protected]'); // field by CSS
305305
#### Parameters
306306

307307
- `field` **([string][3] | [object][4])** located by label|name|CSS|XPath|strict locator.
308-
- `value` **[string][3]** value to check.
308+
- `value` **([string][3] | [object][4])** value to check.
309309
⚠️ returns a _promise_ which is synchronized internally by recorder
310310

311311
### dontSeeInSource
@@ -956,7 +956,7 @@ I.seeInField('#searchform input','Search');
956956
#### Parameters
957957
958958
- `field` **([string][3] | [object][4])** located by label|name|CSS|XPath|strict locator.
959-
- `value` **[string][3]** value to check.
959+
- `value` **([string][3] | [object][4])** value to check.
960960
⚠️ returns a _promise_ which is synchronized internally by recorder
961961
962962
### seeInSource

docs/helpers/Playwright.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -711,7 +711,7 @@ I.dontSeeInField({ css: 'form input.email' }, '[email protected]'); // field by CSS
711711
#### Parameters
712712

713713
- `field` **([string][8] | [object][5])** located by label|name|CSS|XPath|strict locator.
714-
- `value` **[string][8]** value to check.
714+
- `value` **([string][8] | [object][5])** value to check.
715715
⚠️ returns a _promise_ which is synchronized internally by recorder
716716

717717
### dontSeeInSource
@@ -1835,7 +1835,7 @@ I.seeInField('#searchform input','Search');
18351835
#### Parameters
18361836

18371837
- `field` **([string][8] | [object][5])** located by label|name|CSS|XPath|strict locator.
1838-
- `value` **[string][8]** value to check.
1838+
- `value` **([string][8] | [object][5])** value to check.
18391839
⚠️ returns a _promise_ which is synchronized internally by recorder
18401840

18411841
### seeInPopup

docs/helpers/Protractor.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ I.dontSeeInField({ css: 'form input.email' }, '[email protected]'); // field by CSS
441441
#### Parameters
442442

443443
- `field` **([string][9] | [object][10])** located by label|name|CSS|XPath|strict locator.
444-
- `value` **[string][9]** value to check.
444+
- `value` **([string][9] | [object][10])** value to check.
445445
⚠️ returns a _promise_ which is synchronized internally by recorder
446446

447447
### dontSeeInSource
@@ -1225,7 +1225,7 @@ I.seeInField('#searchform input','Search');
12251225
#### Parameters
12261226
12271227
- `field` **([string][9] | [object][10])** located by label|name|CSS|XPath|strict locator.
1228-
- `value` **[string][9]** value to check.
1228+
- `value` **([string][9] | [object][10])** value to check.
12291229
⚠️ returns a _promise_ which is synchronized internally by recorder
12301230
12311231
### seeInPopup

docs/helpers/Puppeteer.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,7 @@ I.dontSeeInField({ css: 'form input.email' }, '[email protected]'); // field by CSS
589589
#### Parameters
590590

591591
- `field` **([string][6] | [object][4])** located by label|name|CSS|XPath|strict locator.
592-
- `value` **[string][6]** value to check.
592+
- `value` **([string][6] | [object][4])** value to check.
593593
⚠️ returns a _promise_ which is synchronized internally by recorder
594594

595595
### dontSeeInSource
@@ -1618,7 +1618,7 @@ I.seeInField('#searchform input','Search');
16181618
#### Parameters
16191619
16201620
- `field` **([string][6] | [object][4])** located by label|name|CSS|XPath|strict locator.
1621-
- `value` **[string][6]** value to check.
1621+
- `value` **([string][6] | [object][4])** value to check.
16221622
⚠️ returns a _promise_ which is synchronized internally by recorder
16231623
16241624
### seeInPopup

docs/helpers/TestCafe.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ I.dontSeeInField({ css: 'form input.email' }, '[email protected]'); // field by CSS
355355
#### Parameters
356356

357357
- `field` **([string][4] | [object][5])** located by label|name|CSS|XPath|strict locator.
358-
- `value` **[string][4]** value to check.
358+
- `value` **([string][4] | [object][5])** value to check.
359359
⚠️ returns a _promise_ which is synchronized internally by recorder
360360

361361
### dontSeeInSource
@@ -926,7 +926,7 @@ I.seeInField('#searchform input','Search');
926926
#### Parameters
927927

928928
- `field` **([string][4] | [object][5])** located by label|name|CSS|XPath|strict locator.
929-
- `value` **[string][4]** value to check.
929+
- `value` **([string][4] | [object][5])** value to check.
930930
⚠️ returns a _promise_ which is synchronized internally by recorder
931931

932932
### seeInSource

docs/helpers/WebDriver.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -757,7 +757,7 @@ I.dontSeeInField({ css: 'form input.email' }, '[email protected]'); // field by CSS
757757
#### Parameters
758758

759759
- `field` **([string][17] | [object][16])** located by label|name|CSS|XPath|strict locator.
760-
- `value` **[string][17]** value to check.
760+
- `value` **([string][17] | [object][16])** value to check.
761761
⚠️ returns a _promise_ which is synchronized internally by recorder
762762

763763
### dontSeeInSource
@@ -1783,7 +1783,7 @@ I.seeInField('#searchform input','Search');
17831783
#### Parameters
17841784
17851785
- `field` **([string][17] | [object][16])** located by label|name|CSS|XPath|strict locator.
1786-
- `value` **[string][17]** value to check.
1786+
- `value` **([string][17] | [object][16])** value to check.
17871787
⚠️ returns a _promise_ which is synchronized internally by recorder
17881788
17891789
### seeInPopup

docs/webapi/dontSeeInField.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ I.dontSeeInField({ css: 'form input.email' }, '[email protected]'); // field by CSS
77
```
88

99
@param {CodeceptJS.LocatorOrString} field located by label|name|CSS|XPath|strict locator.
10-
@param {string} value value to check.
10+
@param {CodeceptJS.StringOrSecret} value value to check.
1111
⚠️ returns a _promise_ which is synchronized internally by recorder

docs/webapi/seeInField.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ I.seeInField('form input[type=hidden]','hidden_value');
88
I.seeInField('#searchform input','Search');
99
```
1010
@param {CodeceptJS.LocatorOrString} field located by label|name|CSS|XPath|strict locator.
11-
@param {string} value value to check.
11+
@param {CodeceptJS.StringOrSecret} value value to check.
1212
⚠️ returns a _promise_ which is synchronized internally by recorder

lib/helper/Appium.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1433,8 +1433,9 @@ class Appium extends Webdriver {
14331433
*
14341434
*/
14351435
async dontSeeInField(field, value) {
1436-
if (this.isWeb) return super.dontSeeInField(field, value);
1437-
return super.dontSeeInField(parseLocator.call(this, field), value);
1436+
const _value = (typeof value === 'boolean') ? value : value.toString();
1437+
if (this.isWeb) return super.dontSeeInField(field, _value);
1438+
return super.dontSeeInField(parseLocator.call(this, field), _value);
14381439
}
14391440

14401441
/**
@@ -1565,8 +1566,9 @@ class Appium extends Webdriver {
15651566
*
15661567
*/
15671568
async seeInField(field, value) {
1568-
if (this.isWeb) return super.seeInField(field, value);
1569-
return super.seeInField(parseLocator.call(this, field), value);
1569+
const _value = (typeof value === 'boolean') ? value : value.toString();
1570+
if (this.isWeb) return super.seeInField(field, _value);
1571+
return super.seeInField(parseLocator.call(this, field), _value);
15701572
}
15711573

15721574
/**

0 commit comments

Comments
 (0)