From 1fc46dcc3669faef52fea61628568048040cc3e3 Mon Sep 17 00:00:00 2001 From: ymayarajan3 Date: Sun, 16 Jun 2024 23:33:25 -0400 Subject: [PATCH] clean up and exit --- extensions/integration_testing/node_script.ts | 2 +- extensions/integration_testing/playwright_load.ts | 14 -------------- .../integration_testing/playwright_save_all.ts | 2 +- 3 files changed, 2 insertions(+), 16 deletions(-) diff --git a/extensions/integration_testing/node_script.ts b/extensions/integration_testing/node_script.ts index d5c2fc130..4971158c7 100644 --- a/extensions/integration_testing/node_script.ts +++ b/extensions/integration_testing/node_script.ts @@ -56,7 +56,7 @@ async function runPlaywrightTasks() { await runPlaywrightScript('playwright_save_all.ts'); await runPlaywrightScript('playwright_save_combo.ts'); await runPlaywrightScript('playwright_load.ts'); - devProcess.kill(); + process.exit(0); } catch (error) { console.error('Error during Playwright tasks:', error); } diff --git a/extensions/integration_testing/playwright_load.ts b/extensions/integration_testing/playwright_load.ts index dd09b1bac..6656391be 100644 --- a/extensions/integration_testing/playwright_load.ts +++ b/extensions/integration_testing/playwright_load.ts @@ -12,20 +12,6 @@ const delay = (ms: number) => new Promise(resolve => setTimeout(resolve, ms)); }); const page = await context.newPage(); - // Navigate to 'Create' page - - // Try connecting to the server in a loop with delay -// let connected = false; -// for (let i = 0; i < 120; i++) { // Retry up to 10 times -// try { -// await page.goto('http://localhost:8602/', { waitUntil: 'networkidle', timeout: 6000 }); -// connected = true; -// break; -// } catch (e) { -// console.log('Connection failed, retrying...'); -// await delay(5000); // Wait for 5 seconds before retrying -// } -// } await page.goto('http://localhost:8602/'); await page.click('text=File'); diff --git a/extensions/integration_testing/playwright_save_all.ts b/extensions/integration_testing/playwright_save_all.ts index 2dcdb5280..a5057f228 100644 --- a/extensions/integration_testing/playwright_save_all.ts +++ b/extensions/integration_testing/playwright_save_all.ts @@ -48,7 +48,7 @@ const delay = (ms: number) => new Promise(resolve => setTimeout(resolve, ms)); // Wait for the editor to load //await page.waitForSelector('.blocklyBlockCanvas'); - await page.waitForTimeout(2000); + await page.waitForTimeout(3000); // Add the extension const addExtension = await page.$('[title="Add Extension"]'); if (addExtension) {