https://cypress.io logo
Join DiscordCommunities
Powered by
# general-chat
  • w

    wooden-advantage-64510

    05/20/2021, 1:02 PM
    https://docs.cypress.io/guides/guides/command-line - (note the double /guides)
  • w

    wooden-advantage-64510

    05/20/2021, 1:03 PM
    OH, it's only when I click in navigation, that's interesting
  • w

    wooden-advantage-64510

    05/20/2021, 1:03 PM
    direct links work.
  • b

    bulky-sundown-74498

    05/20/2021, 1:03 PM
    @User this sounds like a Nuxt quirk
  • w

    wooden-advantage-64510

    05/20/2021, 1:03 PM
    https://docs.cypress.io/guides/overview/why-cypress - I click on Guides -> Command line
  • w

    wooden-advantage-64510

    05/20/2021, 1:04 PM
    404
  • u

    user

    05/20/2021, 1:05 PM
    I'll check it out, thanks
  • r

    rough-fish-62491

    05/20/2021, 2:37 PM
    Hi, I’m doing cypress code coverage for nuxt. I implemented Istanbul and nyc but is still missing something
  • r

    rough-fish-62491

    05/20/2021, 2:37 PM
    Some of you can recommend me a guide?
  • b

    bulky-sundown-74498

    05/20/2021, 2:38 PM
    That is possible indeed, could we move this convo to #755921440359841852 or #755913900024791046 ?
  • f

    future-journalist-95278

    05/20/2021, 6:59 PM
    Whoops, I assumed this was for general Cypress questions. I'll repost it over there.
  • a

    alert-photographer-39416

    05/20/2021, 7:34 PM
    Hey guys. Not sure the best channel for this question, so if I need to move it, just let me know. I have an application built using NextJs, and I am trying to now set up Github Actions for Cypress. It's running, but the only test case that passes is the test that involves the login page. Any test beyond logging in fails, and I assume this is because the application is never making it past the login page when running. My way to do this when running the tests locally is to set an env variable of IS_TEST_MODE = true, which logs the user in with a hardcoded UN and PW instead of Okta 2FA. Since I am new to both Github Actions an Cypress, I am not confident where I am going wrong.
  • b

    bulky-sundown-74498

    05/20/2021, 7:35 PM
    this indeed looks like an e2e question for #755913900024791046 šŸ˜‰
  • a

    alert-photographer-39416

    05/20/2021, 7:35 PM
    okay ill move it over there! thanks!
  • m

    magnificent-rose-67179

    05/27/2021, 1:02 PM
    Hello all šŸ™‚
  • m

    magnificent-rose-67179

    05/27/2021, 1:03 PM
    How are you handling your tsconfig when using cypress in VSCode ? We use --isolatedModules in our main tsconfig but most e2e cypress tests doesn't import/export things so TS isn't really happy
  • m

    magnificent-rose-67179

    05/27/2021, 1:03 PM
    Our workaround is to export an empty object
  • m

    magnificent-rose-67179

    05/27/2021, 1:04 PM
    I know I can make a dedicated tsconfig for cypress, but then the issue will be that vscode will still pick our main tsconfig.json for its feedback
  • m

    magnificent-rose-67179

    05/27/2021, 1:05 PM
    as we collocate the tests with the components/screens under test we can't apply two tsconfigs šŸ˜…
  • f

    flat-electrician-52949

    05/27/2021, 1:26 PM
    I followed a lot of guides that also added the
    tsconfig
    inside of cypress. In the beginning I was doing some includes and then going one level up - it was not working. Then I just tried to drop it from the cypress folder and it worked just fine
  • f

    flat-electrician-52949

    05/27/2021, 1:27 PM
    Copy code
    json
    {
      "compilerOptions": {
        "target": "es5",
        "downlevelIteration": true,
        "lib": ["dom", "dom.iterable", "esnext"],
        "allowJs": true,
        "skipLibCheck": true,
        "strict": false,
        "forceConsistentCasingInFileNames": true,
        "noEmit": true,
        "esModuleInterop": true,
        "module": "esnext",
        "moduleResolution": "node",
        "resolveJsonModule": true,
        "isolatedModules": true,
        "jsx": "preserve",
        "baseUrl": ".",
        "paths": {
          "~/*": ["*"]
        },
        "types": [
          "cypress",
          "@testing-library/cypress",
          "cypress-localstorage-commands",
          "cypress-plugin-stripe-elements"
        ]
      },
      "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
      "exclude": ["node_modules"]
    }
  • f

    flat-electrician-52949

    05/27/2021, 1:27 PM
    in my root folder
  • f

    flat-electrician-52949

    05/27/2021, 1:27 PM
    cypress.json
    Copy code
    json
    {
      "baseUrl": "http://localhost:3000",
      "viewportWidth": 1000,
      "viewportHeight": 660,
      "integrationFolder": "cypress/tests",
      "component": {
        "testFiles": "!(node_modules|cypress)/**/*.spec.{js,ts,jsx,tsx}",
        "componentFolder": "./"
      },
      "chromeWebSecurity": false,
      "experimentalStudio": true,
      "$schema": "https://on.cypress.io/cypress.schema.json"
    }
  • f

    flat-electrician-52949

    05/27/2021, 1:28 PM
    this setup allows me to run both normal cypress and component testing cypress with typescript
  • m

    magnificent-rose-67179

    05/27/2021, 3:53 PM
    @User Isn't VSCode complaining when you open a spec file?
  • m

    magnificent-rose-67179

    05/27/2021, 3:53 PM
    As it relies on your root tsconfig.json to do TS background type checking on the opened file?
  • m

    magnificent-rose-67179

    05/27/2021, 3:54 PM
    I understand it works at the CLI level, but in my case it gives me false positive in VScode :p
  • f

    flat-electrician-52949

    05/27/2021, 3:57 PM
    What type of complaining are you seeing?
  • m

    magnificent-rose-67179

    05/27/2021, 3:58 PM
    In e2e tests we don't necessarely import/export things
  • m

    magnificent-rose-67179

    05/27/2021, 3:58 PM
    so with isolatedModules: true in the tsconfig it complains
1...789...127Latest