fix few cucumber steps

git-svn-id: https://dev.finn.de/svn/cockpit/branches/reporting_merge@1532 7926756e-e54e-46e6-9721-ed318f58905e
pull/6827/head
t.felgentreff 14 years ago
parent 9eb2ed976e
commit bb8b2787fc
  1. 29
      features/links.feature
  2. 53
      features/permissions.feature

@ -4,15 +4,16 @@ Feature: Cost Reporting Linkage
Given there is a standard cost control project named "Some Project"
And there is 1 cost type with the following:
| name | Translation |
And the user "manager" has one cost entry
And I am admin
And I am on the Cost Reports page for the project called Test
Then I should see "Const Entry Attributes"
And the user "manager" has 1 cost entry
And I am logged in as "controller"
And I am on the Cost Reports page for the project called "Some Project"
And I start debugging
Then I should see "Cost Entry Attributes"
And I should see "User"
And I should see "<< me >>"
And I should see "No data to display"
And I should not see "0.00"
Scenario: Coming to the cost report for the first time, I should see my entries
Given there is a standard cost control project named "Standard Project"
And the user "manager" has:
@ -26,10 +27,12 @@ Feature: Cost Reporting Linkage
And there is 1 cost type with the following:
| name | word |
| cost rate | 10 |
And the user "manager" has 1 cost entry with the following:
| units | 5 |
And the issue "manager issue" has 1 cost entry with the following:
| units | 5 |
| user | manager |
| cost type | word |
And I am logged in as "manager"
And I am on the Cost Reports page for the project called Test
And I am on the Cost Reports page for the project called "Standard Project"
Then I should see "50.00" # 5 (units) x 10 EUR
And I should see "100.00" # 10 (hours) x 10 EUR
And I should see "150.00" # 100 EUR + 50 EUR
@ -37,6 +40,12 @@ Feature: Cost Reporting Linkage
Scenario: Going from an Issue to the cost report should set the filter on this issue
Given there is a standard cost control project named "Standard Project"
And the role "Manager" may have the following rights:
| view_own_hourly_rate |
| view_issues |
| view_own_time_entries |
| view_own_cost_entries |
| view_cost_rates |
And the user "manager" has:
| default rate | 10 |
And the user "manager" has 1 issue with:
@ -50,7 +59,9 @@ Feature: Cost Reporting Linkage
| user | manager |
| hours | 5 |
And I am logged in as "manager"
And I am on the Cost Reports page for the project called Test
And I am on the page for the issue "manager issue"
Then I should see "10.00 hours"
And I follow "10.00 hours"
Then I should see "100.00" # 10 EUR x 10 (hours)
And I should not see "50.00" # 10 EUR x 5 (hours)
And I should not see "150.00"

@ -14,13 +14,15 @@ Feature: Permissions
And there is 1 project with the following:
| Name | Test |
And there is 1 cost type with the following:
| name | Translation |
| name | Translation |
| cost rate | 1 |
And the project "Test" has 1 cost entry with the following:
| units | 4242 |
| units | 424 |
And I am on the Cost Reports page for the project called Test
Then I should not see "No data to display"
And I start debugging
And I should see "424.00"
And I should see "Translation"
And I should see "4242"
Scenario: User who can see own costs, ONLY sees own costs
Given I am not logged in
@ -34,17 +36,44 @@ Feature: Permissions
And the role "Developer" may have the following rights:
| View own cost entries |
And there is 1 cost type with the following:
| name | Translation |
And the user "bob" has 1 cost entry
| name | Translation |
| cost rate | 1 |
And the user "bob" has 1 issue with the following:
| subject | bobs issue |
And the issue "bobs issue" has 1 cost entry with the following:
| user | bob |
| units | 5 |
| cost type | Translation |
And there is 1 cost type with the following:
| name | Hidden Costs |
And the project "Test" has 2 cost entries with the following:
And the project "Test" has 1 cost entry with the following:
| units | 128128 |
And I am logged in as "bob"
And I am on the Cost Reports page for the project called Test
And I am on the Cost Reports page for the project called "Test"
Then I should not see "No data to display"
And I should see "Translation"
And I should see "Bob Bobbit"
And I should not see "Hidden Costs"
And I should not see "128128"
And I should not see "Redmine Admin"
And I should see "5.00" # 5 Translations x 10 EUR
And I should not see "128128.00" # The other cost entries
And I should not see "128,128.00" # The other cost entries in american writing
Scenario: User who can see own time entries, ONLY sees own time entries
Given I am not logged in
And there is 1 project with the following:
| Name | Test |
And there is 1 User with:
| Login | bob |
| Firstname | Bob |
| Lastname | Bobbit |
| default rate | 20.0 |
And the user "Bob" is a "Developer" in the project "Test"
And the role "Developer" may have the following rights:
| View own time entries |
And the user "Bob" has 1 time entry
And the project "Test" has 2 time entries with the following:
| hours | 11 |
And I am logged in as "bob"
And I am on the Cost Reports page for the project called "Test"
Then I should not see "No data to display"
And I should not see "0.00"
And I should not see "11"
And I should not see "220.00"

Loading…
Cancel
Save