From ec99354c6d86a3145e2c52ab4025fa3ce5d26ff7 Mon Sep 17 00:00:00 2001 From: Jennifer Shehane Date: Wed, 3 Sep 2025 08:57:19 -0400 Subject: [PATCH 1/3] docs: add a new label to press api --- docs/api/commands/press.mdx | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/api/commands/press.mdx b/docs/api/commands/press.mdx index 03e2db8901..625078a50a 100644 --- a/docs/api/commands/press.mdx +++ b/docs/api/commands/press.mdx @@ -4,6 +4,7 @@ description: Trigger native key events in your application to simulate keyboard sidebar_label: press slug: /api/commands/press componentSpecific: false +new_label: true --- From b4e39ed04e56f5186ac924749c0e97691e7c22e4 Mon Sep 17 00:00:00 2001 From: Jennifer Shehane Date: Wed, 3 Sep 2025 09:12:22 -0400 Subject: [PATCH 2/3] pass new label in correctly --- docs/api/commands/press.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/api/commands/press.mdx b/docs/api/commands/press.mdx index 625078a50a..0ed3cb57e4 100644 --- a/docs/api/commands/press.mdx +++ b/docs/api/commands/press.mdx @@ -4,7 +4,7 @@ description: Trigger native key events in your application to simulate keyboard sidebar_label: press slug: /api/commands/press componentSpecific: false -new_label: true +sidebar_custom_props: { 'new_label': true } --- From 5327ea0b7cf9b9904ea39662bd7798430577602c Mon Sep 17 00:00:00 2001 From: Jennifer Shehane Date: Wed, 3 Sep 2025 09:14:39 -0400 Subject: [PATCH 3/3] remove 'press' event in doc --- docs/api/commands/press.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/api/commands/press.mdx b/docs/api/commands/press.mdx index 0ed3cb57e4..a9c1dbb268 100644 --- a/docs/api/commands/press.mdx +++ b/docs/api/commands/press.mdx @@ -13,7 +13,7 @@ sidebar_custom_props: { 'new_label': true } Trigger native key events in your application to simulate keyboard interactions. -A `keydown`, `press`, and `keyup` event will be dispatched directly to the browser window. +A `keydown` and `keyup` event will be dispatched directly to the browser window. Unlike `cy.type()`, which is best for typing multiple character keys, `cy.press()` will dispatch real keyboard events rather than simulated ones. This command is especially useful when testing focus management and keyboard navigation patterns which are critical for [accessibility testing](/app/guides/accessibility-testing) and great keyboard UX.