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

    enough-truck-68085

    11/18/2022, 6:33 PM
    Can you try
    cy.intercept('GET', '/data/pacing?**').as('pacingRequest');
    You don't need to specific a glob pattern before
    /data
    to match on your base url. https://docs.cypress.io/api/commands/intercept#Matching-url
  • s

    square-honey-48197

    11/18/2022, 6:34 PM
    Good to know! That did not work either, I'm only seeing that it didn't b/c the
    routes
    at the top of the command pane is showing 0 matches:
  • s

    square-honey-48197

    11/18/2022, 6:41 PM
    @enough-truck-68085 Thank you, you solved it for me. The intercept was happening one step too late in my spec. ❤️ 🎉
  • s

    square-honey-48197

    11/18/2022, 6:41 PM
    This discord is so cool 🥰
  • h

    happy-dinner-13480

    11/18/2022, 7:37 PM
    I have this in a test:
    Copy code
    typescript
    cy.el('inputEmailAddress').type('********@**.com');
    cy.el('inputPassword').type('******');
    just to test if the user can log in, but sometimes on the CI Cypress will type the password in the same input as the email address. Does Cypress not wait for a
    type
    command to finish before moving to the next command?
  • g

    gray-kilobyte-89541

    11/18/2022, 7:41 PM
    Watch the free lesson here https://cypress.tips/courses/cypress-plugins/lessons/le42lu32af it explains your problem
  • h

    happy-dinner-13480

    11/18/2022, 8:45 PM
    Is it possible to get the value of a password field, or length?
  • g

    gray-kilobyte-89541

    11/18/2022, 9:57 PM
    yes, are you trying to assert something?
  • b

    big-sundown-77934

    11/18/2022, 10:05 PM
    I upgraded to Fedora 37 today. That installed Node.js 18.7.0. And that resolved my issue
  • a

    acceptable-fall-11897

    11/19/2022, 4:14 AM
    I want to run command for delete data from MongoDB after my all test suite finished in all parallel machines in gitlab I tried: npx cypress run --parallel --recorded && cypress/filename.cy.js
  • b

    bored-coat-44991

    11/19/2022, 7:00 AM
    each time i open cypress, the cpu usage is 100%. (i use macOs 2GHz core intel core i5, 16GB)
  • s

    stale-wire-41120

    11/19/2022, 3:26 PM
    I need help showing this error
  • s

    stale-wire-41120

    11/19/2022, 3:45 PM
    how to solve this issue
    • 1
    • 1
  • s

    stale-wire-41120

    11/19/2022, 3:51 PM
    I need help showing this error
  • n

    nice-controller-92461

    11/19/2022, 6:19 PM
    Hi, I am trying to automate my website using cypress. My problem Statement is Url : www.abc.com After entering credentials, it is redirected to different url Url 2: www.def.com I tried multiple ways, but facing cross origin resource error. How can I resolve this error. Kindly suggest
  • m

    mysterious-belgium-25713

    11/19/2022, 6:20 PM
    Using cypress origin
  • m

    mysterious-belgium-25713

    11/19/2022, 6:20 PM
    https://docs.cypress.io/api/commands/origin
  • n

    nice-controller-92461

    11/19/2022, 6:22 PM
    Yes, I tried, but when I am giving experimentalSessionAndOrigin as true in cypress.config.js, I am facing error as experimentalSessionAndOrigin to be set on executing my tests on using cy.origin
  • m

    mysterious-belgium-25713

    11/19/2022, 6:23 PM
    Did you set it in the e2e part of tye cypress.config.js
  • n

    nice-controller-92461

    11/19/2022, 6:26 PM
    Yes, I tried inside e2e as well as outside.. I have used 2 it block 1. In first it block i am visiting url www.xyz.com 2. In 2nd it block, I am visiting another url www.abc.com which is getting navigated to www.def.com where I am facing issue.
  • n

    nice-controller-92461

    11/19/2022, 6:36 PM
    @mysterious-belgium-25713 any help will be appreciated 👍
  • m

    mysterious-belgium-25713

    11/19/2022, 7:26 PM
    So this is an example that is working for me. This is my config file.
    Copy code
    js
    const { defineConfig } = require("cypress");
    
    module.exports = defineConfig({
      e2e: {
        experimentalSessionAndOrigin: true,
        setupNodeEvents(on, config) {
          // implement node event listeners here
        },
      },
    });
    And this is my test file.
    Copy code
    js
    describe('empty spec', () => {
      it('passes', () => {
        cy.visit('https://example.cypress.io')
        cy.origin('https://the-internet.herokuapp.com/', () => {
          cy.visit('https://the-internet.herokuapp.com/')
          cy.contains('Checkboxes').click()
        })
      })
    })
  • m

    mysterious-belgium-25713

    11/19/2022, 7:27 PM
    See if you can get this to work first
  • m

    mysterious-belgium-25713

    11/19/2022, 7:27 PM
    Then if that works and your test still doesnt, then maybe you can share your code
  • b

    bitter-judge-96754

    11/19/2022, 9:02 PM
    Hey all, i integrated lighthouse to Cypress but It only runs in headless chrome mode. How to fix this issue? And i'm also getting Lighthouse scores different between local run and cypress-audit. How to fix that?
  • a

    acceptable-fall-11897

    11/20/2022, 3:47 AM
    After completing all test suite in parallel. After this I want to run only one command to delete data from MongoDB??????
  • e

    eager-zoo-47289

    11/20/2022, 10:07 AM
    Hey everyone, i'm using Cypress for a long time now. we switched to Next.js framework and now we have problems that cypress throws an - TypeError: fetch is not a function worth mention that we're not really using fetch inside cypress tests, it's something that Next.js probably uses. Has anyone faced this? i'm really stuck with this as it breaks my tests on production 😦
  • k

    kind-artist-92362

    11/20/2022, 3:10 PM
    why these aliases displayed in different color
  • r

    rough-jordan-79228

    11/20/2022, 5:58 PM
    @gray-kilobyte-89541 Im importing my command.ts into my index.js - then i import all my files i have into commands.ts - the file where i wrote the function is imported in my commands.ts but I still cant use the function -> it says: "convertToNumber is not defined" you have an idea why? Thanks in advance.
  • g

    gray-kilobyte-89541

    11/20/2022, 8:39 PM
    ? I am sorry I don't understand the question
1...147148149...192Latest