diff --git a/features/activity.feature b/features/activity.feature index 5d87c8c240..21c84e8455 100644 --- a/features/activity.feature +++ b/features/activity.feature @@ -2,7 +2,7 @@ Feature: Cost Object activities Background: Given there is a standard cost control project named "project1" - And I am already logged in as "admin" + And I am already admin Scenario: cost object is a selectable activity type When I go to the activity page of the project "project1" diff --git a/features/cost_types/deletion.feature b/features/cost_types/deletion.feature index a17aad1140..7014e24e38 100644 --- a/features/cost_types/deletion.feature +++ b/features/cost_types/deletion.feature @@ -3,7 +3,7 @@ Feature: Cost type deletion Background: Given there is 1 cost type with the following: | name | cost_type1 | - And I am already logged in as "admin" + And I am already admin Scenario: Deleting a cost type When I delete the cost type "cost_type1" diff --git a/features/credit_unit_costs.feature b/features/credit_unit_costs.feature index 7ad5576e13..4d64395395 100644 --- a/features/credit_unit_costs.feature +++ b/features/credit_unit_costs.feature @@ -2,7 +2,7 @@ Feature: Credit unit costs Background: Given there is a standard cost control project named "project1" - And the project "project1" has 1 work_package with the following: + And the project "project1" has 1 issue with the following: | subject | work_package1 | And the role "Manager" may have the following rights: | view_work_packages | @@ -18,9 +18,9 @@ Feature: Credit unit costs @javascript Scenario: Crediting units costs to an work_package When I am already logged in as "manager" - And I go to the page of the work_package "work_package1" + And I go to the page of the issue "work_package1" And I select "Log unit costs" from the action menu And I fill in "cost_entry_units" with "100" And I select "cost_type_1" from "Cost type" And I press "Save" - Then I should be on the page of the work_package "work_package1" + Then I should be on the page of the issue "work_package1" diff --git a/features/set_rate.feature b/features/set_rate.feature index a0f3a433d8..161773ef7b 100644 --- a/features/set_rate.feature +++ b/features/set_rate.feature @@ -2,28 +2,29 @@ Feature: Updating Hourly Rates Background: Given there is a standard cost control project named "project1" - And I am already logged in as "admin" + And there is a user named "bob" + And I am already admin @javascript Scenario: The project member has a hourly rate valid from today Given there is an hourly rate with the following: | project | project1 | - | user | admin | + | user | bob | | valid_from | Date.today | | rate | 20 | When I go to the members tab of the settings page of the project "project1" - And I set the hourly rate of user "admin" to "30" - And I go to the hourly rates page of user "admin" of the project called "project1" + And I set the hourly rate of user "bob" to "30" + And I go to the hourly rates page of user "bob" of the project called "project1" Then I should see 1 hourly rate @javascript Scenario: The project member does not have a hourly rate valid from today Given there is an hourly rate with the following: | project | project1 | - | user | admin | + | user | bob | | valid_from | Date.today - 1 | | rate | 20 | When I go to the members tab of the settings page of the project "project1" - And I set the hourly rate of user "admin" to "30" - And I go to the hourly rates page of user "admin" of the project called "project1" + And I set the hourly rate of user "bob" to "30" + And I go to the hourly rates page of user "bob" of the project called "project1" Then I should see 2 hourly rates diff --git a/features/step_definitions/cost_steps.rb b/features/step_definitions/cost_steps.rb index 93b7ef049a..4fd408f68e 100755 --- a/features/step_definitions/cost_steps.rb +++ b/features/step_definitions/cost_steps.rb @@ -81,7 +81,7 @@ Given /^there is a standard cost control project named "([^\"]*)"$/ do |name| | name | | type1 | And the project "#{name}" has 1 subproject - And the project "#{name}" has 1 work_package with: + And the project "#{name}" has 1 issue with: | subject | #{name}work_package | And there is a role "Manager" And the role "Manager" may have the following rights: @@ -127,13 +127,13 @@ Given /^users have times and the cost type "([^\"]*)" logged on the work_package user = k.split.first if k.end_with? "hours" steps %Q{ - And the work_package "#{work_package}" has 1 time entry with the following: + And the issue "#{work_package}" has 1 time entry with the following: | hours | #{v} | | user | #{user} | } elsif k.end_with? "units" steps %Q{ - And the work_package "#{work_package}" has 1 cost entry with the following: + And the issue "#{work_package}" has 1 cost entry with the following: | units | #{v} | | user | #{user} | | cost type | #{cost_type} | diff --git a/features/view_own_rates.feature b/features/view_own_rates.feature index da8cbab536..3e4154dc31 100644 --- a/features/view_own_rates.feature +++ b/features/view_own_rates.feature @@ -12,14 +12,14 @@ Feature: Permission View Own hourly and cost rates | view_cost_rates | | log_costs | And there is 1 User with: - | Login | testuser | - | Firstname | Bob | - | Lastname | Bobbit | + | Login | testuser | + | Firstname | Bob | + | Lastname | Bobbit | | default rate | 10.00 | And the user "testuser" is a "Supplier" in the project "Standard Project" - And the project "Standard Project" has 1 work_package with the following: + And the project "Standard Project" has 1 issue with the following: | subject | test_work_package | - And the work_package "test_work_package" has 1 time entry with the following: + And the issue "test_work_package" has 1 time entry with the following: | hours | 1.00 | | user | testuser | And there is 1 cost type with the following: @@ -28,37 +28,37 @@ Feature: Permission View Own hourly and cost rates And the work_package "test_work_package" has 1 cost entry with the following: | units | 2.00 | | user | testuser | - | cost type | Translation | + | cost type | Translation | And the user "manager" has: - | hourly rate | 11.00 | - And the work_package "test_work_package" has 1 time entry with the following: - | hours | 3.00 | - | user | manager | - And the work_package "test_work_package" has 1 cost entry with the following: - | units | 5.00 | - | user | manager | - | cost type | Translation | + | hourly rate | 11.00 | + And the issue "test_work_package" has 1 time entry with the following: + | hours | 3.00 | + | user | manager | + And the work_package "test_work_package" has 1 cost entry with the following: + | units | 5.00 | + | user | manager | + | cost type | Translation | And I am already logged in as "testuser" - And I am on the page for the work_package "test_work_package" + And I am on the page for the issue "test_work_package" Then I should see "1.00 hour" - And I should see "2.0 Translations" - And I should see "24.00 EUR" - And I should not see "33.00 EUR" # labour costs only of Manager - And I should not see "35.00 EUR" # material costs only of Manager - And I should not see "43.00 EUR" # labour costs of me and Manager - And I should not see "49.00 EUR" # material costs of me and Manager - And I am on the work_packages page for the project called "Standard Project" + And I should see "2.0 Translations" + And I should see "24.00 EUR" + And I should not see "33.00 EUR" # labour costs only of Manager + And I should not see "35.00 EUR" # material costs only of Manager + And I should not see "43.00 EUR" # labour costs of me and Manager + And I should not see "49.00 EUR" # material costs of me and Manager + And I am on the work_packages page for the project called "Standard Project" And I toggle the Options fieldset - And I select to see columns + And I select to see columns | Overall costs | | Labor costs | | Unit costs | And I follow "Apply" - Then I should see "24.00 EUR" + Then I should see "24.00 EUR" And I should see "10.00 EUR" And I should see "14.00 EUR" - And I should not see "33.00 EUR" # labour costs only of Manager - And I should not see "35.00 EUR" # material costs only of Manager - And I should not see "43.00 EUR" # labour costs of me and Manager - And I should not see "49.00 EUR" # material costs of me and Manager + And I should not see "33.00 EUR" # labour costs only of Manager + And I should not see "35.00 EUR" # material costs only of Manager + And I should not see "43.00 EUR" # labour costs of me and Manager + And I should not see "49.00 EUR" # material costs of me and Manager