0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2025-01-06 20:40:08 -05:00

test: add delay before clicking switch mfa factors link (#4840)

This commit is contained in:
Xiao Yijun 2023-11-08 10:41:05 +08:00 committed by GitHub
parent f694256461
commit f2a3f7e01f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,4 +1,4 @@
import { cls } from '#src/utils.js';
import { cls, waitFor } from '#src/utils.js';
import ExpectExperience from './expect-experience.js';
@ -25,6 +25,8 @@ export default class ExpectMfaExperience extends ExpectExperience {
}
async toClickSwitchFactorsLink({ isBinding }: { isBinding: boolean }) {
// Wait for the page to be fully rendered otherwise sometimes the link is rendered but not clickable.
await waitFor(500);
await this.toClick(
'a',
isBinding ? 'Switch to another method' : 'Try another method to verify'