Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🚧 🥒 Clean up some buyer steps #3852

Draft
wants to merge 17 commits into
base: master
Choose a base branch
from
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def create
@page ||= templates.build(cms_templates_params)

if @page.save
flash[:info] = 'Email Template overrided.'
flash[:info] = 'Email Template overridden.'
redirect_to action: :index
else
render :new
Expand Down
2 changes: 1 addition & 1 deletion features/api/alerts.feature
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Feature: Audience > Applications > Alerts
| Product | Name |
| API 1 | Plan 1 |
| API 2 | Plan 2 |
And a buyer "Jane" of the provider
And a buyer "Jane"
And the following applications:
| Buyer | Name | Plan |
| Jane | Application 1 | Plan 1 |
Expand Down
4 changes: 2 additions & 2 deletions features/api/services/alerts.feature
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ Feature: Product > Analytics > Alerts
And the following published application plan:
| Product | Name |
| My Product | Default |
And a buyer "Jane" of the provider
And a buyer "Bob" of the provider
And a buyer "Jane"
And a buyer "Bob"
And the following applications:
| Buyer | Name | Plan |
| Jane | Jane App | Default |
Expand Down
2 changes: 1 addition & 1 deletion features/asset_host/asset_host.feature
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Feature: Asset host
Rule: Developer
Background:
Given a provider exists
And the provider has one buyer
And a buyer "Buyer Bob"

Scenario: Developer portal with asset host not configured
Given the asset host is unset
Expand Down
2 changes: 1 addition & 1 deletion features/buyers/accounts/billing_status.feature
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Feature: Admin Portal Buyer's Billing Status
And the following application plan:
| Product | Name | Default | Cost per month |
| My API | Gold | true | 100 |
And an approved buyer "John" signed up to the provider
And an approved buyer "John"
And the following application:
| Buyer | Name |
| John | My App |
Expand Down
2 changes: 1 addition & 1 deletion features/buyers/accounts/bulk_operations.feature
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Feature: Buyer accounts bulk operations

Rule: Single account plan
Background:
Given a buyer "Alice" of the provider
Given a buyer "Alice"

Scenario: Bulk operations does not include "Change account plan"
Given the provider has "account_plans" switch allowed
Expand Down
4 changes: 2 additions & 2 deletions features/buyers/accounts/edit.feature
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Feature: Audience > Accounts > Edit

Background:
Given a provider is logged in
And a buyer "Pepe" of the provider
And a buyer "Pepe"

Scenario: Navigation
Given they go to the provider dashboard
Expand All @@ -26,7 +26,7 @@ Feature: Audience > Accounts > Edit
Then field "Organization/Group Name" has inline error "can't be blank"

Scenario: Deleting an account
Given a buyer "Deleteme" of the provider
Given a buyer "Deleteme"
When they go to the buyer account edit page for "Deleteme"
And follow "Delete" and confirm the dialog
Then the current page is the buyer accounts page
Expand Down
6 changes: 3 additions & 3 deletions features/buyers/accounts/index.feature
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ Feature: Audience > Accounts
And should see "Add your first account"

Scenario: Provider has one account plan only
Given a buyer "Alice" of the provider
Given a buyer "Alice"
When they go to the buyer accounts page
Then the table does not have a column "Plan"

Scenario: Provider has multiple applications disabled
Given a buyer "Pepe" of the provider
Given a buyer "Pepe"
And the default product of the provider has name "The API"
And the following application plan:
| Product | Name | Default |
Expand All @@ -26,7 +26,7 @@ Feature: Audience > Accounts
Then the table don't have a column "Apps"

Scenario: Provider has multiple applications enabled
Given a buyer "Pepe" of the provider
Given a buyer "Pepe"
And the default product of the provider has name "The API"
And the following application plan:
| Product | Name | Default |
Expand Down
2 changes: 1 addition & 1 deletion features/buyers/accounts/show.feature
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Feature: Buyer account overview
Background:
Given a provider is logged in
And the provider has "account_plans" allowed
And an approved buyer "Bob Buyer" signed up to the provider
And an approved buyer "Bob Buyer"

