https://cypress.io logo
Join Discord
Powered by
# e2e-testing
  • s

    stocky-dream-36427

    05/14/2021, 2:51 AM
    The DEBUG=cypress:* logs don't seem to be here. Could you pipe them to a file and then upload them?
    DEBUG=cypress:* yarn cypress run > logs.txt
  • p

    purple-afternoon-2408

    05/14/2021, 2:51 AM
    it's done. I am still troubleshooting, based on the source code of cypress:
    Copy code
    cy.task('coverageReport', null, {
          timeout: dayjs.duration(3, 'minutes').asMilliseconds(), // I thought that this is the issue here
          log: false
        }).then((coverageReportFolder) => {
          logInstance.set('consoleProps', () => ({
            'coverage report folder': coverageReportFolder
          }))
          logInstance.end()
          return coverageReportFolder
        })
  • s

    stocky-dream-36427

    05/14/2021, 2:52 AM
    Alright. I was worrying it was related to the size of the code you're trying to cover or the bundler setup (babel, etc)
  • p

    purple-afternoon-2408

    05/14/2021, 2:52 AM
    @User , then I did start cypress with the debug, and I noticed:
    Copy code
    cypress:server:task run task coverageReport with arg null +105ms
      cypress:server:plugins plugin event registered? { event: 'task', isRegistered: true } +4s
      cypress:server:plugins execute plugin event 'task' Node 'v14.15.1' with args: 'coverageReport' null undefined +1ms
  • s

    stocky-dream-36427

    05/14/2021, 2:52 AM
    So I would suggest creating a minimal example on Github and if it's reproducible there, it'll be easier for us to debug if it's an issue within Cypress.
  • s

    stocky-dream-36427

    05/14/2021, 2:52 AM
    That's fine. That's normal.
  • s

    stocky-dream-36427

    05/14/2021, 2:52 AM
    That just means cy.task was received by the Cypress server.
  • p

    purple-afternoon-2408

    05/14/2021, 2:53 AM
    @User Yes, but it says the coverage report is
    null
    which apparently is from http://localhost:4200/__coverage__
  • s

    stocky-dream-36427

    05/14/2021, 2:53 AM
    Yeah, so i don't think istanbul is configured
  • p

    purple-afternoon-2408

    05/14/2021, 2:54 AM
    So my assumption here is that it times out when it keeps getting
    null
    for a certain period (which is actually
    null
    )
  • p

    purple-afternoon-2408

    05/14/2021, 2:54 AM
    Is that right?
  • s

    stocky-dream-36427

    05/14/2021, 2:54 AM
    I'm not sure. Gleb wrote that plugin and I haven't looked at it deeply. Seemingly I should.
  • s

    stocky-dream-36427

    05/14/2021, 2:54 AM
    one second.
  • s

    stocky-dream-36427

    05/14/2021, 2:54 AM
    Hello! We haven't looked at making Vite x Code Coverage work yet 😦
  • p

    purple-afternoon-2408

    05/14/2021, 2:55 AM
    Ok, let me please ask you few questions, you could maybe help me think this better.
  • s

    stocky-dream-36427

    05/14/2021, 2:55 AM
    Yes please, go for it.
  • s

    stocky-dream-36427

    05/14/2021, 2:55 AM
    Do you have a GH repo with a reproduction? I can debug it there if you have something for me.
  • s

    stocky-dream-36427

    05/14/2021, 2:56 AM
    It's likely not even your application code. It's probably just your build tools and dependencies, so I'd likely take my repo, delete most of the code inside of it except for the build tooling, and some minimal code and a single test
  • p

    purple-afternoon-2408

    05/14/2021, 2:56 AM
    Unfortunately not, as it's a huge project. But you can try to instrument https://github.com/Angular-RU/universal-starter or https://github.com/rangle/angular-ssr - any Angular SSR project
  • s

    stocky-dream-36427

    05/14/2021, 2:56 AM
    Do those have the same issues?
  • p

    purple-afternoon-2408

    05/14/2021, 2:57 AM
    They would probably, there is a problem that I am getting, if I go http://localhost:4200 and then in the console window, I write
    window.__coverage__
    , i'd see the coverage data
  • s

    stocky-dream-36427

    05/14/2021, 2:57 AM
    Oh ok. So you have it on the window
  • p

    purple-afternoon-2408

    05/14/2021, 2:57 AM
    Yes
  • s

    stocky-dream-36427

    05/14/2021, 2:57 AM
    Heh. OK.
  • s

    stocky-dream-36427

    05/14/2021, 2:57 AM
    Can we pair?
  • p

    purple-afternoon-2408

    05/14/2021, 2:57 AM
    But
    https://localhost:4200/__coverage__
    is
    { coverage: null }
  • s

    stocky-dream-36427

    05/14/2021, 2:57 AM
    OH
  • s

    stocky-dream-36427

    05/14/2021, 2:58 AM
    oh
  • p

    purple-afternoon-2408

    05/14/2021, 2:58 AM
    Sure, we can pair
  • s

    stocky-dream-36427

    05/14/2021, 2:59 AM
    Yeah this is interesting for me because I haven't worked in that plugin a lot and it's something i'm going to have to get used to 🙂
12345...192Latest