File: BreakpointUI.feature

package info (click to toggle)
dap-mode 0.8-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 7,556 kB
  • sloc: lisp: 6,299; makefile: 31; java: 27; xml: 23
file content (134 lines) | stat: -rw-r--r-- 4,743 bytes parent folder | download
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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
Feature: Breakpoint UI tests

  Background:
    Given I have maven project "m" in "tmp"
    And I add project "m" folder "tmp" to the list of workspace folders
    And I open a java file "tmp/m/src/main/java/temp/App.java"
    And I clear the buffer
    And I insert:
      """
      package temp;

      class App {
      public static void main(String[] args) {
      System.out.print(123);
      foo();
      bar();
      }

      static int foo() {
      new App();
      return 10;
      }

      static int bar() {
      new App();
      return 10;
      }

      }
      """
    And I call "save-buffer"
    And I start lsp-java
    And The server status must become "^LSP[jdtls:[0-9]+]$"
    And I call "dap-ui-mode"

  @Breakpoints @UI
  Scenario: Inactive breakpoint
    When I place the cursor before "System"
    And I call "dap-toggle-breakpoint"
    Then I should see the following overlay "dap-ui-pending-breakpoint-face"

  @UI @Breakpoints
  Scenario: Cursor placement
    When I place the cursor before "System"
    And I call "dap-toggle-breakpoint"
    And I attach handler "breakpoint" to hook "dap-stopped-hook"
    And I call "dap-java-debug"
    And The hook handler "breakpoint" would be called
    Then I should see the following overlay "dap-ui-marker-face"

  @UI @Breakpoints
  Scenario: Cursor removed - continue
    When I place the cursor before "System"
    And I call "dap-toggle-breakpoint"
    And I attach handler "breakpoint" to hook "dap-stopped-hook"
    And I call "dap-java-debug"
    And The hook handler "breakpoint" would be called
    And I call "dap-continue"
    Then I should not see the following overlay "dap-ui-marker-face"

  @UI @Breakpoints
  Scenario: Cursor removed - next
    When I place the cursor before "System"
    Then I should not see the following overlay "dap-ui-marker-face"
    And I call "dap-toggle-breakpoint"
    And I attach handler "breakpoint" to hook "dap-stopped-hook"
    And I call "dap-java-debug"
    And The hook handler "breakpoint" would be called
    And I call "dap-next"
    Then I should not see the following overlay "dap-ui-marker-face"

  @UI @Breakpoints
  Scenario: Cursor removed - step-in
    When I place the cursor before "System"
    And I call "dap-toggle-breakpoint"
    And I attach handler "breakpoint" to hook "dap-stopped-hook"
    And I call "dap-java-debug"
    And The hook handler "breakpoint" would be called
    And I call "dap-step-in"
    Then I should not see the following overlay "dap-ui-marker-face"

  @UI @Breakpoints
  Scenario: Cursor removed - step-out
    When I place the cursor before "System"
    And I call "dap-toggle-breakpoint"
    And I attach handler "breakpoint" to hook "dap-stopped-hook"
    And I call "dap-java-debug"
    And The hook handler "breakpoint" would be called
    And I call "dap-step-out"
    Then I should not see the following overlay "dap-ui-marker-face"

  @Breakpoints @UI @WIP
  Scenario: Verified breakpoint
    Given I place the cursor before "System"
    And I call "dap-toggle-breakpoint"
    And I place the cursor before "foo"
    And I call "dap-toggle-breakpoint"
    And I attach handler "breakpoint" to hook "dap-stopped-hook"
    And I call "dap-java-debug"
    And The hook handler "breakpoint" would be called
    When I place the cursor before "foo"
    Then I should see the following overlay "dap-ui-verified-breakpoint-face"

  @Breakpoints @UI
  Scenario: Enabled breakpoint
    When I place the cursor before "System"
    And I call "dap-toggle-breakpoint"
    And I attach handler "breakpoint" to hook "dap-stopped-hook"
    And I call "dap-java-debug"
    And The hook handler "breakpoint" would be called
    Then I should see the following overlay "dap-ui-verified-breakpoint-face"

  @Breakpoints @UI
  Scenario: Disable breakpoints after session shutdown
    When I place the cursor before "System"
    And I call "dap-toggle-breakpoint"
    And I attach handler "breakpoint" to hook "dap-stopped-hook"
    And I call "dap-java-debug"
    And The hook handler "breakpoint" would be called
    And I attach handler "terminated" to hook "dap-terminated-hook"
    When I call "dap-continue"
    Then The hook handler "terminated" would be called
    And I should see the following overlay "dap-ui-pending-breakpoint-face"

  @Breakpoints @UI
  Scenario: Filter dead sessions.
    And I attach handler "terminated" to hook "dap-terminated-hook"
    And I call "dap-java-debug"
    Then The hook handler "terminated" would be called
    When I place the cursor before "System"
    And I call "dap-toggle-breakpoint"
    And I attach handler "breakpoint" to hook "dap-stopped-hook"
    And I call "dap-java-debug"
    And The hook handler "breakpoint" would be called