Skip to content

Commit fa5f34b

Browse files
kucebbrian-mann
authored andcommitted
rename disableSpecialChars opions (#1903)
* Revert "Added documentation for disableSpecialCharSequences option for… (#1885)" This reverts commit 298df85. * rename disableSpecialCharSequences * fix description of 'parseSpecial...' - was opposite meaning, still mentioned disable - Add notes about how to disable special char sequences in more places in type doc.
1 parent 298df85 commit fa5f34b

File tree

3 files changed

+30
-6
lines changed

3 files changed

+30
-6
lines changed

source/api/commands/type.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,11 @@ cy.url().type('www.cypress.io') // Errors, 'url' does not yield DOM element
3232

3333
The text to be typed into the DOM element.
3434

35-
Text passed to `.type()` may include any of these special character sequences:
35+
Text passed to `.type()` may include any of the special character sequences below.
36+
37+
{% note info %}
38+
To disable parsing special characters sequences, set the `parseSpecialCharSequences` option to `false`.
39+
{% endnote %}
3640

3741
Sequence | Notes
3842
--- | ---
@@ -70,8 +74,8 @@ Option | Default | Description
7074
`log` | `true` | {% usage_options log %}
7175
`delay` | `10` | Delay after each keypress
7276
`force` | `false` | {% usage_options force type %}
77+
`parseSpecialCharSequences` | `true` | Parse special characters for strings surrounded by `{}`, such as `{esc}`. Set to `false` to type the literal characters instead
7378
`release` | `true` | Keep a modifier activated between commands
74-
`disableSpecialCharSequences` | `false` | Disable typing special characters for strings surrounded by `{}`, such as `{esc}`, and type the literal characters instead
7579
`timeout` | {% url `defaultCommandTimeout` configuration#Timeouts %} | {% usage_options timeout .type %}
7680

7781
## Yields {% helper_icon yields %}
@@ -166,6 +170,10 @@ Special characters (`{leftarrow}`, `{selectall}`, etc.) are not permitted.
166170

167171
When using special character sequences, it's possible to activate modifier keys and type key combinations, such as `CTRL + R` or `SHIFT + ALT + Q`. The modifier(s) remain activated for the duration of the `.type()` command, and are released when all subsequent characters are typed, unless {% url '`{release: false}`' type#Options %} is passed as an {% url 'option' type#Key-Combinations %}. A `keydown` event is fired when a modifier is activated and a `keyup` event is fired when it is released.
168172

173+
{% note info %}
174+
To disable parsing special characters sequences, set the `parseSpecialCharSequences` option to `false`.
175+
{% endnote %}
176+
169177
### Type a key combination
170178

171179
```javascript

source/ja/api/commands/type.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,11 @@ cy.url().type('www.cypress.io') // Errors, 'url' does not yield DOM element
3232

3333
The text to be typed into the DOM element.
3434

35-
Text passed to `.type()` may include any of these special character sequences:
35+
Text passed to `.type()` may include any of the special character sequences below.
36+
37+
{% note info %}
38+
To disable parsing special characters sequences, set the `parseSpecialCharSequences` option to `false`.
39+
{% endnote %}
3640

3741
Sequence | Notes
3842
--- | ---
@@ -70,8 +74,8 @@ Option | Default | Description
7074
`log` | `true` | {% usage_options log %}
7175
`delay` | `10` | Delay after each keypress
7276
`force` | `false` | {% usage_options force type %}
77+
`parseSpecialCharSequences` | `true` | Parse special characters for strings surrounded by `{}`, such as `{esc}`. Set to `false` to type the literal characters instead
7378
`release` | `true` | Keep a modifier activated between commands
74-
`disableSpecialCharSequences` | `false` | Disable typing special characters for strings surrounded by `{}`, such as `{esc}`, and type the literal characters instead
7579
`timeout` | {% url `defaultCommandTimeout` configuration#Timeouts %} | {% usage_options timeout .type %}
7680

7781
## Yields {% helper_icon yields %}
@@ -166,6 +170,10 @@ Special characters (`{leftarrow}`, `{selectall}`, etc.) are not permitted.
166170

167171
When using special character sequences, it's possible to activate modifier keys and type key combinations, such as `CTRL + R` or `SHIFT + ALT + Q`. The modifier(s) remain activated for the duration of the `.type()` command, and are released when all subsequent characters are typed, unless {% url '`{release: false}`' type#Options %} is passed as an {% url 'option' type#Key-Combinations %}. A `keydown` event is fired when a modifier is activated and a `keyup` event is fired when it is released.
168172

173+
{% note info %}
174+
To disable parsing special characters sequences, set the `parseSpecialCharSequences` option to `false`.
175+
{% endnote %}
176+
169177
### Type a key combination
170178

171179
```javascript

source/zh-cn/api/commands/type.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,11 @@ cy.url().type('www.cypress.io') // Errors, 'url' does not yield DOM element
3232

3333
The text to be typed into the DOM element.
3434

35-
Text passed to `.type()` may include any of these special character sequences:
35+
Text passed to `.type()` may include any of the special character sequences below.
36+
37+
{% note info %}
38+
To disable parsing special characters sequences, set the `parseSpecialCharSequences` option to `false`.
39+
{% endnote %}
3640

3741
Sequence | Notes
3842
--- | ---
@@ -70,8 +74,8 @@ Option | Default | Description
7074
`log` | `true` | {% usage_options log %}
7175
`delay` | `10` | Delay after each keypress
7276
`force` | `false` | {% usage_options force type %}
77+
`parseSpecialCharSequences` | `true` | Parse special characters for strings surrounded by `{}`, such as `{esc}`. Set to `false` to type the literal characters instead
7378
`release` | `true` | Keep a modifier activated between commands
74-
`disableSpecialCharSequences` | `false` | Disable typing special characters for strings surrounded by `{}`, such as `{esc}`, and type the literal characters instead
7579
`timeout` | {% url `defaultCommandTimeout` configuration#Timeouts %} | {% usage_options timeout .type %}
7680

7781
## Yields {% helper_icon yields %}
@@ -166,6 +170,10 @@ Special characters (`{leftarrow}`, `{selectall}`, etc.) are not permitted.
166170

167171
When using special character sequences, it's possible to activate modifier keys and type key combinations, such as `CTRL + R` or `SHIFT + ALT + Q`. The modifier(s) remain activated for the duration of the `.type()` command, and are released when all subsequent characters are typed, unless {% url '`{release: false}`' type#Options %} is passed as an {% url 'option' type#Key-Combinations %}. A `keydown` event is fired when a modifier is activated and a `keyup` event is fired when it is released.
168172

173+
{% note info %}
174+
To disable parsing special characters sequences, set the `parseSpecialCharSequences` option to `false`.
175+
{% endnote %}
176+
169177
### Type a key combination
170178

171179
```javascript

0 commit comments

Comments
 (0)