issues.feature 8.99 KB
Newer Older
Douwe Maan's avatar
Douwe Maan committed
1
@project_issues
2
Feature: Project Issues
3
  Background:
4
    Given I sign in as a user
5 6
    And I own project "Shop"
    And project "Shop" have "Release 0.4" open issue
7
    And project "Shop" have "Tweet control" open issue
8
    And project "Shop" have "Release 0.3" closed issue
randx's avatar
randx committed
9
    And I visit project "Shop" issues page
10 11

  Scenario: I should see open issues
12 13
    Given I should see "Release 0.4" in issues
    And I should not see "Release 0.3" in issues
14

15 16 17 18 19 20 21 22 23 24 25 26 27
  Scenario: I should see closed issues
    Given I click link "Closed"
    Then I should see "Release 0.3" in issues
    And I should not see "Release 0.4" in issues

  Scenario: I should see all issues
    Given I click link "All"
    Then I should see "Release 0.3" in issues
    And I should see "Release 0.4" in issues

  Scenario: I visit issue page
    Given I click link "Release 0.4"
    Then I should see issue "Release 0.4"
28 29 30 31 32 33 34
    And I should see "1 of 2" in the sidebar

  Scenario: I navigate between issues
    Given I click link "Release 0.4"
    Then I click link "Next" in the sidebar
    Then I should see issue "Tweet control"
    And I should see "2 of 2" in the sidebar
35

36
  @javascript
37
  Scenario: I filter by author
38 39 40 41
    Given I add a user to project "Shop"
    And I click "author" dropdown
    Then I see current user as the first user

42 43 44 45 46
  Scenario: I submit new unassigned issue
    Given I click link "New Issue"
    And I submit new issue "500 error on profile"
    Then I should see issue "500 error on profile"

47 48 49 50 51 52 53
  Scenario: I submit new unassigned issue with labels
    Given project "Shop" has labels: "bug", "feature", "enhancement"
    And I click link "New Issue"
    And I submit new issue "500 error on profile" with label 'bug'
    Then I should see issue "500 error on profile"
    And I should see label 'bug' with issue

54 55 56 57
  @javascript
  Scenario: I comment issue
    Given I visit issue page "Release 0.4"
    And I leave a comment like "XML attached"
58
    Then I should see comment "XML attached"
59
    And I should see an error alert section within the comment form
randx's avatar
randx committed
60

61 62 63 64 65 66 67
  @javascript
  Scenario: Visiting Issues after being sorted the list
    Given I visit project "Shop" issues page
    And I sort the list by "Oldest updated"
    And I visit my project's home page
    And I visit project "Shop" issues page
    Then The list should be sorted by "Oldest updated"
68 69 70 71 72 73 74

  @javascript
  Scenario: Visiting Merge Requests after being sorted the list
    Given I visit project "Shop" issues page
    And I sort the list by "Oldest updated"
    And I visit project "Shop" merge requests page
    Then The list should be sorted by "Oldest updated"
75

76 77 78 79 80 81 82
  @javascript
  Scenario: Visiting Merge Requests from a differente Project after sorting
    Given I visit project "Shop" merge requests page
    And I sort the list by "Oldest updated"
    And I visit dashboard merge requests page
    Then The list should be sorted by "Oldest updated"

83 84 85 86 87 88 89 90 91 92
  @javascript
  Scenario: Sort issues by upvotes/downvotes
    Given project "Shop" have "Bugfix" open issue
    And issue "Release 0.4" have 2 upvotes and 1 downvote
    And issue "Tweet control" have 1 upvote and 2 downvotes
    And I sort the list by "Most popular"
    Then The list should be sorted by "Most popular"
    And I sort the list by "Least popular"
    Then The list should be sorted by "Least popular"

randx's avatar
randx committed
93 94
  @javascript
  Scenario: I search issue
95
    Given I fill in issue search with "Re"
randx's avatar
randx committed
96 97
    Then I should see "Release 0.4" in issues
    And I should not see "Release 0.3" in issues
98
    And I should not see "Tweet control" in issues
randx's avatar
randx committed
99 100 101

  @javascript
  Scenario: I search issue that not exist
102
    Given I fill in issue search with "Bu"
randx's avatar
randx committed
103 104 105 106 107 108
    Then I should not see "Release 0.4" in issues
    And I should not see "Release 0.3" in issues

  @javascript
  Scenario: I search all issues
    Given I click link "All"
109
    And I fill in issue search with ".3"
randx's avatar
randx committed
110 111
    Then I should see "Release 0.3" in issues
    And I should not see "Release 0.4" in issues
112

113
  @javascript
114 115 116 117
  Scenario: Search issues when search string exactly matches issue description
    Given project 'Shop' has issue 'Bugfix1' with description: 'Description for issue1'
    And I fill in issue search with 'Description for issue1'
    Then I should see 'Bugfix1' in issues
118 119 120 121 122
    And I should not see "Release 0.4" in issues
    And I should not see "Release 0.3" in issues
    And I should not see "Tweet control" in issues

  @javascript
