in it/cypress/ready.js [28:46]
async function main() {
console.log(`Waiting for Sling to start on: ${url}`);
for (let i = 0; i < 120; i++) {
try {
const res = await fetch(`${url}/system/sling/form/login`);
if (res.ok) {
const body = await res.text();
if (body.indexOf("Welcome to Apache Sling CMS") !== -1) {
console.log(`Sling started on: ${url}`);
return;
}
}
} catch (e) {}
await sleep(5000);
}
console.log("Sling failed to start in the allotted time, failing...");
throw Error(`Sling did not successfully start on URL: ${url}`);
}