https://cypress.io logo
Join Discord
Powered by
# general-chat
  • f

    few-musician-79351

    03/11/2022, 12:09 AM
    What you mean?
  • f

    few-musician-79351

    03/11/2022, 12:10 AM
    🤔
  • i

    important-river-75795

    03/11/2022, 12:11 AM
    Probobly still have your env file locally with URI defined somewhere and it is still used somewhere in the test code
  • f

    few-musician-79351

    03/11/2022, 12:15 AM
    I have only 3 tests and none use the env var 😔
  • g

    gray-kilobyte-89541

    03/11/2022, 2:46 AM

    https://www.youtube.com/watch?v=f5UaXuAc52câ–¾

  • p

    polite-alarm-78904

    03/11/2022, 8:41 AM
    I have a test that only fails in headless mode with electron. If I run the same test in chrome the test passes. What could be the reason for this?
  • f

    few-musician-79351

    03/11/2022, 2:33 PM
    Should write this env var like this or like cypress? 🤔
  • g

    gray-kilobyte-89541

    03/11/2022, 5:07 PM
    these are two different ways of putting variables into
    Cypress.env()
    object
  • f

    few-musician-79351

    03/15/2022, 2:16 PM
    Hey guys, why I get this error only in one test file?
  • f

    few-musician-79351

    03/15/2022, 2:17 PM
    In another file it doesn't happen
  • f

    few-musician-79351

    03/15/2022, 2:19 PM
    Idk why it recognizes cy like Jest when I have this on the top
  • a

    adorable-smartphone-87280

    03/15/2022, 3:22 PM
    I don't know the real answer, but if I was your IDE, I would throw errors until you moved from 4-space to 2-space indents. 🤣
  • c

    crooked-easter-63692

    03/15/2022, 4:27 PM
    hello
  • c

    crooked-easter-63692

    03/15/2022, 4:27 PM
    Has anyone renamed a screenshot taken with the cypress-plugin-snapshots
  • c

    crooked-easter-63692

    03/15/2022, 4:28 PM
    i try it so: module.exports = (on, config) => { on('after:screenshot', (details) => { const newPath = path.resolve(__dirname, '../reports/mochareports/assets/'+details.specName+'/'+details.specName+'(failed).png') fs.renameSync(details.path, newPath) return { path: newPath } }) }
  • c

    crooked-easter-63692

    03/15/2022, 4:30 PM
    the screenshots was renamed, but also i becomes this error
  • f

    few-musician-79351

    03/16/2022, 12:55 AM
    @User How can I make actions to recognize my cy.env variable? I can't make it work
  • f

    few-musician-79351

    03/16/2022, 12:55 AM
    I'm using vite btw if that helps
  • r

    rough-van-84956

    03/16/2022, 2:26 AM
    Try prefixing your variable names with
    CYPRESS_
    https://docs.cypress.io/guides/guides/environment-variables#Option-3-CYPRESS_
  • f

    few-musician-79351

    03/16/2022, 2:26 AM
    where?
  • r

    rough-van-84956

    03/16/2022, 2:28 AM
    Your second screenshot looks like a docker-compose file... try it there. The prefix is s signal to Cypress that you want that variable to be available in your test runs. > Any OS-level environment variable on your machine that starts with either CYPRESS_ or cypress_ will automatically be added to Cypress' environment variables and made available to you. > > Cypress will strip off the CYPRESS_ when adding your environment variables.
  • f

    few-musician-79351

    03/16/2022, 2:29 AM
    My second image its github actions
  • r

    rough-van-84956

    03/16/2022, 2:32 AM
    Same principle...
  • c

    crooked-easter-63692

    03/16/2022, 7:47 AM
    hello can anyone please help me
  • c

    crooked-easter-63692

    03/16/2022, 7:48 AM
    renamed a screenshot taken with the cypress-plugin-snapshots i try it so:
    Copy code
    module.exports = (on, config) => {
      on('after:screenshot', (details) => {
        const newPath = path.resolve(__dirname, '../reports/mochareports/assets/'+details.specName+'/'+details.specName+'(failed).png')
        fs.renameSync(details.path, newPath)
        return { path: newPath }
      })
    
    }
  • p

    polite-alarm-78904

    03/16/2022, 9:02 AM
    I'm writing tests for a website that has multiple modules for each customer. Some customers use just a few modules, and others have more. I'm looking for ideas on how to configure tests for each customer so that I can test just the modules they have activated. I want to be able to set some inital data for each customer, and then have cypress run the corresponding tests. Ex. customer 1 is using module A,B, C - customer 2 is using module D,E,F. Does anyone have examples of how this can be achieved?
  • o

    orange-air-51935

    03/16/2022, 11:32 AM
    I had some issues with another plugin recently with a similar error. The problem might be, that your export has to return the configuration object. Yours doesn't do that. It might be that a simple
    return config
    before the closing bracket might just solve it.
  • o

    orange-air-51935

    03/16/2022, 11:33 AM
    Copy code
    module.exports = (on, config) => {
      on('after:screenshot', (details) => {
        const newPath = path.resolve(__dirname, '../reports/mochareports/assets/'+details.specName+'/'+details.specName+'(failed).png')
        fs.renameSync(details.path, newPath)
        return { path: newPath }
      })
      return config;
    }
  • h

    handsome-cartoon-16269

    03/16/2022, 12:10 PM
    Hi all, I am new in Cypress and, I have a question that I'm not sure what is the correct answer cypress searching the element inside the DOM or in the screen? if I have cy.contains('Apply) Because of a bug in THE UI, the button is not rendered to the screen like it should (buttons overload) well, but the button exists in the DOM. Does Cypress should find the element or not?
  • o

    orange-air-51935

    03/16/2022, 2:31 PM
    Not sure if I understand your question, but there are checks for visibility of elements. https://www.tutorialspoint.com/cypress/cypress_hidden_elements.htm contains() should probably return true because the button is in the dom.
1...323334...127Latest