-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: add hint for display name at idp creation (#1222)
- Loading branch information
Showing
5 changed files
with
104 additions
and
38 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,6 +31,7 @@ import { | |
isPersonName, | ||
isSearchUserEmail, | ||
isValidAppOverviewSearch, | ||
isValidIDPName, | ||
} from './Patterns' | ||
|
||
const TESTDATA = { | ||
|
@@ -49,6 +50,24 @@ const TESTDATA = { | |
'BPNL01', | ||
], | ||
}, | ||
IDP: { | ||
valid: [ | ||
'Tractusx', | ||
'0000001234', | ||
'Tract Usx123@!', | ||
'BPN lannn', | ||
'Foo Bar@!', | ||
], | ||
invalid: [ | ||
'Foo Bar ', | ||
'Foo Bar', | ||
' FooBar', | ||
' ', | ||
'FooBar%', | ||
'FooBar$', | ||
'0000001234$%', | ||
], | ||
}, | ||
MAIL: { | ||
valid: [ | ||
'[email protected]', | ||
|
@@ -350,7 +369,6 @@ describe('Input Pattern Tests', () => { | |
expect(isClientID(expr)).toBe(false) | ||
}) | ||
}) | ||
|
||
it('Validate email search for users', () => { | ||
TESTDATA.EMAIL_SEARCH.valid.forEach((expr) => { | ||
expect(isSearchUserEmail(expr)).toBe(true) | ||
|
@@ -367,4 +385,12 @@ describe('Input Pattern Tests', () => { | |
expect(isValidAppOverviewSearch(expr)).toBe(false) | ||
}) | ||
}) | ||
it('validate idp displayName', () => { | ||
TESTDATA.IDP.valid.forEach((expr) => { | ||
expect(isValidIDPName(expr)).toBe(true) | ||
}) | ||
TESTDATA.IDP.invalid.forEach((expr) => { | ||
expect(isValidIDPName(expr)).toBe(false) | ||
}) | ||
}) | ||
}) |
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