Scenario: Sending a message
Given buyer "Bob Buyer" has no messages
Expand Down
2 changes: 1 addition & 1 deletion features/developer_portal/admin/account/invoices.feature
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Feature: Dev Portal Buyer Invoices
And the following application plan:
| Product | Name | Default | Cost per month |
| My API | Gold | true | 100 |
And an approved buyer "John" signed up to the provider
And an approved buyer "John"
And the following application:
| Buyer | Name |
| John | My App |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Feature: Dev Portal Buyer Payment Details
And the following application plan:
| Product | Name | Default | Cost per month |
| My API | Gold | true | 100 |
And an approved buyer "John" signed up to the provider
And an approved buyer "John"
And the following application:
| Buyer | Name |
| John | My App |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Feature: Dev Portal Buyer Personal Details
And the following application plan:
| Product | Name | Default | Cost per month |
| My API | Gold | true | 100 |
And an approved buyer "John" signed up to the provider
And an approved buyer "John"
And the following application:
| Buyer | Name |
| John | My App |
Expand Down
2 changes: 1 addition & 1 deletion features/developer_portal/authentication/sso_token.feature
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Feature: SSO Token
Background:
Given a provider "foo.3scale.localhost"
And provider "foo.3scale.localhost" has multiple applications enabled
And a buyer "bob" signed up to provider "foo.3scale.localhost"
And a buyer "bob"
And the current domain is foo.3scale.localhost

Scenario: Buyer can't login with an invalid token
Expand Down
14 changes: 7 additions & 7 deletions features/developer_portal/buyer_password_reset.feature
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Feature: Buyer password reset

Rule: Reset password flow for different scenarios
Background:
Given a buyer "bob" signed up to the provider
Given a buyer "bob"
And an active user "zed" of account "bob" with email "[email protected]"
And the current domain is foo.3scale.localhost
And they go to the login page
Expand All @@ -39,21 +39,21 @@ Feature: Buyer password reset
And they fill in "Password confirmation" with "monkey"
And they press "Change Password"
Then they should see "The password has been changed"

When they go to the login page
And they fill in "Username" with "[email protected]"
And they fill in "Password" with "monkey"
And they press "Sign in"
Then they should be logged in as "zed"

Scenario: Invalid email
Given no user exists with an email of "[email protected]"
And they follow "Forgot password?"
And they fill in "Email" with "[email protected]"
And they press "Send instructions"
Then they should see "A password reset link will be sent to [email protected] if a user exists with this email."
And "[email protected]" should receive no emails

Scenario: Wrong confirmation
Given they follow "Forgot password?"
And they fill in "Email" with "[email protected]"
Expand All @@ -64,19 +64,19 @@ Feature: Buyer password reset
And they press "Change Password"
Then they should see the password confirmation error
And the password of user "zed" should not be "monkey"

Scenario: Blank passwords
When they follow "Forgot password?"
And they fill in "Email" with "[email protected]"
And they press "Send instructions"
And they follow the link found in the password reset email send to "[email protected]"
And they press "Change Password"
Then they should see "The password is invalid"

Scenario: Invalid token
When they go to the password page with invalid password reset token
Then they should see "The password reset token is invalid"

Scenario: Attempt to login with invalid credentials, then reset password
Given they fill in "Username" with "[email protected]"
And they fill in "Password" with "ihavenoclue"
Expand Down
2 changes: 1 addition & 1 deletion features/developer_portal/login.feature
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Feature: Login feature
Background:
Given a provider "foo.3scale.localhost"
And provider "foo.3scale.localhost" has multiple applications enabled
And a buyer "bob" signed up to provider "foo.3scale.localhost"
And a buyer "bob"