123 124 125 126 127 128
  Scenario: Search issues when search string partially matches issue description
    Given project 'Shop' has issue 'Bugfix1' with description: 'Description for issue1'
    And project 'Shop' has issue 'Feature1' with description: 'Feature submitted for issue1'
    And I fill in issue search with 'issue1'
    Then I should see 'Feature1' in issues
    Then I should see 'Bugfix1' in issues
129 130 131 132 133
    And I should not see "Release 0.4" in issues
    And I should not see "Release 0.3" in issues
    And I should not see "Tweet control" in issues

  @javascript
134 135 136 137
  Scenario: Search issues when search string matches no issue description
    Given project 'Shop' has issue 'Bugfix1' with description: 'Description for issue1'
    And I fill in issue search with 'Rock and roll'
    Then I should not see 'Bugfix1' in issues
138 139 140 141 142
    And I should not see "Release 0.4" in issues
    And I should not see "Release 0.3" in issues
    And I should not see "Tweet control" in issues


143 144 145 146 147 148 149 150 151 152 153
  # Markdown

  Scenario: Headers inside the description should have ids generated for them.
    Given I visit issue page "Release 0.4"
    Then Header "Description header" should have correct id and link

  @javascript
  Scenario: Headers inside comments should not have ids generated for them.
    Given I visit issue page "Release 0.4"
    And I leave a comment with a header containing "Comment with a header"
    Then The comment with the header should not have an ID
154

Marin Jankovski's avatar
Marin Jankovski committed
155 156 157 158 159 160
  @javascript
  Scenario: Blocks inside comments should not build relative links
    Given I visit issue page "Release 0.4"
    And I leave a comment with code block
    Then The code block should be unchanged

161 162
  Scenario: Issues on empty project
    Given empty project "Empty Project"
163
    And I have an ssh key
164 165 166 167 168 169
    When I visit empty project page
    And I see empty project details with ssh clone info
    When I visit empty project's issues page
    Given I click link "New Issue"
    And I submit new issue "500 error on profile"
    Then I should see issue "500 error on profile"
170 171 172 173 174 175 176

  Scenario: Clickable labels
    Given issue 'Release 0.4' has label 'bug'
    And I visit project "Shop" issues page
    When I click label 'bug'
    And I should see "Release 0.4" in issues
    And I should not see "Tweet control" in issues
177

178 179
  @javascript
  Scenario: Issue notes should be editable with +1
180 181
    Given project "Shop" have "Release 0.4" open issue
    When I visit issue page "Release 0.4"
182 183 184 185 186
    And I leave a comment with a header containing "Comment with a header"
    Then The comment with the header should not have an ID
    And I edit the last comment with a +1
    Then I should see +1 in the description

187 188 189 190 191 192
  # Issue description preview

  @javascript
  Scenario: I can't preview without text
    Given I click link "New Issue"
    And I haven't written any description text
Vinnie Okada's avatar
Vinnie Okada committed
193
    Then The Markdown preview tab should say there is nothing to do
194 195 196 197

  @javascript
  Scenario: I can preview with text
    Given I click link "New Issue"
Vinnie Okada's avatar
Vinnie Okada committed
198 199
    And I write a description like ":+1: Nice"
    Then The Markdown preview tab should display rendered Markdown
200 201 202 203 204 205 206 207 208 209 210 211

  @javascript
  Scenario: I preview an issue description
    Given I click link "New Issue"
    And I preview a description text like "Bug fixed :smile:"
    Then I should see the Markdown preview
    And I should not see the Markdown text field

  @javascript
  Scenario: I can edit after preview
    Given I click link "New Issue"
    And I preview a description text like "Bug fixed :smile:"
Vinnie Okada's avatar
Vinnie Okada committed
212
    Then I should see the Markdown write tab
Vinnie Okada's avatar
Vinnie Okada committed
213 214 215 216 217 218 219

  @javascript
  Scenario: I can preview when editing an existing issue
    Given I click link "Release 0.4"
    And I click link "Edit" for the issue
    And I preview a description text like "Bug fixed :smile:"
    Then I should see the Markdown write tab
Valery Sizov's avatar
tests  
Valery Sizov committed
220 221 222

  @javascript
  Scenario: I can unsubscribe from issue
223 224
    Given project "Shop" have "Release 0.4" open issue
    When I visit issue page "Release 0.4"
Valery Sizov's avatar
tests  
Valery Sizov committed
225 226 227
    Then I should see that I am subscribed
    When I click button "Unsubscribe"
    Then I should see that I am unsubscribed
228 229 230 231 232

  Scenario: I submit new unassigned issue as guest
    Given I logout
    Given public project "Community"
    When I visit project "Community" page
233
    And I visit project "Community" issues page
234 235 236 237 238 239
    And I click link "New Issue"
    And I should not see assignee field
    And I should not see milestone field
    And I should not see labels field
    And I submit new issue "500 error on profile"
    Then I should see issue "500 error on profile"
240 241 242 243 244 245

  @javascript
  Scenario: Another user adds a comment to issue I'm currently viewing
    Given I visit issue page "Release 0.4"
    And another user adds a comment with text "Yay!" to issue "Release 0.4"
    Then I should see a new comment with text "Yay!"