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

    flaky-article-23611

    09/15/2022, 10:13 AM
    Hope I'm in the right place. Since updating to 10.8.0, cy.url (or cy.location) doesn't work when I'm accessing it with use of a helper function (from the helpers.ts file). I'm using it to check iif a url is as expected with .should('eq.... ) but I get expected null to equal cy.url does work when I use it in a test file, skipping the helper function. Any ideas?
  • f

    freezing-carpenter-51131

    09/15/2022, 10:43 AM
    Help, I really need to disable the clearing of the console from cypress. Does someone know how to do that? When a test fails it clears and closes my debugger and I no longer have access to the log leading to the problem.
    p
    • 2
    • 10
  • p

    powerful-orange-86819

    09/15/2022, 10:44 AM
    use it.only for the specific test, debug it separately
  • f

    freezing-carpenter-51131

    09/15/2022, 10:45 AM
    It's not that. The test is flaky, but I cannot catch the error because my logs are already cleared when it happens.
  • p

    powerful-orange-86819

    09/15/2022, 10:45 AM
    then look for the reason for the test's flakyness
  • f

    freezing-carpenter-51131

    09/15/2022, 10:45 AM
    I need to disable all control of cypress over the browser console.
  • f

    freezing-carpenter-51131

    09/15/2022, 10:46 AM
    I know the flakyness, but I no longer have access to my log.
  • p

    prehistoric-restaurant-72560

    09/15/2022, 10:46 AM
    Help I really need to disable the
  • p

    powerful-orange-86819

    09/15/2022, 10:46 AM
    Anyone else getting cypress stuck on Initializing Config after 10.7.0?
  • f

    flaky-article-23611

    09/15/2022, 12:13 PM
    It's simpler than that. It seems I get null if I use cy.url().then(x => {}).should('eq., ....')
  • w

    witty-carpet-23820

    09/15/2022, 1:30 PM
    I am trying to install cypress on my Citrix machine using command npm install --save-dev cypress (It was working fine earlier) but now getting this error (snapshot attached for the reference),; also, the same is working fine on my Local, But there is no proxy connection I am using to access internet on my citrix machine, not sure why suddenly it is throwing proxy error, I am not able to proceed further.
  • q

    quiet-tent-87246

    09/15/2022, 1:55 PM
    I'm trying to test HTML dialog element and it doesn't work! I'm trying to test that
    esc
    key closes the dialog and it doesnt do anything... I've tried to do
    cy.get('body').type('{esc}')
  • g

    gentle-accountant-4760

    09/15/2022, 2:23 PM
    Hello people, in my e2e.ts (inside /support) I have added a
    Copy code
    ts
    beforeEach(() => {
      function setSipFeatureToggle(): void {
      localStorage.setItem('featureToggleOverrides', JSON.stringify({
        'feature-test-provider': true,
      }));
    }
    });
    however when I run my test the first time when doing cypress open, it works but then when I restart the test again, it doesn't apply the beforeEach anymore, what is the reason of that?
  • n

    nutritious-army-46708

    09/15/2022, 2:44 PM
    I need to get a string from an API, how can use cy.request(url) to get the variable? can I use: const res: string=cy.request(url)?
  • a

    acceptable-hamburger-48790

    09/15/2022, 4:12 PM
    Did you check this https://docs.cypress.io/api/commands/request#Method-URL-and-Body
  • c

    clever-table-91477

    09/15/2022, 4:13 PM
    keys didn't always work for me in the past on older version, now it's good. Never had a chance to use {esc} though. I think they have open ticket for that issue https://github.com/cypress-io/cypress/issues/21313
  • c

    clever-table-91477

    09/15/2022, 4:44 PM
    @here It's been several weeks having trouble to load Salesforce home page after login into the application. The page stays blank. Happens only in chrome/electron/edge, FF seems like working fine. I have tried various of ways: login with SOAP request, login with UI login with different URL. Each time login part goes well, but page is not loading further whatsoever. Does someone has same issue? Salesforce support team isn't helpful that much, they scratched the head and suggested to reach out Cypress community.
  • e

    eager-baker-20941

    09/15/2022, 4:44 PM
    Has anyone tried using the
    experimentalSessionAndOrigin
    feature to log in via Auth0's UI, as outlined here? https://cypress.io/blog/2022/04/25/cypress-9-6-0-easily-test-multi-domain-workflows-with-cy-origin/ In the video,
    cy.origin
    immediately invokes the callback and you can start executing commands inside the new origin context. But when I try it, cypress ends up hanging while it waits for a document load event from the Auth0 login page
    Copy code
    CypressError: Timed out after waiting `60000ms` for your remote page to load.
    Your page did not fire its `load` event within `60000ms`.
    You can try increasing the `pageLoadTimeout` value in `cypress.config.ts` to wait longer.
    Browsers will not fire the `load` event until all stylesheets and scripts are done downloading.
    When this `load` event occurs, Cypress will continue running commands.
    • 1
    • 1
  • n

    nutritious-army-46708

    09/15/2022, 5:03 PM
    Thank you!
  • p

    prehistoric-restaurant-72560

    09/15/2022, 7:28 PM
    here It s been several weeks having
  • f

    fierce-easter-87739

    09/15/2022, 9:06 PM
    Hi cypress fam! I wanted to ask here as I have not been able to find anything on gh issues, stack or various forums that I usually go and search before asking or creating issues. I realize, if, for some reason, an XHR call url is an unencoded string, cy.intercept() will not detect it. So question here is, is there way to do it but i am missing it, or it's an actual issue that needs to be reported? e.g. url: https://${appID}-dsn.algolia.net/1/indexes/*/queries?x-algolia-agent=Algolia for JavaScript (4.13.1); Browser (lite); instantsearch.js (4.43.0); react (17.0.2); react-instantsearch (6.30.0); react-instantsearch-hooks (6.30.0); JS Helper (3.10.0)&x-algolia-api-key=${publicAPIKey}&x-algolia-application-id=${applicationID} -> cy.intercept() does not match this call while it matches the following (as expected) -> https://${appID}-dsn.algolia.net/1/indexes/*/queries?x-algolia-agent=Algolia%20for%20JavaScript%20(4.13.1)%3B%20Browser%20(lite)%3B%20instantsearch.js%20(4.43.0)%3B%20react%20(17.0.2)%3B%20react-instantsearch%20(6.30.0)%3B%20react-instantsearch-hooks%20(6.30.0)%3B%20JS%20Helper%20(3.10.0)&x-algolia-api-key=${publicAPIKey}&x-algolia-application-id=${appID} any wisdom is much appreciated!
  • l

    lively-gigabyte-29944

    09/15/2022, 9:57 PM
    Hi! I recently upgraded cypress from 10.3 to 10.7. My test are running fine locally. The application I am testing is typescript and was able to previously git push just fine on 10.3. I am now getting the error with conflict between cypress and app jests unit tests. I tried to follow the workaround(https://github.com/cypress-io/cypress-and-jest-typescript-example) but still getting error when trying to push code. Can anyone help?
  • j

    jolly-afternoon-60158

    09/15/2022, 10:55 PM
    Hi My name is Mehrdad and I have a question about Cypress Cucumber Tagging I'm trying to run a specific script by using tags. I used this command npx cypress run --env tags=@e2e, but it runs all scripts. How may I be able to run a specific script? I would very much use tags Is there anybody who may be able to help me with that?
  • n

    nice-agent-16567

    09/15/2022, 11:01 PM
    Hello! We're in progress updating from Cypress 9.6.1 to 10.x (currently trying 10.7.0) and are running into test failures whenever our site tries to load a file from our
    /assets
    folder. I see by running
    DEBUG=cypress:server:routes npx cypress open
    that 10.7 is proxying all these requests and returning 404s because it looks like it has hijacked the assets route, is that something that can be changed? See top of screenshot for successful Cypress assets and bottom for our js/css files that are failing
  • l

    lively-gigabyte-29944

    09/15/2022, 11:47 PM
    GitHub - cypress-iocypress-and-jest-typ...
  • f

    few-umbrella-8290

    09/16/2022, 1:25 AM
    Hey, there is any way to send data from Cypress to New Relic?
  • s

    silly-laptop-48411

    09/16/2022, 1:53 AM
    What is the correct way (or more common way) to assert on a
    .wait('@getThing')
    when the yielded subject is an Interceptor? I want to assert on both response status, body, and request url. I saw
    cy.wait("@updateUser").its("response.statusCode").should("equal", 204);
    from Cypress RWA but I couldn't understand how to chain multiple
    .its
    or
    .should
    in this instance. Perhaps a following
    cy.get('@getThing')
    after the
    .wait
    ?
  • a

    acceptable-hamburger-48790

    09/16/2022, 3:32 AM
    I would use like this - cy.wait("@getSomething").then( (response) => { cy.log("response is", response) expect(response.status).to.be.eq(200) expect(response.body.data.package.insert.errors).to.have.length( 0 ) } )
  • s

    silly-laptop-48411

    09/16/2022, 4:07 AM
    Ok so I was doing very similar. In this scenario response is of type
    Interceptor
    so it might look like:
    Copy code
    ts
    cy.wait("@getSomething").then(interceptor => {
      expect(interceptor.response?.statusCode).to.be.eq(200);
      expect(interceptor.response?.body.data.package.insert.errors).to.have.length(0);
    }
    I noticed however that using the
    its().should()
    alternative meant I wasn't dealing with a potentially undefined value
    interceptor.response
    so I wasn't sure if I was handling it correctly.
  • p

    purple-vase-65810

    09/16/2022, 6:09 AM
    Dear Cypress community, I'm regularly experiencing what seems to be Cypress crashes in TeamCity CI with Cypress running within Docker with custom built Teamcity-Agent-Images. The process suddenly exits with
    code 1
    while running tests. The projects under test are built using a Nx monorepo and Angular
    14.2
    , and Nx-packaged Cypress
    10.8.0
    . Here's what I've tried so far: * I've checked CPU/RAM utilisation * Tried enabling
    icp="host"
    * Disabling command log * Drastically reducing the number of cached tests in memory (from 50 to 5) * Looking for more insights in the Docker container log * Switching from Electron (headless) to Chrome 104 (headless) But the build in CI always crashes during long builds in CI (after around 40 min). Locally it runs fine. The applications tested are rather memory-heavy and complex. I'm occasionally getting the following logs in CI build log:
    Copy code
    [5006:0915/130421.662619:ERROR:node_bindings.cc(276)] Most NODE_OPTIONs are not supported in packaged apps. See documentation for more details.
    [5283:0915/130425.164332:ERROR:gpu_memory_buffer_support_x11.cc(44)] dri3 extension not supported.
    Does anyone have an idea of what the underlying issue could be or how I could improve the CI builds? Thanks and best regards, Dennis
1...146147148...252Latest