forked from aws-amplify/amplify-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: headless auth required attributes must be an array (aws-amplify#…
- Loading branch information
1 parent
c9bc207
commit d17e67b
Showing
6 changed files
with
59 additions
and
6 deletions.
There are no files selected for viewing
6 changes: 3 additions & 3 deletions
6
...s__/provider-utils/core-questions.test.js → ...question-factories/core-questions.test.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
...__/provider-utils/awscloudformation/utils/__snapshots__/auth-request-adaptor.test.ts.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`get add auth request adaptor valid translations translates request with minimal user pool config only 1`] = ` | ||
Object { | ||
"adminQueries": false, | ||
"adminQueryGroup": undefined, | ||
"authProviders": Array [], | ||
"authSelections": "userPoolOnly", | ||
"autoVerifiedAttributes": Array [], | ||
"identityPoolName": undefined, | ||
"mfaConfiguration": "OFF", | ||
"requiredAttributes": Array [ | ||
"email", | ||
], | ||
"resourceName": "myTestAuth", | ||
"serviceName": "Cognito", | ||
"thirdPartyAuth": false, | ||
"updateFlow": "manual", | ||
"useDefault": "manual", | ||
"userPoolGroupList": Array [], | ||
"userPoolGroups": false, | ||
"userPoolName": undefined, | ||
"usernameAttributes": Array [ | ||
"email", | ||
], | ||
"userpoolClientReadAttributes": Array [], | ||
"userpoolClientRefreshTokenValidity": undefined, | ||
"userpoolClientWriteAttributes": Array [], | ||
} | ||
`; |
23 changes: 23 additions & 0 deletions
23
...ry-auth/src/__tests__/provider-utils/awscloudformation/utils/auth-request-adaptor.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { AddAuthRequest, CognitoUserPoolSigninMethod, CognitoUserProperty } from 'amplify-headless-interface'; | ||
import { getAddAuthRequestAdaptor } from '../../../../provider-utils/awscloudformation/utils/auth-request-adaptors'; | ||
|
||
describe('get add auth request adaptor', () => { | ||
describe('valid translations', () => { | ||
it('translates request with minimal user pool config only', () => { | ||
const addAuthRequest: AddAuthRequest = { | ||
version: 1, | ||
resourceName: 'myTestAuth', | ||
serviceConfiguration: { | ||
serviceName: 'Cognito', | ||
userPoolConfiguration: { | ||
signinMethod: CognitoUserPoolSigninMethod.EMAIL, | ||
requiredSignupAttributes: [CognitoUserProperty.EMAIL], | ||
}, | ||
includeIdentityPool: false, | ||
}, | ||
}; | ||
|
||
expect(getAddAuthRequestAdaptor('javascript')(addAuthRequest)).toMatchSnapshot(); | ||
}); | ||
}); | ||
}); |
2 changes: 1 addition & 1 deletion
2
...er-utils/trigger-flow-auth-helper.test.js → ...on/utils/trigger-flow-auth-helper.test.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters