-
Notifications
You must be signed in to change notification settings - Fork 555
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of github.com:auth0/lock into scroll-global-loc…
…k-message-into-view # Conflicts: # README.md # src/core/index.js
- Loading branch information
Showing
23 changed files
with
246 additions
and
82 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import expect from 'expect.js'; | ||
import { webAuthOverrides } from 'core/web_api/helper'; | ||
|
||
describe('webAuthOverrides', () => { | ||
it('should return overrides if any field is compatible with WebAuth', function() { | ||
expect(webAuthOverrides({ __tenant: 'tenant1', __token_issuer: 'issuer1' })).to.eql({ | ||
__tenant: 'tenant1', | ||
__token_issuer: 'issuer1' | ||
}); | ||
}); | ||
|
||
it('should omit overrides that are not compatible with WebAuth', function() { | ||
expect( | ||
webAuthOverrides({ __tenant: 'tenant1', __token_issuer: 'issuer1', backgroundColor: 'blue' }) | ||
).to.eql({ __tenant: 'tenant1', __token_issuer: 'issuer1' }); | ||
}); | ||
|
||
it('should return null if no fields are compatible with WebAuth', function() { | ||
expect(webAuthOverrides({ backgroundColor: 'blue' })).to.not.be.ok(); | ||
}); | ||
}); |
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 |
---|---|---|
|
@@ -13,6 +13,7 @@ Array [ | |
exports[`EmailPane renders correctly 1`] = ` | ||
<div | ||
data-__type="email_input" | ||
data-autoComplete={false} | ||
data-invalidHint="invalidErrorHint" | ||
data-isValid={false} | ||
data-onChange={[Function]} | ||
|
@@ -24,6 +25,7 @@ exports[`EmailPane renders correctly 1`] = ` | |
exports[`EmailPane sets \`blankErrorHint\` when username is empty 1`] = ` | ||
<div | ||
data-__type="email_input" | ||
data-autoComplete={false} | ||
data-invalidHint="blankErrorHint" | ||
data-isValid={false} | ||
data-onChange={[Function]} | ||
|
@@ -32,9 +34,22 @@ exports[`EmailPane sets \`blankErrorHint\` when username is empty 1`] = ` | |
/> | ||
`; | ||
|
||
exports[`EmailPane sets autoComplete to true when \`allowAutocomplete\` is true 1`] = ` | ||
<div | ||
data-__type="email_input" | ||
data-autoComplete={true} | ||
data-invalidHint="invalidErrorHint" | ||
data-isValid={false} | ||
data-onChange={[Function]} | ||
data-placeholder="placeholder" | ||
data-value="[email protected]" | ||
/> | ||
`; | ||
|
||
exports[`EmailPane sets isValid as true when \`isFieldVisiblyInvalid\` is false 1`] = ` | ||
<div | ||
data-__type="email_input" | ||
data-autoComplete={false} | ||
data-invalidHint="invalidErrorHint" | ||
data-isValid={true} | ||
data-onChange={[Function]} | ||
|
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
Oops, something went wrong.