Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/editor/gherkin-spec/annotations.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions packages/editor/gherkin-spec/insert.block.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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 <placement> and selected at the <position>
When the editor is focused
And "foo" is inserted at <placement> and selected at the <position>
And "bar" is typed
Then the text is <text>

Expand Down
4 changes: 2 additions & 2 deletions packages/editor/gherkin-spec/insert.blocks.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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 <placement> and selected at the <selection>
When the editor is focused
And "foo|bar" is inserted at <placement> and selected at the <selection>
And "baz" is typed
Then the text is <text>

Expand Down
2 changes: 1 addition & 1 deletion packages/editor/gherkin-spec/insert.child.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
{
Expand Down
16 changes: 8 additions & 8 deletions packages/editor/gherkin-spec/selection.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 <position>
And "new" is typed
Expand All @@ -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"
Expand All @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion packages/editor/src/test/vitest/step-definitions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}),

Expand Down
8 changes: 3 additions & 5 deletions packages/plugin-emoji-picker/src/emoji-picker.feature
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
Feature: Emoji Picker

Background:
Given the editor is focused

Scenario Outline: Picking a direct hit
When <initial text> is inserted
When <inserted text> is inserted
When the editor is focused
And <initial text> is inserted
And <inserted text> is inserted
Then the text is <final text>

Examples:
Expand Down
3 changes: 1 addition & 2 deletions packages/plugin-input-rule/src/edge-cases.feature
Original file line number Diff line number Diff line change
@@ -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 <text>
Expand Down
3 changes: 0 additions & 3 deletions packages/plugin-input-rule/src/emoji-picker-rules.feature
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
Feature: Emoji Picker Rules

Background:
Given the editor is focused

Scenario: Trigger Rule
Given the text ""
When ":" is typed
Expand Down
4 changes: 0 additions & 4 deletions packages/plugin-input-rule/src/rule.stock-ticker.feature
Original file line number Diff line number Diff line change
@@ -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 <text>
When <inserted text> is inserted
Expand Down
Original file line number Diff line number Diff line change
@@ -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 <text>
Expand Down
4 changes: 0 additions & 4 deletions packages/plugin-typography/src/disallow-in-code.feature
Original file line number Diff line number Diff line change
@@ -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 <text>
And "code" around <decorated>
Expand Down
3 changes: 1 addition & 2 deletions packages/plugin-typography/src/input-rule.ellipsis.feature
Original file line number Diff line number Diff line change
@@ -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 <text>
Expand Down
3 changes: 1 addition & 2 deletions packages/plugin-typography/src/input-rule.em-dash.feature
Original file line number Diff line number Diff line change
@@ -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 <text>
Expand Down
Original file line number Diff line number Diff line change
@@ -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 <text>
When <inserted text> is inserted
Expand Down
Original file line number Diff line number Diff line change
@@ -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 <text>
Expand Down