import { createWdioCucumberAdapter } from '@qacg/qk-test-analytics/adapters/wdio-cucumber'; import { loadQkforceRunConfig } from './test/support/qkforce-config.mjs'; import { loadQkforceTestData } from './test/support/qkforce-test-data.mjs'; import { loadGeneratedWorkspace } from './test/support/qkforce-generated.mjs'; const qkforce = loadQkforceRunConfig(); loadQkforceTestData(); const generated = loadGeneratedWorkspace(); const analytics = createWdioCucumberAdapter({ capture: 'on-failure', projectName: qkforce.profile.id }); export const config: WebdriverIO.Config = { runner: 'local', tsConfigPath: './tsconfig.json', specs: generated?.specs ?? ['./test/features/**/*.feature'], maxInstances: 1, capabilities: [{ browserName: 'chrome', 'goog:chromeOptions': { args: ['--headless=new','--disable-gpu','--no-sandbox','--window-size=1440,900'] } }], logLevel: 'error', baseUrl: qkforce.run.targetUrl, waitforTimeout: 10_000, connectionRetryTimeout: 120_000, connectionRetryCount: 3, framework: 'cucumber', reporters: ['spec'], cucumberOpts: { import: generated?.imports ?? ['./test/step-definitions/**/*.ts'], language: 'en', timeout: 60_000, retry: 0, failFast: false, strict: true }, ...analytics.hooks };