mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2025-12-30 03:12:29 +00:00
test: Expect pin to have digits only, configure length. (#16670)
This commit is contained in:
@@ -12,6 +12,7 @@ const defaultExpectations = {
|
||||
* null -> if the config is enabled, assert the UI elements are displayed and the feature works.
|
||||
*/
|
||||
enabled: null,
|
||||
minPinLength: 8
|
||||
},
|
||||
iframe: {
|
||||
// Whether the iframe integration is enabled (the inverse of `disableIframeAPI` from config.js)
|
||||
|
||||
@@ -92,7 +92,10 @@ describe('Dial-in', () => {
|
||||
throw new Error('no pin');
|
||||
}
|
||||
|
||||
expect(dialInPin.length >= 8).toBe(true);
|
||||
if (!dialInPin.match(/^[0-9]+$/)) {
|
||||
throw new Error(`The dial-in PIN contains non-digit characters: ${dialInPin}`);
|
||||
}
|
||||
expect(dialInPin.length).toBeGreaterThanOrEqual(expectations.dialIn.minPinLength);
|
||||
});
|
||||
|
||||
it('skip the rest if a dial-in URL is not configured', async () => {
|
||||
|
||||
Reference in New Issue
Block a user