intellitester 0.2.22 → 0.2.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1023,26 +1023,44 @@ var APPWRITE_DELETE_PATTERNS = {
1023
1023
 
1024
1024
  // src/executors/web/browserOptions.ts
1025
1025
  function getBrowserLaunchOptions(options) {
1026
- return {
1027
- headless: options.headless,
1028
- args: [
1029
- // Shared memory - critical for Docker/CI, harmless locally
1030
- "--disable-dev-shm-usage",
1031
- // GPU acceleration - not needed in headless mode
1032
- "--disable-gpu",
1033
- // Reduce overhead
1034
- "--disable-extensions",
1035
- // Prevent JavaScript throttling (helps with slow page loads)
1036
- "--disable-background-timer-throttling",
1037
- "--disable-backgrounding-occluded-windows",
1038
- "--disable-renderer-backgrounding",
1039
- // Process isolation - reduces overhead for testing
1040
- "--disable-features=IsolateOrigins,site-per-process",
1041
- // Networking tweaks
1042
- "--disable-features=VizDisplayCompositor",
1043
- "--disable-blink-features=AutomationControlled"
1044
- ]
1045
- };
1026
+ const { headless, browser } = options;
1027
+ if (browser === "chromium" || !browser) {
1028
+ return {
1029
+ headless,
1030
+ args: [
1031
+ // Shared memory - critical for Docker/CI, harmless locally
1032
+ "--disable-dev-shm-usage",
1033
+ // GPU acceleration - not needed in headless mode
1034
+ "--disable-gpu",
1035
+ // Reduce overhead
1036
+ "--disable-extensions",
1037
+ // Prevent JavaScript throttling (helps with slow page loads)
1038
+ "--disable-background-timer-throttling",
1039
+ "--disable-backgrounding-occluded-windows",
1040
+ "--disable-renderer-backgrounding",
1041
+ // Process isolation - reduces overhead for testing
1042
+ "--disable-features=IsolateOrigins,site-per-process",
1043
+ // Networking tweaks
1044
+ "--disable-features=VizDisplayCompositor",
1045
+ "--disable-blink-features=AutomationControlled"
1046
+ ]
1047
+ };
1048
+ }
1049
+ if (browser === "firefox") {
1050
+ return {
1051
+ headless,
1052
+ firefoxUserPrefs: {
1053
+ // Enable JIT (disabled in automation mode by default, causes 2-4x JS slowdown)
1054
+ "javascript.options.jit": true,
1055
+ // Disable fission for stability/speed
1056
+ "fission.autostart": false,
1057
+ // Disable hardware acceleration overhead in headless
1058
+ "layers.acceleration.disabled": true,
1059
+ "gfx.webrender.all": false
1060
+ }
1061
+ };
1062
+ }
1063
+ return { headless };
1046
1064
  }
1047
1065
  function resolveEnvVars(value) {
1048
1066
  return value.replace(/\$\{(\w+)\}/g, (_, name) => process.env[name] || "");
@@ -1996,7 +2014,7 @@ var runWebTest = async (test, options = {}) => {
1996
2014
  process.on("SIGINT", cleanup);
1997
2015
  process.on("SIGTERM", cleanup);
1998
2016
  console.log(`Launching ${browserName}${headless ? " (headless)" : " (visible)"}...`);
1999
- const browser = await getBrowser(browserName).launch(getBrowserLaunchOptions({ headless }));
2017
+ const browser = await getBrowser(browserName).launch(getBrowserLaunchOptions({ headless, browser: browserName }));
2000
2018
  console.log(`Browser launched successfully`);
2001
2019
  const browserContext = await browser.newContext();
2002
2020
  const page = await browserContext.newPage();
@@ -3048,7 +3066,7 @@ async function runWorkflow(workflow, workflowFilePath, options = {}) {
3048
3066
  const browserName = options.browser ?? workflow.config?.web?.browser ?? "chromium";
3049
3067
  const headless = options.headed === true ? false : workflow.config?.web?.headless ?? true;
3050
3068
  console.log(`Launching ${browserName}${headless ? " (headless)" : " (visible)"}...`);
3051
- const browser = await getBrowser2(browserName).launch(getBrowserLaunchOptions({ headless }));
3069
+ const browser = await getBrowser2(browserName).launch(getBrowserLaunchOptions({ headless, browser: browserName }));
3052
3070
  console.log(`Browser launched successfully`);
3053
3071
  const browserContext = await browser.newContext();
3054
3072
  const page = await browserContext.newPage();
@@ -3222,5 +3240,5 @@ exports.runWorkflowWithContext = runWorkflowWithContext;
3222
3240
  exports.setupAppwriteTracking = setupAppwriteTracking;
3223
3241
  exports.startTrackingServer = startTrackingServer;
3224
3242
  exports.startWebServer = startWebServer;
3225
- //# sourceMappingURL=chunk-GCF2Q77Q.cjs.map
3226
- //# sourceMappingURL=chunk-GCF2Q77Q.cjs.map
3243
+ //# sourceMappingURL=chunk-GFN6LIOF.cjs.map
3244
+ //# sourceMappingURL=chunk-GFN6LIOF.cjs.map