test: Expect pin to have digits only, configure length. (#16670)

This commit is contained in:
bgrozev
2025-11-18 12:00:06 -06:00
committed by GitHub
parent 2f6b6ca837
commit d72114d5bc
2 changed files with 5 additions and 1 deletions

View File

@@ -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)

View File

@@ -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 () => {