-
Notifications
You must be signed in to change notification settings - Fork 7
Home
Loïk Fekkaï edited this page Feb 4, 2023
·
3 revisions
- Create a Cognito User Pool
- Add an app client, making sure to enable
ALLOW_USER_PASSWORD_AUTH
auth flow. Store this client ID in the environment variableCOGNITO_CLIENT_ID
. - Create groups in the pool:
dolphin
,manta
, andshark
. - Create a user (ex.
user@example.com
). Store the credentials inCOGNITO_USER_EMAIL
andCOGNITO_USER_PASSWORD
. - Create a user (ex.
flipper@example.com
) and add to groupdolphin
. Store the credentials inFLIPPER_EMAIL
andFLIPPER_PASSWORD
. - Create a user (ex.
ray@example.com
) and add to groupmanta
. Store the credentials inRAY_EMAIL
andRAY_PASSWORD
. - Create a user (ex.
blue@example.com
) and add to groupshark
. Store the credentials inBLUE_EMAIL
andBLUE_PASSWORD
.
Set COGNITO_REGION
with the AWS region in which you created your user pool.
That's done ! Now let's go to create users and group used by e2e tests !
Perfect ! There is one last step missing to be able to run the test !
COGNITO_CLIENT_ID=YOUR_COGNITO_APPLICATION_CLIENT
COGNITO_REGION=COGNITO_REGION
COGNITO_USER_POOL_ID=USER_POOL_ID
FLIPPER_EMAIL=flipper@dolphin.com
FLIPPER_PASSWORD=password
BLUE_EMAIL=blue@shark.com
BLUE_PASSWORD=password
MOBY_EMAIL=moby@whale.com
MOBY_PASSWORD=password
RAY_EMAIL=ray@manta.com
RAY_PASSWORD=password
COGNITO_USER_EMAIL=user@mail.com
COGNITO_USER_EMAIL_ADMIN=admin@mail.com
COGNITO_USER_PASSWORD=password
COGNITO_USER_PASSWORD_ADMIN=password
npm run test