edition.feature
3.12 KB
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
Feature: Project
In Order to be able to update my projects info
As a regular user
I should be able to edit my projects
@kalibro_processor_restart
Scenario: Should go to the edit page from a project that I own
Given I am a regular user
And I am signed in
And I own a sample project
And I have sample project_attributes
And I am at the All Projects page
When I click the Edit link
Then I should be in the Edit Project page
@kalibro_processor_restart
Scenario: Should not show edit links from projects that doesn't belongs to me
Given I am a regular user
And I am signed in
And I have a sample project
And I am at the All Projects page
Then I should not see Edit within table
@kalibro_processor_restart
Scenario: Should not render the edit page if the project doesn't belongs to the current user
Given I am a regular user
And I am signed in
And I have a sample project
And I am at the All Projects page
When I visit the sample project edit page
Then I should see "You're not allowed to do this operation"
@kalibro_processor_restart
Scenario: Filling up the form
Given I am a regular user
And I am signed in
And I own a sample project
And I have sample project_attributes
And I am at the All Projects page
When I click the Edit link
Then The field "project[name]" should be filled with the sample project "name"
And The field "project[description]" should be filled with the sample project "description"
@kalibro_processor_restart
Scenario: With valid attributes
Given I am a regular user
And I am signed in
And I own a sample project
And I have sample project_attributes
And I am at the sample project edit page
And I fill the Name field with "Kalibro"
And I fill the Description field with "Web Service to collect metrics"
When I press the Save button
Then I should see "Kalibro"
And I should see "Web Service to collect metrics"
@kalibro_processor_restart
Scenario: With project name already taken
Given I am a regular user
And I am signed in
And I have a project named "Qt-Calculator"
And I own a project named "Kalibro"
And I am at the sample project edit page
And I have sample project_attributes
And I fill the Name field with "Qt-Calculator"
When I press the Save button
Then I should see "Name has already been taken"
@kalibro_processor_restart
Scenario: Editing just the description
Given I am a regular user
And I am signed in
And I own a sample project
And I have sample project_attributes
And I am at the sample project edit page
And I fill the Description field with "Web Service to collect metrics"
When I press the Save button
And I should see "Web Service to collect metrics"
@kalibro_processor_restart
Scenario: With blank project name
Given I am a regular user
And I am signed in
And I own a sample project
And I have sample project_attributes
And I am at the sample project edit page
And I fill the Name field with " "
When I press the Save button
Then I should see "Name can't be blank"