MCPcopy Create free account
hub / github.com/Rello/analytics / dismissAnalyticsOnboarding

Function dismissAnalyticsOnboarding

tests/playwright/common.js:110–144  ·  view source on GitHub ↗
(page)

Source from the content-addressed store, hash-verified

108}
109
110async function dismissAnalyticsOnboarding(page) {
111 const splash = page.locator('#app-splash-screen').first();
112 const splashVisible = await splash.isVisible().catch(() => false);
113 if (splashVisible) {
114 await splash.waitFor({ state: 'hidden', timeout: 5000 }).catch(() => {});
115 }
116
117 const wizard = page.locator('#analyticsWizard').first();
118 const wizardVisible = await wizard.isVisible().catch(() => false);
119 if (!wizardVisible) {
120 return;
121 }
122
123 const wizardEnd = page.locator('#wizardEnd').first();
124 for (let index = 0; index < 8; index += 1) {
125 const endVisible = await wizardEnd.isVisible().catch(() => false);
126 if (endVisible) {
127 await wizardEnd.click();
128 await wizard.waitFor({ state: 'hidden', timeout: 10000 }).catch(() => {});
129 return;
130 }
131 const nextVisible = await page.locator('#wizardNext').first().isVisible().catch(() => false);
132 if (!nextVisible) {
133 break;
134 }
135 await page.locator('#wizardNext').first().click();
136 await page.waitForTimeout(250);
137 }
138
139 const closeVisible = await page.locator('#wizardClose').first().isVisible().catch(() => false);
140 if (closeVisible) {
141 await page.locator('#wizardClose').first().click();
142 await wizard.waitFor({ state: 'hidden', timeout: 10000 }).catch(() => {});
143 }
144}
145
146async function waitForSplashScreenHidden(page, timeout = 10000) {
147 const splash = page.locator('#app-splash-screen').first();

Callers 2

ensureAnalyticsLoadedFunction · 0.85
saveAndReloadReportFunction · 0.85

Calls 1

firstMethod · 0.80

Tested by

no test coverage detected