/
nxml-mode-expansions.feature
69 lines (61 loc) · 2.68 KB
/
nxml-mode-expansions.feature
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
Feature: nxml-mode expansions
In order to quickly and precisely mark xml units
As an Emacs user
I want to expand to them
Scenario: Mark xml attribute from start
Given I turn on nxml-mode
And there is no region selected
When I insert "<div id="5">"
And I place the cursor between " " and "id"
And I expand the region 2 times
Then the region should be "id="5""
Scenario: Mark xml attribute from end
Given I turn on nxml-mode
And there is no region selected
When I insert "<div id="5" bob="er">"
And I go to point "12"
# And I place the cursor between "'" and ">"
And I expand the region 2 times
Then the region should be "id="5""
Scenario: Mark xml tags, part 1
Given I turn on nxml-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 expand the region
Then the region should be "<span>"
Scenario: Mark xml tags, part 2
Given I turn on nxml-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 expand the region 2 times
Then the region should be "<span></span>"
Scenario: Mark xml tags, part 3
Given I turn on nxml-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 expand the region 3 times
Then the region should be "before <span></span>"
Scenario: Mark xml tags, part 4
Given I turn on nxml-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 expand the region 4 times
Then the region should be "<div>before <span></span></div>"
Scenario: Mark xml tags, part 5
Given I turn on nxml-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 expand the region 5 times
Then the region should be "<div>before <span></span></div> after"
Scenario: Mark xml tags, part 6
Given I turn on nxml-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 expand the region 6 times
Then the region should be "<div class='hi'><div>before <span></span></div> after</div>"