chore: finally made it work

Signed-off-by: blam <ben@blam.sh>
This commit is contained in:
blam
2021-10-28 18:30:33 +02:00
parent 4b2740332c
commit 03f368f740
2 changed files with 5 additions and 2 deletions
+2 -1
View File
@@ -360,7 +360,8 @@ async function testAppServe(pluginName: string, appDir: string) {
try {
browser = await puppeteer.launch();
const page = await browser.newPage();
await page.goto('http://localhost:3000');
await page.goto('http://localhost:3000', { waitUntil: 'networkidle0' });
await waitForPageWithText(page, '/', 'My Company Catalog');
await waitForPageWithText(
+3 -1
View File
@@ -138,7 +138,9 @@ export async function waitForPageWithText(
console.log(`Attempting to load page at ${path}, waiting ${waitTimeMs}`);
await new Promise(resolve => setTimeout(resolve, waitTimeMs));
await page.goto(`http://localhost:3000${path}`);
await page.goto(`http://localhost:3000${path}`, {
waitUntil: 'networkidle0',
});
const escapedText = text.replace(/"|\\/g, '\\$&');
const match = await page.evaluate(() =>