Add closing tutorial video if prompted

This commit is contained in:
Veljko
2024-02-09 11:54:44 +01:00
committed by Veljko V
parent ec3ddbb6cf
commit cf3c221ebd

View File

@@ -109,11 +109,13 @@ export async function designEmailInWorkflow(page) {
await page await page
.locator('input[value="Save and continue"') .locator('input[value="Save and continue"')
.waitFor({ state: 'visible' }); .waitFor({ state: 'visible' });
try {
await page.screenshot({ await page
path: screenshotPath + `Design_Email_In_Workflow_${Math.random()}.png`, .locator('#mailpoet_modal_close')
fullPage: fullPageSet, .click({ timeout: 5000 });
}); } catch (error) {
console.log("Newsletter tutorial video wasn't present.");
}
await Promise.all([ await Promise.all([
page.waitForNavigation(), page.waitForNavigation(),