Skip to content

Commit 0a2a12d

Browse files
committed
Update README with integration testing notes
1 parent 30a23f5 commit 0a2a12d

File tree

1 file changed

+28
-1
lines changed

1 file changed

+28
-1
lines changed

packages/auth/README.md

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ firebase emulators:exec --project foo-bar --only auth "yarn test:integration:loc
5454

5555
### Integration testing with the production backend
5656

57-
Currently, MFA TOTP tests only run against the production backend (since they are not supported on the emulator yet).
57+
Currently, MFA TOTP and password policy tests only run against the production backend (since they are not supported on the emulator yet).
5858
Running against the backend also makes it a more reliable end-to-end test.
5959

6060
The TOTP tests require the following email/password combination to exist in the project, so if you are running this test against your test project, please create this user:
@@ -71,6 +71,33 @@ curl -H "Authorization: Bearer $(gcloud auth print-access-token)" -H "Conten
7171
}'
7272
```
7373

74+
The password policy tests require a tenant configured with a password policy that requires all options to exist in the project.
75+
76+
If you are running this test against your test project, please create the tenant and configure the policy with the following curl command:
77+
78+
```
79+
curl -H "Authorization: Bearer $(gcloud auth print-access-token)" -H "Content-Type: application/json" -H "X-Goog-User-Project: ${PROJECT_ID}" -X POST https://identitytoolkit.googleapis.com/v2/projects/${PROJECT_ID}/tenants -d '{
80+
"displayName": "passpol-tenant",
81+
"passwordPolicyConfig": {
82+
"passwordPolicyEnforcementState": "ENFORCE",
83+
"passwordPolicyVersions": [
84+
{
85+
"customStrengthOptions": {
86+
"minPasswordLength": 8,
87+
"maxPasswordLength": 24,
88+
"containsLowercaseCharacter": true,
89+
"containsUppercaseCharacter": true,
90+
"containsNumericCharacter": true,
91+
"containsNonAlphanumericCharacter": true
92+
}
93+
}
94+
]
95+
}
96+
}'
97+
```
98+
99+
Replace the tenant ID `passpol-tenant-d7hha` in `test/integration/flows/password_policy.test.ts` with the ID for the newly created tenant. The tenant ID can be found at the end of the `name` property in the response and is in the format `passpol-tenant-xxxxx`.
100+
74101
### Selenium Webdriver tests
75102

76103
These tests assume that you have both Firefox and Chrome installed on your

0 commit comments

Comments
 (0)