summaryrefslogtreecommitdiff
path: root/features/project/wiki.feature
blob: a04228de03b3e7f247baa4471263b34f750ecaad (plain)
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
Feature: Project Wiki
  Background:
    Given I sign in as a user
    And I own project "Shop"
    Given I visit project wiki page

  Scenario: Add new page
    Given I create the Wiki Home page
    Then I should see the newly created wiki page

  Scenario: Add new page with errors
    Given I create the Wiki Home page with no content
    Then I should see a "Content can't be blank" error message
    When I create the Wiki Home page
    Then I should see the newly created wiki page

  Scenario: Pressing Cancel while editing a brand new Wiki
    Given I click on the Cancel button
    Then I should be redirected back to the Edit Home Wiki page

  Scenario: Edit existing page
    Given I have an existing Wiki page
    And I browse to that Wiki page
    And I click on the Edit button
    And I change the content
    Then I should see the updated content

  Scenario: Pressing Cancel while editing an existing Wiki page
    Given I have an existing Wiki page
    And I browse to that Wiki page
    And I click on the Edit button
    And I click on the Cancel button
    Then I should be redirected back to that Wiki page

  Scenario: View page history
    Given I have an existing wiki page
    And That page has two revisions
    And I browse to that Wiki page
    And I click the History button
    Then I should see both revisions

  Scenario: Destroy Wiki page
    Given I have an existing wiki page
    And I browse to that Wiki page
    And I click on the Edit button
    And I click on the "Delete this page" button
    Then The page should be deleted

  Scenario: View all pages
    Given I have an existing wiki page
    And I browse to that Wiki page
    Then I should see the existing page in the pages list

  Scenario: File exists in wiki repo
    Given I have an existing Wiki page with images linked on page
    And I browse to wiki page with images
    And I click on existing image link
    Then I should see the image from wiki repo

  Scenario: Image in wiki repo shown on the page
    Given I have an existing Wiki page with images linked on page
    And I browse to wiki page with images
    Then Image should be shown on the page

  Scenario: File does not exist in wiki repo
    Given I have an existing Wiki page with images linked on page
    And I browse to wiki page with images
    And I click on image link
    Then I should see the new wiki page form

  @javascript
  Scenario: New Wiki page that has a path
    Given I create a New page with paths
    Then I should see non-escaped link in the pages list

  @javascript
  Scenario: Edit Wiki page that has a path
    Given I create a New page with paths
    And I edit the Wiki page with a path
    Then I should see a non-escaped path
    And I should see the Editing page
    And I change the content
    Then I should see the updated content

  @javascript
  Scenario: View the page history of a Wiki page that has a path
    Given I create a New page with paths
    And I view the page history of a Wiki page that has a path
    Then I should see a non-escaped path
    And I should see the page history

  @javascript
  Scenario: View an old page version of a Wiki page
    Given I create a New page with paths
    And I edit the Wiki page with a path
    Then I should see a non-escaped path
    And I should see the Editing page
    And I change the content
    Then I click on Page History
    And I should see the page history
    And I should see a link with a version ID