1
0
mirror of https://github.com/sasjs/adapter.git synced 2026-01-14 15:40:06 +00:00

chore: fixing multiple login attempts by adding pause between calling functions

This commit is contained in:
2021-07-24 18:06:15 +02:00
parent 97a530cc66
commit ca7ee83f7f

View File

@@ -47,7 +47,9 @@ export const basicTests = (
'Should fail on first attempt and should log the user in on second attempt', 'Should fail on first attempt and should log the user in on second attempt',
test: async () => { test: async () => {
await adapter.logOut() await adapter.logOut()
await sleep(1000)
await adapter.logIn('invalid', 'invalid') await adapter.logIn('invalid', 'invalid')
await sleep(1000)
return adapter.logIn(userName, password) return adapter.logIn(userName, password)
}, },
assertion: (response: any) => assertion: (response: any) =>
@@ -176,3 +178,7 @@ export const basicTests = (
} }
] ]
}) })
const sleep = (ms: number) => {
return new Promise(resolve => setTimeout(resolve, ms));
}