Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Report failed to Render #35

Closed
ge-infosec opened this issue Nov 20, 2023 · 1 comment
Closed

Report failed to Render #35

ge-infosec opened this issue Nov 20, 2023 · 1 comment

Comments

@ge-infosec
Copy link

ge-infosec commented Nov 20, 2023

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
Copy link
Member

duplicate of #20

@AutomatedTester AutomatedTester closed this as not planned Won't fix, can't repro, duplicate, stale Jun 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants