From: Tomas Sedovic <tsedovic(a)redhat.com>
Certain cucumber tests were generating an admin user twice for a test (once in
the `Background` section and then again in the `Scenario`).
The previous commit changed factory definition for the admin user so that it
always has the login "admin". This caused failures for scenarios that tried to
create the admin user twice.
This removes the "Given I am an authorised user" condition from the `Scenario`
sections, because the admin user is already established in the `Background`
section.
---
src/features/hardware_profile.feature | 9 +++------
src/features/pool.feature | 3 +--
2 files changed, 4 insertions(+), 8 deletions(-)
diff --git a/src/features/hardware_profile.feature
b/src/features/hardware_profile.feature
index 0094ac1..ab2f8ea 100644
--- a/src/features/hardware_profile.feature
+++ b/src/features/hardware_profile.feature
@@ -85,8 +85,7 @@ Feature: Manage Pools
Then I should see "mock1(Front End)"
Scenario: Create a new Hardware Profile
- Given I am an authorised user
- And I am on the hardware profiles page
+ Given I am on the hardware profiles page
When I follow "New Hardware Profile"
Then I should be on the new hardware profile page
When I fill in "name" with "Test Hardware Profile"
@@ -102,8 +101,7 @@ Feature: Manage Pools
| Test Hardware Profile | 1740 | 2 | 250 | i386 |
Scenario: Check New Hardware Profile matching Provider Hardware Profiles
- Given I am an authorised user
- And there is a provider named "provider1"
+ Given there is a provider named "provider1"
And there is a provider named "provider2"
And "provider1" has the following hardware profiles:
| name | memory | cpu |storage | architecture |
@@ -130,8 +128,7 @@ Feature: Manage Pools
| provider2 | m1-small | 4048 | 4 | 500 | i386 |
Scenario: Update a HardwareProfile
- Given I am an authorised user
- And there are the following conductor hardware profiles:
+ Given there are the following conductor hardware profiles:
| name | memory | cpu |storage | architecture |
| m1-small | 2048 | 4 | 160 | x86_64 |
And I am on the hardware profiles page
diff --git a/src/features/pool.feature b/src/features/pool.feature
index 75cb1c3..7f1a00b 100644
--- a/src/features/pool.feature
+++ b/src/features/pool.feature
@@ -35,8 +35,7 @@ Feature: Manage Pools
| mockpool | 10 | 80.0 |
Scenario: Enter invalid characters into Name field
- Given I am an authorised user
- And I am on the new resources pool page
+ Given I am on the new resources pool page
When I fill in "pool[name]" with "@%&*())_@!#!"
And I press "Save"
Then I should see "Name must only contain: numbers, letters, spaces, '_'
and '-'"
--
1.7.4