settings

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

mark-all-dwim-html.feature (2061B)


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
87
88
89
90
91
92
93
94
Feature: Mark all do-what-I-mean (html)

  Background:
    Given I turn on html-mode
    And I turn on delete-selection-mode
    And I insert:
    """
    <body>
      <div class="abc"> def </div>
      <div class="ghi"> jkl </div>
    </body>
    """

  Scenario: Marks tags in html-mode, from front
    When I go to the front of the word "abc"
    And I press "M-b"
    And I press "M-b"
    And I press "M-$"
    And I type "h1"
    Then I should see:
    """
    <body>
      <h1 class="abc"> def </h1>
      <div class="ghi"> jkl </div>
    </body>
    """

  Scenario: Marks tags in html-mode, from back
    When I go to the end of the word "jkl"
    And I press "M-f"
    And I press "M-$"
    And I type "h1"
    Then I should see:
    """
    <body>
      <div class="abc"> def </div>
      <h1 class="ghi"> jkl </h1>
    </body>
    """

  Scenario: Marks tags in html-mode, from outside front
    When I go to the front of the word "abc"
    And I press "M-b"
    And I press "M-b"
    And I press "C-b"
    And I press "M-$"
    And I type "h1"
    Then I should see:
    """
    <body>
      <h1 class="abc"> def </h1>
      <div class="ghi"> jkl </div>
    </body>
    """

  Scenario: Marks tags in html-mode, from outside back
    When I go to the end of the word "jkl"
    And I press "M-f"
    And I press "C-f"
    And I press "M-$"
    And I type "h1"
    Then I should see:
    """
    <body>
      <div class="abc"> def </div>
      <h1 class="ghi"> jkl </h1>
    </body>
    """

  Scenario: Marks words in html-mode
    When I go to the front of the word "abc"
    And I press "M-$"
    And I type "def"
    Then I should see:
    """
    <body>
      <div class="def"> def </div>
      <div class="ghi"> jkl </div>
    </body>
    """

  Scenario: Marks words in html-mode
    When I go to the front of the word "abc"
    And I press "M-$"
    And I type "def"
    And I press "M-$"
    And I type "hah"
    Then I should see:
    """
    <body>
      <div class="hah"> hah </div>
      <div class="ghi"> jkl </div>
    </body>
    """