https://cypress.io logo
Join Discord
Powered by
# help
  • s

    shy-iron-48463

    06/09/2022, 2:59 PM
    Hey Team. I've run into a bizarre issue that I don't know how to resolve. In a local development environment I set up a function to get auth and save to session to run my e2e tests. The issue is that it works in the development environment, but cannot find the elements on staging, even though they are the exact same. ``` getAuth(email, password): AuthenticationToken { const args = {email: email, password: password} cy.session(args, () => { cy.visit(Cypress.env('homeUrl')) cy.contains('Log in').click() cy.origin( 'https://login.auth0app.com/', { args: args }, ({email, password}) => { cy.get('#1-email').type(email) cy.get('[name="password"]').type(password) cy.get('button[type="submit"]').first().click() } ) }) return this }
  • m

    microscopic-coat-47591

    06/09/2022, 4:28 PM
    Hi Everyone could anyone help me with locating time slot from calendar
  • b

    bland-hospital-64234

    06/09/2022, 4:29 PM
    Thanks a lot, I will look into it!
  • r

    rough-sugar-96535

    06/09/2022, 5:04 PM
    How do you store api keys for running cypress locally without them being hardcoded/on local
  • g

    gray-kilobyte-89541

    06/09/2022, 5:43 PM
    https://glebbahmutov.com/blog/keep-passwords-secret-in-e2e-tests
  • d

    dry-agency-21242

    06/09/2022, 7:30 PM
    Hi! I'm using Cypress 5.6 in my github action and I'm using the config "video=true". There is a video present after my test, but if I upload it as an artifact and try to open it on my machine, an error occurs. And I can see in the logs of my action that the video processing was finished after 0 seconds. So there is some problem. Any idea what to do?
  • b

    big-garden-69373

    06/09/2022, 8:37 PM
    Hi! I'm trying to run cypress test on teamcity in parallel is that possible?
  • a

    abundant-dress-88149

    06/10/2022, 1:19 AM
    do you know how to return a fixture depending on the request payload using intercept?
  • a

    abundant-dress-88149

    06/10/2022, 1:20 AM
    for example
    Copy code
    if (req.body.param === 'A') { 
       return 'fixtureA';
    }
  • g

    gray-kilobyte-89541

    06/10/2022, 2:22 AM
    You would load / import all the fixtures and have cy.intercept with a callback with this logic, I should add an example to https://cypress.tips/courses
  • p

    proud-table-33604

    06/10/2022, 5:38 AM
    Hi, I am using cypress 9.6.0. We are using courier service in our application and somehow cypress is rendering courier. There were no changes in the courier code recently but when I run any cypress tests the courier window appears on every page. The tests are failing because of this. This started happening out of nowhere. Can someone please help me out here? How do I resolve this issue?
  • p

    proud-table-33604

    06/10/2022, 5:39 AM
    PS: This issue is not seen in normal browser, just in cypress
  • a

    adventurous-postman-3917

    06/10/2022, 6:32 AM
    Hi Daksha, it seems that it is an iFrame, if yes (the element is inside tag), you should get iFrame first and then try to interact with any element inside that. There are some workarounds on this, you can read about it on the cypress blog: https://www.cypress.io/blog/2020/02/12/working-with-iframes-in-cypress/ Also, there is a plugin names
    cypress-iframe
    that will help as well. https://www.npmjs.com/package/cypress-iframe
  • f

    flaky-airport-12178

    06/10/2022, 6:44 AM
    Thanks for sharing. But how to get the value in shadow dome? For example
  • p

    proud-table-33604

    06/10/2022, 8:28 AM
    Thanks for the help. I will try this.🙂
  • d

    damp-lunch-77700

    06/10/2022, 9:04 AM
    Hi All im facing issue with 401 authentication Image can u help me how to solve this do we need any permission or access to work with ?
  • d

    damp-lunch-77700

    06/10/2022, 9:05 AM
    please help me how to authenticate this
  • d

    damp-lunch-77700

    06/10/2022, 9:05 AM
    im completely blocked
  • w

    wooden-teacher-96595

    06/10/2022, 9:05 AM
    hey all, I just installed the updated @faker-js/faker package via yarn and now I keep getting webpack compilation errors . I do not have any webpack compilations set up on my side though is there something that needs to be amended for a cypress one?
  • d

    damp-lunch-77700

    06/10/2022, 9:09 AM
    401.2 - Unauthorized: Access is denied due to server configuration. You do not have permission to view this directory or page using the credentials that you supplied because your Web browser is sending a WWW-Authenticate header field that the Web server is not configured to accept.
  • d

    damp-lunch-77700

    06/10/2022, 9:09 AM
    how to solve this
  • p

    purple-kilobyte-85592

    06/10/2022, 10:41 AM
    How do I solve this? I have already installed webpack but it isn't working
  • a

    average-fountain-87572

    06/10/2022, 11:12 AM
    Hi all! How do you tag your test suites? I would like to get a way to run different smoke tests and nightly tests for example. I've tried couple of ways but didn't manage to get them working.
  • b

    brash-tiger-52405

    06/10/2022, 11:32 AM
    HI all, i just want to open a new url in incognito modus, but clicking on the href, deletes the subdirectory of the url. Can u help me to solve this?
  • g

    gray-kilobyte-89541

    06/10/2022, 11:54 AM
    I have a couple of videos about it that you can find from https://cypress.tips/search
  • g

    gray-kilobyte-89541

    06/10/2022, 11:56 AM
    https://github.com/cypress-io/cypress-grep https://glebbahmutov.com/blog/tag-tests/ and I will talk about it at the upcoming https://front-endtestfest.com/fur
  • a

    average-fountain-87572

    06/10/2022, 12:02 PM
    Thanks! I did read your page today but had some kind of problem that cypress-grep didn't work right away. It might have something to do with Typescript. I actually just managed to get something working with the help from here: https://medium.com/nerd-for-tech/running-a-subset-of-cypress-tests-using-grep-and-test-tags-394dac8b700e Thanks for the link to the test fest, I will have to check it out! 🙂
  • g

    green-lifeguard-11615

    06/10/2022, 2:31 PM
    Hey, is there a way to skip whole integration under condition like an env var? I am writing a test, that only works in certain environments.
    Copy code
    js
    describe('Integration', function () {
      
      beforeAll(() => {
        if (process.env.RUN_SPECIAL_INTEGRATION !== 'true') /* cy.skipIntegration() */
      })
    
      it('should not run if RUN_SPECIAL_INTEGRATION isn\'t true', function () {
        / ...
      })
    })
  • g

    green-lifeguard-11615

    06/10/2022, 2:33 PM
    nvm, I found the same stackoverflow question https://stackoverflow.com/questions/54530318/skipping-a-test-in-cypress-conditionally
  • w

    wooden-teacher-96595

    06/10/2022, 2:54 PM
    I have managed to get past this issue. The solution was by implementing and modifying some requirements to better fit v10 of the application https://www.npmjs.com/package/@cypress/webpack-preprocessor
1...818283...252Latest