dotemacs

My Emacs configuration
git clone git://git.entf.net/dotemacs
Log | Files | Refs | LICENSE

html-mode-expansions.feature (3346B)


      1 Feature: html-mode expansions
      2   In order to quickly and precisely mark html units
      3   As an Emacs user
      4   I want to expand to them
      5 
      6   Scenario: Mark html attribute from start
      7     Given I turn on html-mode
      8     And there is no region selected
      9     When I insert "<div id="5">"
     10     And I place the cursor between " " and "id"
     11     And I press "C-@"
     12     And I press "C-@"
     13     And I press "C-@"
     14     Then the region should be "id="5""
     15 
     16   Scenario: Mark html attribute from end
     17     Given I turn on html-mode
     18     And there is no region selected
     19     When I insert "<div id="5">"
     20     And I go to point "12"
     21     And I press "C-@"
     22     And I press "C-@"
     23     Then the region should be "id="5""
     24 
     25   Scenario: Mark html tags, part 1
     26     Given I turn on html-mode
     27     And there is no region selected
     28     When I insert "... <div class='hi'><div>before <span></span></div> after</div> ..."
     29     And I place the cursor between "before " and "<span>"
     30     And I press "C-@"
     31     Then the region should be "<span>"
     32 
     33   Scenario: Mark html tags, part 2
     34     Given I turn on html-mode
     35     And there is no region selected
     36     When I insert "... <div class='hi'><div>before <span></span></div> after</div> ..."
     37     And I place the cursor between "before " and "<span>"
     38     And I press "C-@"
     39     And I press "C-@"
     40     Then the region should be "<span></span>"
     41 
     42   Scenario: Mark html tags, part 3
     43     Given I turn on html-mode
     44     And there is no region selected
     45     When I insert "... <div class='hi'><div>before <span></span></div> after</div> ..."
     46     And I place the cursor between "before " and "<span>"
     47     And I press "C-@"
     48     And I press "C-@"
     49     And I press "C-@"
     50     Then the region should be "before <span></span>"
     51 
     52   Scenario: Mark html tags, part 4
     53     Given I turn on html-mode
     54     And there is no region selected
     55     When I insert "... <div class='hi'><div>before <span></span></div> after</div> ..."
     56     And I place the cursor between "before " and "<span>"
     57     And I press "C-@"
     58     And I press "C-@"
     59     And I press "C-@"
     60     And I press "C-@"
     61     Then the region should be "<div>before <span></span></div>"
     62 
     63   Scenario: Mark html tags, part 5
     64     Given I turn on html-mode
     65     And there is no region selected
     66     When I insert "... <div class='hi'><div>before <span></span></div> after</div> ..."
     67     And I place the cursor between "before " and "<span>"
     68     And I press "C-@"
     69     And I press "C-@"
     70     And I press "C-@"
     71     And I press "C-@"
     72     And I press "C-@"
     73     Then the region should be "<div>before <span></span></div> after"
     74 
     75   Scenario: Mark html tags, part 6
     76     Given I turn on html-mode
     77     And there is no region selected
     78     When I insert "... <div class='hi'><div>before <span></span></div> after</div> ..."
     79     And I place the cursor between "before " and "<span>"
     80     And I press "C-@"
     81     And I press "C-@"
     82     And I press "C-@"
     83     And I press "C-@"
     84     And I press "C-@"
     85     And I press "C-@"
     86     Then the region should be "<div class='hi'><div>before <span></span></div> after</div>"
     87 
     88   Scenario: Text mode expansions shouldn't be here
     89     Given I turn on html-mode
     90     And there is no region selected
     91     When I insert "Sentence the first.  Sentence the second"
     92     And I place the cursor between "first.  " and "Sentence"
     93     And I press "C-@"
     94     And I press "C-@"
     95     Then the region should be "Sentence the first.  Sentence the second"