From: Tomas Sedovic <[email protected]>
This fixes the authentication features and partly the pools.
Some failures still remain, because the appropriate pages have not been
finalized yet and operate on AJAX-only, which Cucumber doesn't see.
---
src/app/views/instance/_instances.haml | 2 +-
src/features/authentication.feature | 8 ++--
src/features/permission.feature | 34 ++++++++--------
src/features/pool.feature | 68 ++++++++++++++++----------------
src/features/support/hooks.rb | 2 +-
5 files changed, 57 insertions(+), 57 deletions(-)
diff --git a/src/app/views/instance/_instances.haml
b/src/app/views/instance/_instances.haml
index b0f4692..5af1838 100644
--- a/src/app/views/instance/_instances.haml
+++ b/src/app/views/instance/_instances.haml
@@ -10,7 +10,7 @@
- opts = { :order => @order,
:order_dir => @order_dir,
- :title => 'List of instances',
+ :title => "Instances for #[email protected]}",
:check_all => 'id' }
= paginated_table('instances_table', columns, @instances, opts) do |rec|
diff --git a/src/features/authentication.feature
b/src/features/authentication.feature
index e6e0545..03ee914 100644
--- a/src/features/authentication.feature
+++ b/src/features/authentication.feature
@@ -15,7 +15,7 @@ Feature: User authentication
| Confirm password | secret |
| First name | Joe |
| Last name | Tester |
- | Email | [email protected] |
+ | E-mail | [email protected] |
And I press "Create Account"
Then I should be on testuser's user page
And I should see "User registered!"
@@ -39,9 +39,9 @@ Feature: User authentication
And I am on the homepage
When I want to edit my profile
And I follow "Edit"
- Then I should see "Edit my profile"
- When I fill in "email" with "[email protected]"
- And I press "Update"
+ Then I should see "Edit an Account"
+ When I fill in "E-mail" with "[email protected]"
+ And I press "Make Changes"
Then I should be on the account page
And I should see "User updated!"
diff --git a/src/features/permission.feature b/src/features/permission.feature
index 9d4c38c..5267da4 100644
--- a/src/features/permission.feature
+++ b/src/features/permission.feature
@@ -9,25 +9,25 @@ Feature: Manage Permissions
And a user "testuser" exists
Scenario: Create a new Permission
- Given I am on the permissions page
- And there is not a permission for the user "testuser"
- When I follow "Add a new permission record"
- Then I should be on the new permission page
- And I should see "new Permission"
- When I select "testuser" from "permission[user_id]"
- And I select "Provider Creator" from "permission[role_id]"
- And I press "Save"
- Then I should be on the permissions page
- And I should see "Permission record added"
- And I should see "testuser"
+ Given I am on the permissions page
+ And there is not a permission for the user "testuser"
+ When I follow "Add a new permission record"
+ Then I should be on the new permission page
+ And I should see "new Permission"
+ When I select "testuser" from "permission[user_id]"
+ And I select "Provider Creator" from "permission[role_id]"
+ And I press "Save"
+ Then I should be on the permissions page
+ And I should see "Permission record added"
+ And I should see "testuser"
Scenario: Create a permission which already exists
- Given there is a permission for the user "testuser"
- And I am on the new permission page
- When I select "testuser" from "permission[user_id]"
- And I select "Provider Creator" from "permission[role_id]"
- And I press "Save"
- Then I should see "new Permission"
+ Given there is a permission for the user "testuser"
+ And I am on the new permission page
+ When I select "testuser" from "permission[user_id]"
+ And I select "Provider Creator" from "permission[role_id]"
+ And I press "Save"
+ Then I should see "new Permission"
Scenario: Delete a permission
Given there is a permission for the user "testuser"
diff --git a/src/features/pool.feature b/src/features/pool.feature
index ae0f10a..15abe09 100644
--- a/src/features/pool.feature
+++ b/src/features/pool.feature
@@ -8,43 +8,43 @@ Feature: Manage Pools
And I am logged in
Scenario: Create a new Pool
- Given I am on the instances page
- And there is not a pool named "mockpool"
- When I follow "Add a pool"
- Then I should be on the new pool page
- And I should see "Create a new Pool"
- When I fill in "pool_name" with "mockpool"
- And I press "Save"
- Then I should be on the show pool page
- And I should see "Pool added"
- And I should see "mockpool"
- And I should have a pool named "mockpool"
+ Given I am on the pools page
+ And there is not a pool named "mockpool"
+ When I follow "New pool"
+ Then I should be on the new pool page
+ And I should see "Create a new Pool"
+ When I fill in "pool_name" with "mockpool"
+ And I press "Save"
+ Then I should be on the show pool page
+ And I should see "Pool added"
+ And I should see "mockpool"
+ And I should have a pool named "mockpool"
Scenario: View Pool's Hardware Profiles
- Given I have Pool Creator permissions on a pool named "mockpool"
- And the Pool has the following Hardware Profiles:
- | name | memory | cpu |storage | architecture |
- | m1-small | 1740 | 2 | 160.0 | i386 |
- | m1-large | 4096 | 4 | 850.0 | x86_64 |
- | m1-xlarge | 8192 | 8 | 1690.0 | x86_64 |
- And I am on the instances page
- When I follow "mockpool"
- Then I should be on the show pool page
- When I follow "Hardware Profiles"
- Then I should see the following:
- | m1-small | 1740 | 2 | 160.0 | i386 |
- | m1-large | 4096 | 4 | 850.0 | x86_64 |
- | m1-xlarge | 8192 | 8 | 1690.0 | x86_64 |
+ Given I have Pool Creator permissions on a pool named "mockpool"
+ And the Pool has the following Hardware Profiles:
+ | name | memory | cpu |storage | architecture |
+ | m1-small | 1740 | 2 | 160.0 | i386 |
+ | m1-large | 4096 | 4 | 850.0 | x86_64 |
+ | m1-xlarge | 8192 | 8 | 1690.0 | x86_64 |
+ And I am on the instances page
+ When I follow "mockpool"
+ Then I should be on the show pool page
+ When I follow "Hardware Profiles"
+ Then I should see the following:
+ | m1-small | 1740 | 2 | 160.0 | i386 |
+ | m1-large | 4096 | 4 | 850.0 | x86_64 |
+ | m1-xlarge | 8192 | 8 | 1690.0 | x86_64 |
Scenario: View Pool's Realms
- Given I have Pool Creator permissions on a pool named "mockpool"
- And the Pool has the following Realms named "Europe, United States"
- And I am on the instances page
- When I follow "mockpool"
- Then I should be on the show pool page
- When I follow "Realms"
- Then I should see "Europe"
- And I should see "United States"
+ Given I have Pool Creator permissions on a pool named "mockpool"
+ And the Pool has the following Realms named "Europe, United States"
+ And I am on the instances page
+ When I follow "mockpool"
+ Then I should be on the show pool page
+ When I follow "Realms"
+ Then I should see "Europe"
+ And I should see "United States"
@tag
Scenario: View Pool's Quota Usage
@@ -61,4 +61,4 @@ Feature: Manage Pools
When I follow "Quota"
Then I should see the following:
| Running Instances | 10 | 8 |
- | Total Instances | 15 | 15 |
\ No newline at end of file
+ | Total Instances | 15 | 15 |
diff --git a/src/features/support/hooks.rb b/src/features/support/hooks.rb
index 48554aa..3f112ae 100644
--- a/src/features/support/hooks.rb
+++ b/src/features/support/hooks.rb
@@ -7,7 +7,7 @@ Before do
:value =>
@default_quota,
:object_type =>
"Quota")
- @default_pool = Factory(:pool, :name => "default_pool")
+ @default_pool = Factory(:pool, :name => "default_pool", :quota =>
@default_quota)
@self_service_default_pool = Factory(:metadata_object, :key =>
"self_service_default_pool",
:value =>
@default_pool,
:object_type => "Pool")
--
1.7.2.3
_______________________________________________
deltacloud-devel mailing list
[email protected]
https://fedorahosted.org/mailman/listinfo/deltacloud-devel