@bigbinary/neeto-playwright-commons 1.24.5 → 1.24.7

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.
package/index.cjs.js CHANGED
@@ -123967,7 +123967,7 @@ var mainExports = requireMain();
123967
123967
  var dotenvExpand = /*@__PURE__*/getDefaultExportFromCjs(mainExports);
123968
123968
 
123969
123969
  // @ts-check
123970
- var _a, _b;
123970
+ var _a;
123971
123971
  process.env.TEST_ENV = (_a = process.env.TEST_ENV) !== null && _a !== void 0 ? _a : ENVIRONMENT.development;
123972
123972
  const env = dotenv.config({
123973
123973
  path: `./e2e/config/.env.${process.env.TEST_ENV}`,
@@ -123996,9 +123996,12 @@ const playdashLighthouseConfig = {
123996
123996
  ciBuildId: process.env.NEETO_CI_JOB_ID,
123997
123997
  tags: process.env.TAG,
123998
123998
  };
123999
- const isCI = [ENVIRONMENT.staging, ENVIRONMENT.review].includes((_b = process.env.TEST_ENV) !== null && _b !== void 0 ? _b : ENVIRONMENT.development) && !!process.env.NEETO_CI_JOB_ID;
123999
+ const isCI = neetoCist.isPresent(process.env.NEETO_CI_JOB_ID);
124000
+ const isDevEnv = process.env.TEST_ENV === ENVIRONMENT.development;
124001
+ const railsPort = process.env.RAILS_SERVER_PORT;
124002
+ const vitePort = process.env.VITE_PORT;
124000
124003
  const definePlaywrightConfig = (overrides) => {
124001
- const { globalOverrides = {}, useOverrides = {}, useCustomProjects = false, projectOverrides = [], playdashStagingOverrides = {}, playdashProductionOverrides = {}, playdashLighthouseOverrides = {}, } = overrides;
124004
+ const { globalOverrides = {}, useOverrides = {}, useCustomProjects = false, projectOverrides = [], playdashStagingOverrides = {}, playdashProductionOverrides = {}, playdashLighthouseOverrides = {}, webServerOverrides = [], } = overrides;
124002
124005
  let reporter = !ramda.isEmpty(playdashStagingOverrides)
124003
124006
  ? [
124004
124007
  [
@@ -124035,7 +124038,28 @@ const definePlaywrightConfig = (overrides) => {
124035
124038
  forbidOnly: isCI,
124036
124039
  retries: isCI ? 1 : 0,
124037
124040
  timeout: 5 * 60 * 1000,
124041
+ workers: isCI ? 6 : 5,
124038
124042
  reporter: isCI ? reporter : [["line"]],
124043
+ ...(isDevEnv && {
124044
+ webServer: [
124045
+ {
124046
+ command: `bundle exec puma -b tcp://0.0.0.0:${railsPort} -C config/puma.rb`,
124047
+ url: `http://spinkart.lvh.me:${railsPort}`,
124048
+ reuseExistingServer: !isCI,
124049
+ timeout: 5 * 60 * 1000,
124050
+ cwd: "..",
124051
+ env: { ...process.env, PORT: railsPort !== null && railsPort !== void 0 ? railsPort : "" },
124052
+ },
124053
+ {
124054
+ command: "yarn dev --host",
124055
+ url: `http://127.0.0.1:${vitePort}/@vite/client`,
124056
+ reuseExistingServer: !isCI,
124057
+ timeout: 2 * 60 * 1000,
124058
+ cwd: "..",
124059
+ },
124060
+ ...webServerOverrides,
124061
+ ],
124062
+ }),
124039
124063
  ...globalOverrides,
124040
124064
  use: {
124041
124065
  baseURL: process.env.BASE_URL,