mirror of
https://github.com/aliasvault/aliasvault.git
synced 2026-03-19 15:18:02 -04:00
Update tests to wait until all password chars have been entered (#684)
This commit is contained in:
committed by
Leendert de Borst
parent
3c72fa3fde
commit
852d9b5e98
@@ -44,11 +44,14 @@ describe('FormFiller', () => {
|
||||
expect(wasTriggerCalledFor(mockTriggerInputEvents, formFields.emailConfirmField)).toBe(true);
|
||||
});
|
||||
|
||||
it('should fill password and confirmation fields', () => {
|
||||
it('should fill password and confirmation fields', async () => {
|
||||
formFields.passwordConfirmField = document.createElement('input');
|
||||
|
||||
formFiller.fillFields(mockCredential);
|
||||
|
||||
// Delay for 150ms to ensure the password field is filled as it uses a small delay between each character.
|
||||
await new Promise(resolve => setTimeout(resolve, 150));
|
||||
|
||||
expect(formFields.passwordField?.value).toBe('testpass');
|
||||
expect(formFields.passwordConfirmField?.value).toBe('testpass');
|
||||
expect(wasTriggerCalledFor(mockTriggerInputEvents, formFields.passwordField)).toBe(true);
|
||||
|
||||
Reference in New Issue
Block a user