Skip to content

Commit ae75cc5

Browse files
jlledomclaude
andcommitted
Fix tests
Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 514377f commit ae75cc5

File tree

88 files changed

+1271
-523
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

88 files changed

+1271
-523
lines changed

.gitleaks.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[allowlist]
2+
description = "Global Allowlist"
3+
4+
# Ignore based on any subset of the file path
5+
paths = [
6+
'''test/unit/authentication/by_password_test.rb''',
7+
'''test/integration/admin/api/buyers_users_controller_test.rb'''
8+
]

features/buyers/accounts/new.feature

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ Feature: Audience > Accounts > New
3535
Scenario: Fields validation
3636
Given they go to the new buyer account page
3737
When the form is submitted with:
38-
| Username | u |
39-
| Email | invalid |
40-
| Password | p |
38+
| Username | u |
39+
| Email | invalid |
40+
| Password | superSecret1234# |
4141
| Organization/Group Name | Org |
4242
Then field "Username" has inline error "is too short"
4343
And field "Email" has inline error "should look like an email address"
@@ -63,6 +63,7 @@ Feature: Audience > Accounts > New
6363
| Organization/Group Name | Alice's Web Widget |
6464
| Country | Spain |
6565
| Fields with choices | option1 |
66+
| Password | superSecret1234# |
6667

6768
Then the current page is the buyer account page for "Alice's Web Widget"
6869
And the inverted table has the following rows within the account details card:

features/developer_portal/access_code.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ Feature: Access code
4949
@javascript
5050
Scenario: Navigate from admin portal when access code is set
5151
Given the provider logs in
52-
And they follow "Developer Portal"
52+
And they follow any "Developer Portal"
5353
When they follow "Visit Portal"
5454
Then the current domain in a new window should be foo.3scale.localhost
5555
And they should not see field "Access code"

features/developer_portal/admin/account/personal_details.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ Feature: Dev Portal Buyer Personal Details
6262
| User extra read only |
6363
| User extra hidden |
6464

65-
And fill in "Current Password" with "supersecret"
65+
And fill in "Current Password" with "superSecret1234#"
6666
And they press "Update Personal Details"
6767
Then they should see error in fields:
6868
| errors |

features/developer_portal/buyer_password_reset.feature

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,14 @@ Feature: Buyer password reset
3535
And they press "Send instructions"
3636
Then they should see "A password reset link will be sent to zed@3scale.localhost if a user exists with this email"
3737
When they follow the link found in the password reset email send to "zed@3scale.localhost"
38-
And they fill in "Password" with "monkey"
39-
And they fill in "Password confirmation" with "monkey"
38+
And they fill in "Password" with "superSecret1234#"
39+
And they fill in "Password confirmation" with "superSecret1234#"
4040
And they press "Change Password"
4141
Then they should see "The password has been changed"
4242

4343
When they go to the login page
4444
And they fill in "Username" with "zed@3scale.localhost"
45-
And they fill in "Password" with "monkey"
45+
And they fill in "Password" with "superSecret1234#"
4646
And they press "Sign in"
4747
Then they should be logged in as "zed"
4848

@@ -59,11 +59,11 @@ Feature: Buyer password reset
5959
And they fill in "Email" with "zed@3scale.localhost"
6060
And they press "Send instructions"
6161
And they follow the link found in the password reset email send to "zed@3scale.localhost"
62-
And they fill in "Password" with "monkey"
63-
And they fill in "Password confirmation" with "donkey"
62+
And they fill in "Password" with "new_password_123"
63+
And they fill in "Password confirmation" with "123_new_password"
6464
And they press "Change Password"
6565
Then they should see the password confirmation error
66-
And the password of user "zed" should not be "monkey"
66+
And the password of user "zed" should not be "new_password_123"
6767

6868
Scenario: Blank passwords
6969
When they follow "Forgot password?"

