nxml-mode-expansions.feature (3814B)
1 Feature: nxml-mode expansions 2 In order to quickly and precisely mark xml units 3 As an Emacs user 4 I want to expand to them 5 6 Scenario: Mark xml attribute inside quotes 7 Given I turn on nxml-mode 8 And there is no region selected 9 When I insert "<tag id="myAttr">" 10 And I place the cursor after "my" 11 And I press "C-@" 12 Then the region should be "myAttr" 13 14 Scenario: Mark xml attribute with quotes 15 Given I turn on nxml-mode 16 And there is no region selected 17 When I insert "<tag id="myAttr">" 18 And I place the cursor after "my" 19 And I press "C-@" 20 And I press "C-@" 21 Then the region should be ""myAttr"" 22 23 Scenario: Mark xml attribute with xpath inside quotes 24 Given I turn on nxml-mode 25 And there is no region selected 26 When I insert "<tag id="a/b/c">" 27 And I place the cursor after "a/" 28 And I press "C-@" 29 And I press "C-@" 30 Then the region should be "a/b/c" 31 32 Scenario: Mark xml attribute with xpath inside quotes 33 Given I turn on nxml-mode 34 And there is no region selected 35 When I insert "<tag id="a/b/c">" 36 And I place the cursor after "a/" 37 And I press "C-@" 38 And I press "C-@" 39 And I press "C-@" 40 Then the region should be ""a/b/c"" 41 42 Scenario: Mark xml attribute from start 43 Given I turn on nxml-mode 44 And there is no region selected 45 When I insert "<div id="5">" 46 And I place the cursor between " " and "id" 47 And I press "C-@" 48 And I press "C-@" 49 Then the region should be "id="5"" 50 51 Scenario: Mark xml tags, part 1 52 Given I turn on nxml-mode 53 And there is no region selected 54 When I insert "... <div class='hi'><div>before <span></span></div> after</div> ..." 55 And I place the cursor between "before " and "<span>" 56 And I press "C-@" 57 Then the region should be "<span>" 58 59 Scenario: Mark xml tags, part 2 60 Given I turn on nxml-mode 61 And there is no region selected 62 When I insert "... <div class='hi'><div>before <span></span></div> after</div> ..." 63 And I place the cursor between "before " and "<span>" 64 And I press "C-@" 65 And I press "C-@" 66 Then the region should be "<span></span>" 67 68 Scenario: Mark xml tags, part 3 69 Given I turn on nxml-mode 70 And there is no region selected 71 When I insert "... <div class='hi'><div>before <span></span></div> after</div> ..." 72 And I place the cursor between "before " and "<span>" 73 And I press "C-@" 74 And I press "C-@" 75 And I press "C-@" 76 Then the region should be "before <span></span>" 77 78 Scenario: Mark xml tags, part 4 79 Given I turn on nxml-mode 80 And there is no region selected 81 When I insert "... <div class='hi'><div>before <span></span></div> after</div> ..." 82 And I place the cursor between "before " and "<span>" 83 And I press "C-@" 84 And I press "C-@" 85 And I press "C-@" 86 And I press "C-@" 87 Then the region should be "<div>before <span></span></div>" 88 89 Scenario: Mark xml tags, part 5 90 Given I turn on nxml-mode 91 And there is no region selected 92 When I insert "... <div class='hi'><div>before <span></span></div> after</div> ..." 93 And I place the cursor between "before " and "<span>" 94 And I press "C-@" 95 And I press "C-@" 96 And I press "C-@" 97 And I press "C-@" 98 And I press "C-@" 99 Then the region should be "<div>before <span></span></div> after" 100 101 Scenario: Mark xml tags, part 6 102 Given I turn on nxml-mode 103 And there is no region selected 104 When I insert "... <div class='hi'><div>before <span></span></div> after</div> ..." 105 And I place the cursor between "before " and "<span>" 106 And I press "C-@" 107 And I press "C-@" 108 And I press "C-@" 109 And I press "C-@" 110 And I press "C-@" 111 And I press "C-@" 112 Then the region should be "<div class='hi'><div>before <span></span></div> after</div>"