@security
Scenario: Buyer can log in with csrf protection enabled
Expand Down
2 changes: 1 addition & 1 deletion features/developer_portal/xss_protection.feature
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Feature: XSS protection
And the following application plan:
| Product | Name | Default |
| My API | Default | true |
And an approved buyer "John" signed up to the provider
And an approved buyer "John"
And the following application:
| Buyer | Name |
| John | My App |
Expand Down
2 changes: 1 addition & 1 deletion features/finance/automatic_billing_postpaid.feature
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Feature: Automatic billing with plan changes on POSTPAID
And the provider is charging its buyers in postpaid mode
And the provider has "finance" visible
Given the provider service allows to change application plan directly
And the provider has one buyer
And a buyer "Bob Buyer"
And the following application plans:
| Product | Name | Cost per month |
| My API | Paid | 31 |
Expand Down
2 changes: 1 addition & 1 deletion features/finance/automatic_billing_prepaid.feature
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Feature: Automatic billing with plan changes on PREPAID
And the provider is charging its buyers in prepaid mode
And the provider has "finance" visible
Given the provider service allows to change application plan directly
And the provider has one buyer
And a buyer "Bob Buyer"
And the following application plans:
| Product | Name | Cost per month |
| My API | Paid | 31 |
Expand Down
2 changes: 1 addition & 1 deletion features/finance/contracts_invoicing.feature
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Feature: All kind of contracts are billed
And the default product of the provider has name "My API"
And the provider is charging its buyers
And the provider has "finance" visible
And the provider has one buyer
And a buyer "Bob Buyer"
And the following application plan:
| Product | Name | Cost per month |
| My API | Application Plan | 100 |
Expand Down
2 changes: 1 addition & 1 deletion features/finance/instant_bill_plan_change.feature
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Feature: Instant biling plan change feature
And the default product of the provider has name "My API"
Given all the rolling updates features are off
And I have instant_bill_plan_change feature enabled
And the provider has one buyer
And a buyer "Bob Buyer"

Scenario: Charging variable cost on plan change
Given the following application plans:
Expand Down
2 changes: 1 addition & 1 deletion features/finance/variable_cost.feature
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Feature: Variable cost on automatic billing
And the provider is billing but not charging
And the provider has "finance" visible
Given all the rolling updates features are off
And the provider has one buyer
And a buyer "Bob Buyer"
And the following application plans:
| Product | Name |
| API | VariableOnly |
Expand Down
2 changes: 1 addition & 1 deletion features/old/accounts/buyers/account_fields.feature
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Feature: Buyer side, account fields
Background:
Given a provider "foo.3scale.localhost"
And provider "foo.3scale.localhost" has multiple applications enabled
And a buyer "bob" signed up to provider "foo.3scale.localhost"
And a buyer "bob"
Given provider "foo.3scale.localhost" has the following fields defined for accounts:
| name | choices | required | read_only | hidden |
| false_field | | | | |
Expand Down
2 changes: 1 addition & 1 deletion features/old/accounts/buyers/users_fields.feature
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Feature: Buyer side, user extra fields
Background:
Given a provider "foo.3scale.localhost"
And provider "foo.3scale.localhost" has multiple applications enabled
And a buyer "bob" signed up to provider "foo.3scale.localhost"
And a buyer "bob"
Given provider "foo.3scale.localhost" has the following fields defined for users:
| name | choices | required | read_only | hidden |
| false_field | | | | |
Expand Down
4 changes: 2 additions & 2 deletions features/old/accounts/invitations.feature
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ Feature: Invitations
When I request the url of the provider new invitation page then I should see an exception

Scenario: When switch is denied as buyer
Given a buyer "apininja" signed up to provider "foo.3scale.localhost"
Given a buyer "apininja"
And provider "foo.3scale.localhost" has "multiple_users" switch denied
When I log in as "apininja" on foo.3scale.localhost
And I follow "Settings"
And I follow "Users"
Then I should not see "Invite new user"

Scenario: Sending an invitation as buyer
Given a buyer "apininja" signed up to provider "foo.3scale.localhost"
Given a buyer "apininja"
And provider "foo.3scale.localhost" has "multiple_users" switch visible
When I log in as "apininja" on foo.3scale.localhost
And I follow "Settings"
Expand Down
8 changes: 4 additions & 4 deletions features/old/authentication/internal.feature
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ Feature: Internal authentication
And I should be on the homepage

Scenario: Successful sign in as a buyer
Given a buyer "alice" signed up to provider "foo.3scale.localhost"
Given a buyer "alice"

When the current domain is foo.3scale.localhost
And I go to the login page
Expand Down Expand Up @@ -95,22 +95,22 @@ Feature: Internal authentication

@security
Scenario: Failed attempt to sign in without being activated
Given a buyer "wickedwidgets" signed up to provider "foo.3scale.localhost"
Given a buyer "wickedwidgets"
And a pending user "bob" of account "wickedwidgets"
When the current domain is foo.3scale.localhost
And I try to log in as "bob"
Then I should not be logged in

@security
Scenario: Failed attempt to sign in as user with pending account
Given a pending buyer "wickedwidgets" signed up to provider "foo.3scale.localhost"
Given a pending buyer "wickedwidgets"
When the current domain is foo.3scale.localhost
And I try to log in as "wickedwidgets"
Then I should not be logged in

@security
Scenario: Failed attempt to sign in as user with rejected account
Given a rejected buyer "wickedwidgets" signed up to provider "foo.3scale.localhost"
Given a rejected buyer "wickedwidgets"
When the current domain is foo.3scale.localhost
And I try to log in as "wickedwidgets"
Then I should not be logged in
4 changes: 2 additions & 2 deletions features/old/authorization/provider_accounts.feature
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Feature: Provider accounts authorization
Given a provider "foo.3scale.localhost"
And provider "foo.3scale.localhost" has Browser CMS activated
Given provider "foo.3scale.localhost" has multiple applications enabled
And a buyer "buyer" signed up to provider "foo.3scale.localhost"
And a buyer "buyer"

Scenario: Provider admin can access accounts
Given current domain is the admin domain of provider "foo.3scale.localhost"
Expand Down Expand Up @@ -90,7 +90,7 @@ Feature: Provider accounts authorization
And user "member" has access to the admin section "partners"
And current domain is the admin domain of provider "foo.3scale.localhost"
And provider "foo.3scale.localhost" has "multiple_users" switch allowed
Given a pending buyer "pending account" signed up to provider "foo.3scale.localhost"
Given a pending buyer "pending account"

When I log in as provider "member"
And I follow "2 Accounts"
Expand Down
6 changes: 3 additions & 3 deletions features/old/buyers/accounts/approving.feature
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@ Feature: Approving buyer account
And the provider requires accounts to be approved

Scenario: Approving a single buyer account
Given a pending buyer "bob" signed up to provider "foo.3scale.localhost"
Given a pending buyer "bob"
When I go to the buyer account page for "bob"
And I press "Approve"
Then buyer "bob" should be approved

Scenario: Approve button is not shown for already approved accounts
Given an approved buyer "bob" signed up to provider "foo.3scale.localhost"
Given an approved buyer "bob"
When I go to the buyer account page for "bob"
Then I should not see button to approve buyer "bob"

Scenario: Approve button is not shown for rejected accounts
Given a rejected buyer "bob" signed up to provider "foo.3scale.localhost"
Given a rejected buyer "bob"
When I go to the buyer account page for "bob"
Then I should not see button to approve buyer "bob"
2 changes: 1 addition & 1 deletion features/old/buyers/accounts/deleting.feature
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Feature: Deleting buyer account
Background:
Given a provider is logged in on 1st January 2011
And the provider has multiple applications enabled
And a buyer "bob" signed up to provider "foo.3scale.localhost"
And a buyer "bob"

Scenario: Deleting buyer account from the account summary page
When I go to the buyer account page for "bob"
Expand Down
Loading