features/master/applications/keys.feature

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Feature: Application Keys management
1414
Given they are reviewing the provider's application details
1515
When follow "Regenerate"
1616
And confirm the dialog
17-
And fill in "Current password" with "supersecret"
17+
And fill in "Current password" with "superSecret1234#"
1818
And press "Confirm Password"
1919
And should see "You are now in super-user mode! Retry the action, please"
2020
And follow "Regenerate"
@@ -24,7 +24,7 @@ Feature: Application Keys management
2424
Scenario: Set a custom app key
2525
Given they are reviewing the provider's application details
2626
When follow "Set a custom User Key" within the API Credentials card
27-
And fill in "Current password" with "supersecret"
27+
And fill in "Current password" with "superSecret1234#"
2828
And press "Confirm Password"
2929
And fill in "User key" with "new-valid-key"
3030
And press "Save"

features/old/accounts/accounts.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ Feature: Account management
7070
And I navigate to the Account Settings
7171
And I go to the provider personal details page
7272
When I fill in "Email" with "invalid"
73-
And I fill in "Current password" with "supersecret"
73+
And I fill in "Current password" with "superSecret1234#"
7474
And I press "Update Details"
7575
Then I should see "should look like an email address"
7676

features/old/accounts/password_change.feature

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ Feature: Password change
77
Scenario: Provider password change
88
Given a provider is logged in
99
And I go to the provider personal details page
10-
And I fill in "New password" with "monkey"
11-
And I fill in "Current password" with "supersecret"
10+
And I fill in "New password" with "new_password_123"
11+
And I fill in "Current password" with "superSecret1234#"
1212
And I press "Update Details"
1313
And I log out
1414
And I go to the provider login page
1515
And I should see "Log in to your account"
1616
And I fill in "Email or Username" with "foo.3scale.localhost"
17-
And I fill in "Password" with "monkey"
17+
And I fill in "Password" with "new_password_123"
1818
And I press "Sign in"
1919
Then I should be logged in as "foo.3scale.localhost"

features/old/accounts/personal_details.feature

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Feature: Personal Details
1212
When I navigate to the Account Settings
1313
And I go to the provider personal details page
1414
And I fill in "Email" with "john.doe@foo.3scale.localhost"
15-
And I fill in "Current password" with "supersecret"
15+
And I fill in "Current password" with "superSecret1234#"
1616
And I press "Update Details"
1717
Then I should see "User was successfully updated"
1818
And I should be on the provider personal details page
@@ -23,15 +23,15 @@ Feature: Personal Details
2323
And I follow "foo.3scale.localhost"
2424
Then I should be on the provider personal details page
2525
When I fill in "Email" with "john.doe@foo.3scale.localhost"
26-
And I fill in "Current password" with "supersecret"
26+
And I fill in "Current password" with "superSecret1234#"
2727
And I press "Update Details"
2828
Then I should be on the provider users page
2929
When I follow "foo.3scale.localhost" within the table
3030
And I fill in "Email" with ""
31-
And I fill in "Current password" with "supersecret"
31+
And I fill in "Current password" with "superSecret1234#"
3232
And I press "Update Details"
3333
And I fill in "Email" with "john.doe@foo.3scale.localhost"
34-
And I fill in "Current password" with "supersecret"
34+
And I fill in "Current password" with "superSecret1234#"
3535
And I press "Update Details"
3636
Then I should be on the provider users page
3737
And I should see the flash message "User was successfully updated"
@@ -40,7 +40,7 @@ Feature: Personal Details
4040
When I navigate to the Account Settings
4141
And I go to the provider personal details page
4242
And I fill in "Username" with "u"
43-
And I fill in "Current password" with "supersecret"
43+
And I fill in "Current password" with "superSecret1234#"
4444
And I press "Update Details"
4545
Then field "Username" has inline error "is too short (minimum is 3 characters)"
4646

@@ -74,17 +74,26 @@ Feature: Personal Details
7474
| User extra required |
7575
When I fill in "First name" with "dude"
7676
And I fill in "User extra required" with "whatever"
77-
And I fill in "Current password" with "supersecret"
77+
And I fill in "Current password" with "superSecret1234#"
7878
And I press "Update Details"
7979
Then I should see "User was successfully updated"
8080
Then the "First name" field should contain "dude"
8181
And the "User extra required" field should contain "whatever"
8282

