-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FeatureToggle] Add new autofill config for partial save trigger (#724)
* fix: call credentials flow call first, and then close parent * chore: move partial save behind feature toggle * refactor: add feature toggle to support apple-only * chore:PR comments
- Loading branch information
Showing
17 changed files
with
144 additions
and
78 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -61,15 +61,15 @@ describe('Can strip phone formatting characters', () => { | |
|
||
describe('prepareFormValuesForStorage()', () => { | ||
describe('handling credentials', () => { | ||
it('accepts for username only', () => { | ||
it('rejects for username only', () => { | ||
const values = prepareFormValuesForStorage({ | ||
credentials: { username: '[email protected]' }, | ||
// @ts-ignore | ||
creditCards: {}, | ||
// @ts-ignore | ||
identities: {}, | ||
}); | ||
expect(values.credentials?.username).toBe('[email protected]'); | ||
expect(values.credentials).toBeUndefined(); | ||
}); | ||
it('accepts password only', () => { | ||
const values = prepareFormValuesForStorage({ | ||
|
@@ -93,5 +93,19 @@ describe('prepareFormValuesForStorage()', () => { | |
}); | ||
expect(values.credentials).toEqual(inputCredentials); | ||
}); | ||
it('accepts username only with partial_form_saves feature', () => { | ||
const inputCredentials = { username: '[email protected]' }; | ||
const values = prepareFormValuesForStorage( | ||
{ | ||
credentials: inputCredentials, | ||
// @ts-ignore | ||
creditCards: {}, | ||
// @ts-ignore | ||
identities: {}, | ||
}, | ||
true, | ||
); | ||
expect(values.credentials).toEqual(inputCredentials); | ||
}); | ||
}); | ||
}); |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.