Feature: html-mode expansions
In order to quickly and precisely mark html units
As an Emacs user
I want to expand to them
Scenario: Mark html attribute from start
Given I turn on html-mode
And there is no region selected
When I insert "
"
And I place the cursor between " " and "id"
And I press "C-@"
And I press "C-@"
And I press "C-@"
Then the region should be "id="5""
Scenario: Mark html attribute from end
Given I turn on html-mode
And there is no region selected
When I insert "
"
And I go to point "12"
And I press "C-@"
And I press "C-@"
Then the region should be "id="5""
Scenario: Mark html tags, part 1
Given I turn on html-mode
And there is no region selected
When I insert "...
..."
And I place the cursor between "before " and "
"
And I press "C-@"
Then the region should be ""
Scenario: Mark html tags, part 2
Given I turn on html-mode
And there is no region selected
When I insert "... ..."
And I place the cursor between "before " and ""
And I press "C-@"
And I press "C-@"
Then the region should be ""
Scenario: Mark html tags, part 3
Given I turn on html-mode
And there is no region selected
When I insert "... ..."
And I place the cursor between "before " and ""
And I press "C-@"
And I press "C-@"
And I press "C-@"
Then the region should be "before "
Scenario: Mark html tags, part 4
Given I turn on html-mode
And there is no region selected
When I insert "... ..."
And I place the cursor between "before " and ""
And I press "C-@"
And I press "C-@"
And I press "C-@"
And I press "C-@"
Then the region should be "before
"
Scenario: Mark html tags, part 5
Given I turn on html-mode
And there is no region selected
When I insert "... ..."
And I place the cursor between "before " and ""
And I press "C-@"
And I press "C-@"
And I press "C-@"
And I press "C-@"
And I press "C-@"
Then the region should be "before
after"
Scenario: Mark html tags, part 6
Given I turn on html-mode
And there is no region selected
When I insert "... ..."
And I place the cursor between "before " and ""
And I press "C-@"
And I press "C-@"
And I press "C-@"
And I press "C-@"
And I press "C-@"
And I press "C-@"
Then the region should be ""
Scenario: Text mode expansions shouldn't be here
Given I turn on html-mode
And there is no region selected
When I insert "Sentence the first. Sentence the second"
And I place the cursor between "first. " and "Sentence"
And I press "C-@"
And I press "C-@"
Then the region should be "Sentence the first. Sentence the second"