8383
Scenario: Update own password when the user was signed up with password
84+
Given the user was signed up with password
85+
When I navigate to the Account Settings
86+
And I go to the provider personal details page
87+
And I fill in "New password" with "superSecret1234!"
88+
And I fill in "Current password" with "superSecret1234#"
89+
And I press "Update Details"
90+
Then I should see "User was successfully updated"
91+
92+
Scenario: Update own password to a weak password
8493
Given the user was signed up with password
8594
When I navigate to the Account Settings
8695
And I go to the provider personal details page
8796
And I fill in "New password" with "hi"
88-
And I fill in "Current password" with "supersecret"
97+
And I fill in "Current password" with "superSecret1234#"
8998
And I press "Update Details"
90-
Then field "New password" has inline error "is too short (minimum is 6 characters)"
99+
Then I should see the error that the password is too weak

features/old/authentication/internal.feature

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Feature: Internal authentication
2020
And I go to the provider login page
2121
Then I should feel secure
2222
When I fill in "Username" with "foo.3scale.localhost"
23-
And I fill in "Password" with "supersecret"
23+
And I fill in "Password" with "superSecret1234#"
2424
And I press "Sign in"
2525
Then I should be logged in as "foo.3scale.localhost"
2626
And I should be on the provider dashboard
@@ -32,19 +32,19 @@ Feature: Internal authentication
3232
@javascript
3333
Scenario: Redirects and keeps full url
3434
# legal terms's url url has query_string
35-
Given the admin of account "foo.3scale.localhost" has password "foobar"
35+
Given the admin of account "foo.3scale.localhost" has password "superSecret1234#"
3636
When current domain is the admin domain of provider "foo.3scale.localhost"
3737
And I go to the legal terms settings page
3838
And I fill in "Username" with "foo.3scale.localhost"
39-
And I fill in "Password" with "foobar"
39+
And I fill in "Password" with "superSecret1234#"
4040
And I press "Sign in"
4141
Then I should have the following query string:
4242
| system_name | signup_licence|
4343

4444

4545
@javascript
4646
Scenario: Failed attempt to sign in as provider with invalid password
47-
Given the admin of account "foo.3scale.localhost" has password "foobar"
47+
Given the admin of account "foo.3scale.localhost" has password "superSecret1234#"
4848
When current domain is the admin domain of provider "foo.3scale.localhost"
4949
And I go to the provider login page
5050
And I fill in "Username" with "foo.3scale.localhost"
@@ -67,17 +67,17 @@ Feature: Internal authentication
6767
When the current domain is foo.3scale.localhost
6868
And I go to the login page
6969
And I fill in "Username" with "alice"
70-
And I fill in "Password" with "supersecret"
70+
And I fill in "Password" with "superSecret1234#"
7171
And I press "Sign in"
7272
Then I should be logged in as "alice"
7373

7474
@wip @3D
7575
Scenario: Successful sign in as master account admin
76-
Given the master account admin has username "admin" and password "supermonkey"
76+
Given the master account admin has username "admin" and password "superSecret1234#"
7777
When current domain is the admin domain of provider "foo.3scale.localhost"
7878
And I go to the provider login page
7979
And I fill in "Username" with "admin"
80-
And I fill in "Password" with "supermonkey"
80+
And I fill in "Password" with "superSecret1234#"
8181
And I press "Sign in"
8282
Then I should be logged in as "admin"
8383
And I should be on the provider dashboard
@@ -89,7 +89,7 @@ Feature: Internal authentication
8989
When current domain is the admin domain of provider "foo.3scale.localhost"
9090
And I go to the provider login page
9191
And I fill in "Username" with "foo.3scale.localhost"
92-
And I fill in "Password" with "supersecret"
92+
And I fill in "Password" with "superSecret1234#"
9393
And I press "Sign in"
9494
Then user "foo.3scale.localhost" should have last login on 8th October 2010 at 11:10 from 100.101.102.103
9595

0 commit comments

Comments
 (0)