This commit is contained in:
TheNetsky
2023-09-26 12:04:34 +02:00
parent c802492f18
commit 2291245657
7 changed files with 128 additions and 47 deletions

View File

@@ -47,10 +47,12 @@ export async function doQuiz(page: Page, data: PromotionalItem | MorePromotion)
}
}
// Click the answers
for (const answer of answers) {
await wait(2000)
// Click the answer on page
await quizPage.click(answer)
await wait(1500)
const refreshSuccess = await waitForQuizRefresh(quizPage)
if (!refreshSuccess) {
@@ -72,7 +74,7 @@ export async function doQuiz(page: Page, data: PromotionalItem | MorePromotion)
if (dataOption === correctOption) {
// Click the answer on page
await quizPage.click(`#rqAnswerOption${i}`)
await wait(1500)
await wait(2000)
const refreshSuccess = await waitForQuizRefresh(quizPage)
if (!refreshSuccess) {
@@ -88,6 +90,7 @@ export async function doQuiz(page: Page, data: PromotionalItem | MorePromotion)
}
// Done with
await wait(2000)
await quizPage.close()
log('QUIZ', 'Completed the quiz successfully')
} catch (error) {