nightwatchjs / html-reporter

Nightwatch HTML Reporter
MIT License
3 stars 22 forks source link

Report failed to Render #35

Closed goktugerol-dev closed 3 months ago

goktugerol-dev commented 10 months ago

Attempting to configure Nightwatch for the first time, I haven't written any tests yet and want to use the default sample test on Chrome for my Vue/TypeScript project. I've successfully generated a report but am having difficulty viewing the index.html file properly. Can someone help me?


Error Details

  TypeError: Cannot read properties of undefined (reading 'files')
    at EA (http://localhost:5500/vueapp/tests_output/nightwatch-html-report/index.html:121:14809)
    at TA (http://localhost:5500/vueapp/tests_output/nightwatch-html-report/index.html:121:15213)
    at Kr (http://localhost:5500/vueapp/tests_output/nightwatch-html-report/index.html:68:19518)
    at Qh (http://localhost:5500/vueapp/tests_output/nightwatch-html-report/index.html:70:43960)
    at Yh (http://localhost:5500/vueapp/tests_output/nightwatch-html-report/index.html:70:39724)
    at Wb (http://localhost:5500/vueapp/tests_output/nightwatch-html-report/index.html:70:39652)
    at ee (http://localhost:5500/vueapp/tests_output/nightwatch-html-report/index.html:70:39506)
    at cn (http://localhost:5500/vueapp/tests_output/nightwatch-html-report/index.html:70:35874)
    at Gh (http://localhost:5500/vueapp/tests_output/nightwatch-html-report/index.html:70:34825)
    at x (http://localhost:5500/vueapp/tests_output/nightwatch-html-report/index.html:55:1537)
Nightwatch Report ```json ```
My nightwatch.conf.ts file: ``` module.exports = { src_folders: ["./src"], page_objects_path: [], custom_commands_path: ['nightwatch/custom-commands'], custom_assertions_path: ['nightwatch/custom-assertions'], plugins: ['@nightwatch/vue'], globals_path: 'nightwatch/globals.js', vite_dev_server: { start_vite: false }, webdriver: {}, test_workers: { enabled: true, workers: 'auto' }, test_settings: { default: { disable_error_log: false, launch_url: `http://localhost:${process.env.CI ? '4173' : '5173'}`, screenshots: { enabled: false, path: 'screens', on_failure: true }, desiredCapabilities: { browserName: 'firefox' }, webdriver: { start_process: true, server_path: '' } }, safari: { desiredCapabilities: { browserName: 'safari', alwaysMatch: { acceptInsecureCerts: false } }, webdriver: { start_process: true, server_path: '' } }, firefox: { desiredCapabilities: { browserName: 'firefox', alwaysMatch: { acceptInsecureCerts: true, 'moz:firefoxOptions': { args: [ // '-headless', // '-verbose' ] } } }, webdriver: { start_process: true, server_path: '', cli_args: [ // very verbose geckodriver logs // '-vv' ] } }, chrome: { desiredCapabilities: { browserName: 'chrome', 'goog:chromeOptions': { // More info on Chromedriver: https://sites.google.com/a/chromium.org/chromedriver/ // // w3c:false tells Chromedriver to run using the legacy JSONWire protocol (not required in Chrome 78) w3c: true, args: [ //'--no-sandbox', //'--ignore-certificate-errors', //'--allow-insecure-localhost', //'--headless' ] } }, webdriver: { start_process: true, server_path: '', cli_args: [ // --verbose ] } }, edge: { desiredCapabilities: { browserName: 'MicrosoftEdge', 'ms:edgeOptions': { w3c: true, // More info on EdgeDriver: https://docs.microsoft.com/en-us/microsoft-edge/webdriver-chromium/capabilities-edge-options args: [ //'--headless' ] } }, webdriver: { start_process: true, // Download msedgedriver from https://docs.microsoft.com/en-us/microsoft-edge/webdriver-chromium/ // and set the location below: server_path: '', cli_args: [ // --verbose ] } } } } ```
My tsconfig.json file: ``` { "files": [], "compilerOptions": { "target": "esnext", "module": "esnext", "moduleResolution": "node", "strict": true, "jsx": "preserve", "esModuleInterop": true, "skipLibCheck": true, "forceConsistentCasingInFileNames": true, "allowSyntheticDefaultImports": true, "isolatedModules": true, "lib": ["dom", "dom.iterable", "esnext"], "types": ["vite/client", "vue", "@types/node"] }, "include": ["src/**/*.d.ts", "src/**/*.ts", "src/**/*.tsx", "src/**/*.vue"], "exclude": ["node_modules"], "references": [ { "path": "./tsconfig.node.json" }, { "path": "./tsconfig.app.json" }, { "path": "./tsconfig.vitest.json" }, { "path": "./nightwatch/tsconfig.json" } ] } ```
AutomatedTester commented 3 months ago

duplicate of #20