Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 82e2f5a097
Fetching contributors…

Cannot retrieve contributors at this time

file 86 lines (78 sloc) 2.989 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86
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 "<div id="5">"
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 "<div id="5">"
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 "... <div class='hi'><div>before <span></span></div> after</div> ..."
And I place the cursor between "before " and "<span>"
And I press "C-@"
Then the region should be "<span>"

Scenario: Mark html tags, part 2
Given I turn on html-mode
And there is no region selected
When I insert "... <div class='hi'><div>before <span></span></div> after</div> ..."
And I place the cursor between "before " and "<span>"
And I press "C-@"
And I press "C-@"
Then the region should be "<span></span>"

Scenario: Mark html tags, part 3
Given I turn on html-mode
And there is no region selected
When I insert "... <div class='hi'><div>before <span></span></div> after</div> ..."
And I place the cursor between "before " and "<span>"
And I press "C-@"
And I press "C-@"
And I press "C-@"
Then the region should be "before <span></span>"

Scenario: Mark html tags, part 4
Given I turn on html-mode
And there is no region selected
When I insert "... <div class='hi'><div>before <span></span></div> after</div> ..."
And I place the cursor between "before " and "<span>"
And I press "C-@"
And I press "C-@"
And I press "C-@"
And I press "C-@"
Then the region should be "<div>before <span></span></div>"

Scenario: Mark html tags, part 5
Given I turn on html-mode
And there is no region selected
When I insert "... <div class='hi'><div>before <span></span></div> after</div> ..."
And I place the cursor between "before " and "<span>"
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 "<div>before <span></span></div> after"

Scenario: Mark html tags, part 6
Given I turn on html-mode
And there is no region selected
When I insert "... <div class='hi'><div>before <span></span></div> after</div> ..."
And I place the cursor between "before " and "<span>"
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 "<div class='hi'><div>before <span></span></div> after</div>"
Something went wrong with that request. Please try again.