From b8db282abf2fc1ee0a92d2aab7f74d0c80a869ed Mon Sep 17 00:00:00 2001 From: Ben Kucera <14625260+Bkucera@users.noreply.github.com> Date: Tue, 23 Jul 2019 15:57:11 -0400 Subject: [PATCH 1/3] =?UTF-8?q?Revert=20"Added=20documentation=20for=20dis?= =?UTF-8?q?ableSpecialCharSequences=20option=20for=E2=80=A6=20(#1885)"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 298df856824e967a87acae3070e02163725701f2. --- source/api/commands/type.md | 1 - source/ja/api/commands/type.md | 1 - source/zh-cn/api/commands/type.md | 1 - 3 files changed, 3 deletions(-) diff --git a/source/api/commands/type.md b/source/api/commands/type.md index a001771872..044fad3f17 100644 --- a/source/api/commands/type.md +++ b/source/api/commands/type.md @@ -71,7 +71,6 @@ Option | Default | Description `delay` | `10` | Delay after each keypress `force` | `false` | {% usage_options force type %} `release` | `true` | Keep a modifier activated between commands -`disableSpecialCharSequences` | `false` | Disable typing special characters for strings surrounded by `{}`, such as `{esc}`, and type the literal characters instead `timeout` | {% url `defaultCommandTimeout` configuration#Timeouts %} | {% usage_options timeout .type %} ## Yields {% helper_icon yields %} diff --git a/source/ja/api/commands/type.md b/source/ja/api/commands/type.md index a001771872..044fad3f17 100644 --- a/source/ja/api/commands/type.md +++ b/source/ja/api/commands/type.md @@ -71,7 +71,6 @@ Option | Default | Description `delay` | `10` | Delay after each keypress `force` | `false` | {% usage_options force type %} `release` | `true` | Keep a modifier activated between commands -`disableSpecialCharSequences` | `false` | Disable typing special characters for strings surrounded by `{}`, such as `{esc}`, and type the literal characters instead `timeout` | {% url `defaultCommandTimeout` configuration#Timeouts %} | {% usage_options timeout .type %} ## Yields {% helper_icon yields %} diff --git a/source/zh-cn/api/commands/type.md b/source/zh-cn/api/commands/type.md index a001771872..044fad3f17 100644 --- a/source/zh-cn/api/commands/type.md +++ b/source/zh-cn/api/commands/type.md @@ -71,7 +71,6 @@ Option | Default | Description `delay` | `10` | Delay after each keypress `force` | `false` | {% usage_options force type %} `release` | `true` | Keep a modifier activated between commands -`disableSpecialCharSequences` | `false` | Disable typing special characters for strings surrounded by `{}`, such as `{esc}`, and type the literal characters instead `timeout` | {% url `defaultCommandTimeout` configuration#Timeouts %} | {% usage_options timeout .type %} ## Yields {% helper_icon yields %} From d23502748e586be9b9edb1fa6dc9835f4f31562b Mon Sep 17 00:00:00 2001 From: Ben Kucera <14625260+Bkucera@users.noreply.github.com> Date: Tue, 23 Jul 2019 16:02:37 -0400 Subject: [PATCH 2/3] rename disableSpecialCharSequences --- source/api/commands/type.md | 1 + source/ja/api/commands/type.md | 1 + source/zh-cn/api/commands/type.md | 1 + 3 files changed, 3 insertions(+) diff --git a/source/api/commands/type.md b/source/api/commands/type.md index 044fad3f17..f4b77f0406 100644 --- a/source/api/commands/type.md +++ b/source/api/commands/type.md @@ -71,6 +71,7 @@ Option | Default | Description `delay` | `10` | Delay after each keypress `force` | `false` | {% usage_options force type %} `release` | `true` | Keep a modifier activated between commands +`parseSpecialCharSequences` | `false` | Disable typing special characters for strings surrounded by `{}`, such as `{esc}`, and type the literal characters instead `timeout` | {% url `defaultCommandTimeout` configuration#Timeouts %} | {% usage_options timeout .type %} ## Yields {% helper_icon yields %} diff --git a/source/ja/api/commands/type.md b/source/ja/api/commands/type.md index 044fad3f17..f4b77f0406 100644 --- a/source/ja/api/commands/type.md +++ b/source/ja/api/commands/type.md @@ -71,6 +71,7 @@ Option | Default | Description `delay` | `10` | Delay after each keypress `force` | `false` | {% usage_options force type %} `release` | `true` | Keep a modifier activated between commands +`parseSpecialCharSequences` | `false` | Disable typing special characters for strings surrounded by `{}`, such as `{esc}`, and type the literal characters instead `timeout` | {% url `defaultCommandTimeout` configuration#Timeouts %} | {% usage_options timeout .type %} ## Yields {% helper_icon yields %} diff --git a/source/zh-cn/api/commands/type.md b/source/zh-cn/api/commands/type.md index 044fad3f17..f4b77f0406 100644 --- a/source/zh-cn/api/commands/type.md +++ b/source/zh-cn/api/commands/type.md @@ -71,6 +71,7 @@ Option | Default | Description `delay` | `10` | Delay after each keypress `force` | `false` | {% usage_options force type %} `release` | `true` | Keep a modifier activated between commands +`parseSpecialCharSequences` | `false` | Disable typing special characters for strings surrounded by `{}`, such as `{esc}`, and type the literal characters instead `timeout` | {% url `defaultCommandTimeout` configuration#Timeouts %} | {% usage_options timeout .type %} ## Yields {% helper_icon yields %} From 56698e388467d03bdcc8c77f39cf134db43cadc0 Mon Sep 17 00:00:00 2001 From: Jennifer Shehane Date: Wed, 24 Jul 2019 10:23:12 +0630 Subject: [PATCH 3/3] 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. --- source/api/commands/type.md | 12 ++++++++++-- source/ja/api/commands/type.md | 12 ++++++++++-- source/zh-cn/api/commands/type.md | 12 ++++++++++-- 3 files changed, 30 insertions(+), 6 deletions(-) diff --git a/source/api/commands/type.md b/source/api/commands/type.md index f4b77f0406..0245e66645 100644 --- a/source/api/commands/type.md +++ b/source/api/commands/type.md @@ -32,7 +32,11 @@ cy.url().type('www.cypress.io') // Errors, 'url' does not yield DOM element The text to be typed into the DOM element. -Text passed to `.type()` may include any of these special character sequences: +Text passed to `.type()` may include any of the special character sequences below. + +{% note info %} +To disable parsing special characters sequences, set the `parseSpecialCharSequences` option to `false`. +{% endnote %} Sequence | Notes --- | --- @@ -70,8 +74,8 @@ Option | Default | Description `log` | `true` | {% usage_options log %} `delay` | `10` | Delay after each keypress `force` | `false` | {% usage_options force type %} +`parseSpecialCharSequences` | `true` | Parse special characters for strings surrounded by `{}`, such as `{esc}`. Set to `false` to type the literal characters instead `release` | `true` | Keep a modifier activated between commands -`parseSpecialCharSequences` | `false` | Disable typing special characters for strings surrounded by `{}`, such as `{esc}`, and type the literal characters instead `timeout` | {% url `defaultCommandTimeout` configuration#Timeouts %} | {% usage_options timeout .type %} ## Yields {% helper_icon yields %} @@ -166,6 +170,10 @@ Special characters (`{leftarrow}`, `{selectall}`, etc.) are not permitted. 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. +{% note info %} +To disable parsing special characters sequences, set the `parseSpecialCharSequences` option to `false`. +{% endnote %} + ### Type a key combination ```javascript diff --git a/source/ja/api/commands/type.md b/source/ja/api/commands/type.md index f4b77f0406..0245e66645 100644 --- a/source/ja/api/commands/type.md +++ b/source/ja/api/commands/type.md @@ -32,7 +32,11 @@ cy.url().type('www.cypress.io') // Errors, 'url' does not yield DOM element The text to be typed into the DOM element. -Text passed to `.type()` may include any of these special character sequences: +Text passed to `.type()` may include any of the special character sequences below. + +{% note info %} +To disable parsing special characters sequences, set the `parseSpecialCharSequences` option to `false`. +{% endnote %} Sequence | Notes --- | --- @@ -70,8 +74,8 @@ Option | Default | Description `log` | `true` | {% usage_options log %} `delay` | `10` | Delay after each keypress `force` | `false` | {% usage_options force type %} +`parseSpecialCharSequences` | `true` | Parse special characters for strings surrounded by `{}`, such as `{esc}`. Set to `false` to type the literal characters instead `release` | `true` | Keep a modifier activated between commands -`parseSpecialCharSequences` | `false` | Disable typing special characters for strings surrounded by `{}`, such as `{esc}`, and type the literal characters instead `timeout` | {% url `defaultCommandTimeout` configuration#Timeouts %} | {% usage_options timeout .type %} ## Yields {% helper_icon yields %} @@ -166,6 +170,10 @@ Special characters (`{leftarrow}`, `{selectall}`, etc.) are not permitted. 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. +{% note info %} +To disable parsing special characters sequences, set the `parseSpecialCharSequences` option to `false`. +{% endnote %} + ### Type a key combination ```javascript diff --git a/source/zh-cn/api/commands/type.md b/source/zh-cn/api/commands/type.md index f4b77f0406..0245e66645 100644 --- a/source/zh-cn/api/commands/type.md +++ b/source/zh-cn/api/commands/type.md @@ -32,7 +32,11 @@ cy.url().type('www.cypress.io') // Errors, 'url' does not yield DOM element The text to be typed into the DOM element. -Text passed to `.type()` may include any of these special character sequences: +Text passed to `.type()` may include any of the special character sequences below. + +{% note info %} +To disable parsing special characters sequences, set the `parseSpecialCharSequences` option to `false`. +{% endnote %} Sequence | Notes --- | --- @@ -70,8 +74,8 @@ Option | Default | Description `log` | `true` | {% usage_options log %} `delay` | `10` | Delay after each keypress `force` | `false` | {% usage_options force type %} +`parseSpecialCharSequences` | `true` | Parse special characters for strings surrounded by `{}`, such as `{esc}`. Set to `false` to type the literal characters instead `release` | `true` | Keep a modifier activated between commands -`parseSpecialCharSequences` | `false` | Disable typing special characters for strings surrounded by `{}`, such as `{esc}`, and type the literal characters instead `timeout` | {% url `defaultCommandTimeout` configuration#Timeouts %} | {% usage_options timeout .type %} ## Yields {% helper_icon yields %} @@ -166,6 +170,10 @@ Special characters (`{leftarrow}`, `{selectall}`, etc.) are not permitted. 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. +{% note info %} +To disable parsing special characters sequences, set the `parseSpecialCharSequences` option to `false`. +{% endnote %} + ### Type a key combination ```javascript