diff --git a/packages/editor/gherkin-spec/annotations.feature b/packages/editor/gherkin-spec/annotations.feature index 563b43219..09001d932 100644 --- a/packages/editor/gherkin-spec/annotations.feature +++ b/packages/editor/gherkin-spec/annotations.feature @@ -163,8 +163,8 @@ Feature: Annotations Then the text is "foo,n,bar" Scenario: Inserting text after inline object, before annotation - Given the editor is focused - When a "stock-ticker" is inserted + When the editor is focused + And a "stock-ticker" is inserted And "{ArrowRight}" is pressed And "bar" is typed And "bar" is selected diff --git a/packages/editor/gherkin-spec/insert.block.feature b/packages/editor/gherkin-spec/insert.block.feature index cda96d880..e70f78e50 100644 --- a/packages/editor/gherkin-spec/insert.block.feature +++ b/packages/editor/gherkin-spec/insert.block.feature @@ -161,8 +161,8 @@ Feature: Insert Block | "auto" | "none" | "barfoo" | Scenario Outline: Inserting and selecting text block on an empty selected editor - Given the editor is focused - When "foo" is inserted at and selected at the + When the editor is focused + And "foo" is inserted at and selected at the And "bar" is typed Then the text is diff --git a/packages/editor/gherkin-spec/insert.blocks.feature b/packages/editor/gherkin-spec/insert.blocks.feature index c40052781..5b2c40412 100644 --- a/packages/editor/gherkin-spec/insert.blocks.feature +++ b/packages/editor/gherkin-spec/insert.blocks.feature @@ -4,8 +4,8 @@ Feature: Insert Blocks Given one editor Scenario Outline: Inserting blocks on an empty editor - Given the editor is focused - When "foo|bar" is inserted at and selected at the + When the editor is focused + And "foo|bar" is inserted at and selected at the And "baz" is typed Then the text is diff --git a/packages/editor/gherkin-spec/insert.child.feature b/packages/editor/gherkin-spec/insert.child.feature index 6f155b156..99eb49679 100644 --- a/packages/editor/gherkin-spec/insert.child.feature +++ b/packages/editor/gherkin-spec/insert.child.feature @@ -34,7 +34,7 @@ Feature: Insert Child Scenario: Inserting span on block object Given the text "{image}" - And the editor is focused + When the editor is focused When a child is inserted ``` { diff --git a/packages/editor/gherkin-spec/selection.feature b/packages/editor/gherkin-spec/selection.feature index 1125f1774..8dc364cf7 100644 --- a/packages/editor/gherkin-spec/selection.feature +++ b/packages/editor/gherkin-spec/selection.feature @@ -5,8 +5,8 @@ Feature: Selection Scenario: Expanding collapsed selection backwards from empty line Given the text "foo|" - And the editor is focused - When the caret is put before "" + When the editor is focused + And the caret is put before "" And "{Shift>}{ArrowLeft}{/Shift}" is pressed And "{Shift>}{ArrowLeft}{/Shift}" is pressed Then "o|" is selected @@ -15,8 +15,8 @@ Feature: Selection @skip Scenario: Expanding selection backwards, then forwards Given the text "foo|bar" - And the editor is focused - When the caret is put before "bar" + When the editor is focused + And the caret is put before "bar" And "{Shift>}{ArrowLeft}{/Shift}" is pressed And "{Shift>}{ArrowLeft}{/Shift}" is pressed Then "o|" is selected @@ -27,8 +27,8 @@ Feature: Selection Scenario: Reducing hanging selection Given the text "foo|bar" - And the editor is focused - When the caret is put before "foo" + When the editor is focused + And the caret is put before "foo" And "{Shift>}{ArrowRight}{/Shift}" is pressed And "{Shift>}{ArrowRight}{/Shift}" is pressed And "{Shift>}{ArrowRight}{/Shift}" is pressed @@ -39,8 +39,8 @@ Feature: Selection Scenario: Reducing selection hanging onto empty line Given the text "foo|" - And the editor is focused - When the caret is put before "foo" + When the editor is focused + And the caret is put before "foo" And "{Shift>}{ArrowRight}{/Shift}" is pressed And "{Shift>}{ArrowRight}{/Shift}" is pressed And "{Shift>}{ArrowRight}{/Shift}" is pressed diff --git a/packages/editor/gherkin-tests-v2/plugin.comment-annotations.feature b/packages/editor/gherkin-tests-v2/plugin.comment-annotations.feature index b254bc917..b159e9167 100644 --- a/packages/editor/gherkin-tests-v2/plugin.comment-annotations.feature +++ b/packages/editor/gherkin-tests-v2/plugin.comment-annotations.feature @@ -26,8 +26,8 @@ Feature: Comment Annotations Plugin Scenario Outline: Writing after bold text with comment Given the text "foo bar baz" - And the editor is focused - And "strong" around "bar" + When the editor is focused + Given "strong" around "bar" And a "comment" "c1" around "bar" When the caret is put And "new" is typed @@ -42,8 +42,8 @@ Feature: Comment Annotations Plugin Scenario: Writing after bold text with comment and link Given the text "foo bar baz" - And the editor is focused - And "strong" around "bar" + When the editor is focused + Given "strong" around "bar" And a "comment" "c1" around "bar" And a "link" "l1" around "bar" When the caret is put after "bar" @@ -54,8 +54,8 @@ Feature: Comment Annotations Plugin Scenario: Writing in link after bold text with comment Given the text "foo bar baz" - And the editor is focused - And "strong" around "bar" + When the editor is focused + Given "strong" around "bar" And a "comment" "c1" around "bar" And a "link" "l1" around "foo bar baz" When the caret is put after "bar" diff --git a/packages/editor/src/test/vitest/step-definitions.tsx b/packages/editor/src/test/vitest/step-definitions.tsx index 13eeb9c30..8c87ebced 100644 --- a/packages/editor/src/test/vitest/step-definitions.tsx +++ b/packages/editor/src/test/vitest/step-definitions.tsx @@ -71,7 +71,7 @@ export const stepDefinitions = [ context.keyMap = new Map() }), - Given('the editor is focused', async (context: Context) => { + When('the editor is focused', async (context: Context) => { await userEvent.click(context.locator) }), diff --git a/packages/plugin-emoji-picker/src/emoji-picker.feature b/packages/plugin-emoji-picker/src/emoji-picker.feature index 56e851ff2..ab7c724d2 100644 --- a/packages/plugin-emoji-picker/src/emoji-picker.feature +++ b/packages/plugin-emoji-picker/src/emoji-picker.feature @@ -1,11 +1,9 @@ Feature: Emoji Picker - Background: - Given the editor is focused - Scenario Outline: Picking a direct hit - When is inserted - When is inserted + When the editor is focused + And is inserted + And is inserted Then the text is Examples: diff --git a/packages/plugin-input-rule/src/edge-cases.feature b/packages/plugin-input-rule/src/edge-cases.feature index 12bceb9ac..e60313df2 100644 --- a/packages/plugin-input-rule/src/edge-cases.feature +++ b/packages/plugin-input-rule/src/edge-cases.feature @@ -1,8 +1,7 @@ Feature: Edge Cases Background: - Given the editor is focused - And a global keymap + Given a global keymap Scenario Outline: Longer Transform Given the text diff --git a/packages/plugin-input-rule/src/emoji-picker-rules.feature b/packages/plugin-input-rule/src/emoji-picker-rules.feature index 3364cd434..b9cdebf83 100644 --- a/packages/plugin-input-rule/src/emoji-picker-rules.feature +++ b/packages/plugin-input-rule/src/emoji-picker-rules.feature @@ -1,8 +1,5 @@ Feature: Emoji Picker Rules - Background: - Given the editor is focused - Scenario: Trigger Rule Given the text "" When ":" is typed diff --git a/packages/plugin-input-rule/src/rule.stock-ticker.feature b/packages/plugin-input-rule/src/rule.stock-ticker.feature index f5043f75b..af2899730 100644 --- a/packages/plugin-input-rule/src/rule.stock-ticker.feature +++ b/packages/plugin-input-rule/src/rule.stock-ticker.feature @@ -1,9 +1,5 @@ Feature: Stock Ticker Rule - Background: - Given the editor is focused - And a global keymap - Scenario Outline: Transforms plain text into stock ticker Given the text When is inserted diff --git a/packages/plugin-markdown-shortcuts/src/rule.markdown-link.feature b/packages/plugin-markdown-shortcuts/src/rule.markdown-link.feature index c1bafbfb1..f1e831e6c 100644 --- a/packages/plugin-markdown-shortcuts/src/rule.markdown-link.feature +++ b/packages/plugin-markdown-shortcuts/src/rule.markdown-link.feature @@ -1,8 +1,7 @@ Feature: Markdown Link Rule Background: - Given the editor is focused - And a global keymap + Given a global keymap Scenario Outline: Transform markdown Link into annotation Given the text diff --git a/packages/plugin-typography/src/disallow-in-code.feature b/packages/plugin-typography/src/disallow-in-code.feature index e974ac38a..99e54a766 100644 --- a/packages/plugin-typography/src/disallow-in-code.feature +++ b/packages/plugin-typography/src/disallow-in-code.feature @@ -1,9 +1,5 @@ Feature: Disallow in code - Background: - Given the editor is focused - And a global keymap - Scenario Outline: Decorated text Given the text And "code" around diff --git a/packages/plugin-typography/src/input-rule.ellipsis.feature b/packages/plugin-typography/src/input-rule.ellipsis.feature index fc8fb6f63..a7774c0b0 100644 --- a/packages/plugin-typography/src/input-rule.ellipsis.feature +++ b/packages/plugin-typography/src/input-rule.ellipsis.feature @@ -1,8 +1,7 @@ Feature: Ellipsis Input Rule Background: - Given the editor is focused - And a global keymap + Given a global keymap Scenario Outline: Inserting ellipsis in unformatted text Given the text diff --git a/packages/plugin-typography/src/input-rule.em-dash.feature b/packages/plugin-typography/src/input-rule.em-dash.feature index 08c3d9efe..6c062f925 100644 --- a/packages/plugin-typography/src/input-rule.em-dash.feature +++ b/packages/plugin-typography/src/input-rule.em-dash.feature @@ -1,8 +1,7 @@ Feature: Em Dash Input Rule Background: - Given the editor is focused - And a global keymap + Given a global keymap Scenario Outline: Inserting em dash in unformatted text Given the text diff --git a/packages/plugin-typography/src/input-rule.multiplication.feature b/packages/plugin-typography/src/input-rule.multiplication.feature index c5fd60fd7..d43143451 100644 --- a/packages/plugin-typography/src/input-rule.multiplication.feature +++ b/packages/plugin-typography/src/input-rule.multiplication.feature @@ -1,9 +1,5 @@ Feature: Multiplication Input Rule - Background: - Given the editor is focused - And a global keymap - Scenario Outline: Inserting multiplication sign Given the text When is inserted diff --git a/packages/plugin-typography/src/input-rule.smart-quotes.feature b/packages/plugin-typography/src/input-rule.smart-quotes.feature index 4e7e0effe..d61c31960 100644 --- a/packages/plugin-typography/src/input-rule.smart-quotes.feature +++ b/packages/plugin-typography/src/input-rule.smart-quotes.feature @@ -1,8 +1,7 @@ Feature: Smart Quotes Input Rule Background: - Given the editor is focused - And a global keymap + Given a global keymap Scenario Outline: Typing turns double quotes into smart quotes Given the text