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

    fresh-doctor-14925

    12/09/2022, 11:44 AM
    is there a way to somehow check that the
  • t

    thousands-kilobyte-24794

    12/09/2022, 12:05 PM
    I have cypress 12 running in an nx workspace with Angular 15. For some reason cy.get is not working. The inspector finds the attribute or data-cy tag just fine. But it then fails at runtime. If fails in an e2e headless run as well. Any ideas?
  • f

    fresh-doctor-14925

    12/09/2022, 12:11 PM
    !moreinfo
  • n

    nutritious-analyst-96582

    12/09/2022, 12:12 PM
    Hey! You're unlikely to get an answer to this question because it is too broad and/or vague. Take a look at #how-to-get-help for some tips on how to improve your question
  • g

    gentle-branch-31208

    12/09/2022, 1:51 PM
    i want to separete cy.intercept to different it() which does not have cy.visit. Any idea?
  • g

    gentle-branch-31208

    12/09/2022, 1:51 PM
    /// describe('Test suit', () => { it('Test case', () => { cy.visit('https://example.cypress.io/commands/waiting') }); it('Test case', () => { //cy.visit('https://example.cypress.io/commands/waiting') cy.intercept('GET', 'https://jsonplaceholder.cypress.io/comments/1').as('getComment') //cy.intercept({method: 'GET', url: '/comments/*', hostname: 'https://jsonplaceholder.cypress.io',}).as('getComment') cy.get('.network-btn').click() // wait for GET comments/1 cy.wait('@getComment').its('response.statusCode').should('be.oneOf', [200, 304]) }); });
  • m

    miniature-dawn-64694

    12/09/2022, 4:12 PM
    can you share a demo repo so we can see what is going on?
  • f

    full-helmet-93291

    12/09/2022, 5:12 PM
    hi everyone! I'm trying to add a postgres DB connection to our current e2e framework. I'm currently using Cypress 11 and Typescript, so my config file is .ts. Is there any guide which I can follow to do this? Thanks in advance!
  • a

    ancient-rainbow-36271

    12/09/2022, 5:15 PM
    Hello everyone, I have built an express server that has an endpoint that accepts
    GET
    requests. When this endpoint is hit, cypress tests will start to run leveraging the power of the Cypress module API(https://docs.cypress.io/guides/guides/module-api). But there is one problem when this endpoint is hit over and over again, the tests will restart every time it is hit. I need to figure out how to know that the tests are still running so that I can block any incoming requests. Anyone with any ideas? This is how my express server file looks like
    Copy code
    const express = require("express");
    const cypress = require("cypress");
    const app = express();
    const port = 3000;
    
    app.get("/", (req, res) => {
      res.send("Tests are running!");
      cypress.run({
        reporter: "junit",
        browser: "electron",
        config: {
          video: true,
        },
      });
    });
    
    app.listen(port, () => {
      console.log(`Example app listening on port ${port}`);
    });
  • s

    stale-wire-41120

    12/09/2022, 5:39 PM
    Can someone send me the latest git repo for "how to read and write data from excel "
  • k

    kind-photographer-81911

    12/09/2022, 6:28 PM
    Hi friends. I have a test suite where maybe 1 out of 5 times the test erroneously passes because the routes/before/after hooks pass, but no test code is ran. Now I'm getting it consistently on a single test that was running 5 minutes ago. This has been an issue for us for months and I have no idea where to begin troubleshooting it. This is actually the first time I've seen the issue happen twice in a row.
  • g

    gray-kilobyte-89541

    12/09/2022, 6:33 PM
    Open the devtools console, are there any error messages there?
  • k

    kind-photographer-81911

    12/09/2022, 6:34 PM
    No, no requests in the network tab at all
  • k

    kind-photographer-81911

    12/09/2022, 6:35 PM
    one warning but no errors in console: DevTools failed to load source map: Could not load content for http://e2etest.dev.updater.com:8081/__cypress/runner/popper.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
  • k

    kind-photographer-81911

    12/09/2022, 6:39 PM
    Actually in devtools/settings if i disable "Enable JavaScript source maps", that warning goes away an the only thing in the console is the message "Console was cleared"
  • k

    kind-photographer-81911

    12/09/2022, 6:40 PM
    Actually now in network tab on rerun I have a 200 to 'tests?p=cypress/support/index.js'
  • k

    kind-photographer-81911

    12/09/2022, 6:40 PM
    I also have a 200 to 'tests?p=cypress/integration/settings/organization/member-edit.spec.ts'
  • k

    kind-photographer-81911

    12/09/2022, 6:40 PM
    which is the accurate filepath/name of my test
  • k

    kind-photographer-81911

    12/09/2022, 6:41 PM
    i have an index.js and an index.t.ds
  • k

    kind-photographer-81911

    12/09/2022, 6:42 PM
    I just turned off the import for cypress code coverage because we weren't using it and now the problem is a little more clear:
  • k

    kind-photographer-81911

    12/09/2022, 6:43 PM
    i think i just may have rubber duckied the solution
  • b

    bitter-judge-96754

    12/09/2022, 6:59 PM
    Hey All, I implemented Percy to cypress and run command on package.json with including Token but I don’t like token to add plaintext. Where can I store token and call it in package.json?
  • k

    kind-photographer-81911

    12/09/2022, 7:12 PM
    One more issue. I'm using cy.aliasQuery on a query that looks like this:
    Copy code
    {operationName: "UpsertManager",…}
    operationName
    : 
    "UpsertManager"
    query
    : 
    "mutation UpsertManager($input: UpsertManagerInput!) {
  • k

    kind-photographer-81911

    12/09/2022, 7:13 PM
    When I do the @wait on the alias, it fails because the graphql response is called immediately after a click(); and the wait takes a beat to even start. I see it as already called in my network tab. But I can't do it before the click() because the click() is what triggers the request. How do I assert on an already called graphql query?
  • s

    strong-scientist-84040

    12/09/2022, 7:19 PM
    #755913900024791046 Hello everyone, I am working on cypress and using cucumber pre processor , so far i read that scenarios can executein parallel using cypress cloud, but is it possible to run cucumber scenarios in parallel that are within same feature file ? if yes , can you please point to correct document or example. if no , is it something cypress team working on bringing in future ?
  • m

    mysterious-belgium-25713

    12/09/2022, 8:28 PM
    You can read my blog. https://dev.to/xvier/connecting-cypress-to-a-postgresql-database-3po5
  • m

    mysterious-belgium-25713

    12/09/2022, 8:29 PM
    Cucumber cypress is a custom community made plugin so this is not something that Cypress team maintain.
  • m

    mysterious-belgium-25713

    12/09/2022, 8:46 PM
    But also in java frameworks i never came across parallel runs inside feature files
  • q

    quick-scooter-78814

    12/10/2022, 6:07 PM
    #763105090679865354 Hey guys, I want to write a automation script which would check if an element is present in DOM or not and based on that It would run different tests conditionally. example: if there is no blog card in blogs index page then it would create a new blog and if it's already there then it would skip the blog creation process.
  • g

    gray-kilobyte-89541

    12/10/2022, 6:18 PM
    ok, you can do it https://github.com/bahmutov/cypress-if but if this is for creating the data, use https://github.com/bahmutov/cypress-data-session
1...225226227...252Latest