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

    mammoth-animal-54787

    07/08/2022, 5:34 PM
    Because I see .should('not.exist')
  • m

    mammoth-animal-54787

    07/08/2022, 5:34 PM
    but that's ironic because cy.get('element that no longer exists') fails
  • m

    mammoth-animal-54787

    07/08/2022, 5:34 PM
    because it can't get such element that no longer exists
  • m

    mammoth-animal-54787

    07/08/2022, 5:35 PM
    What is my options here?
  • m

    mammoth-animal-54787

    07/08/2022, 5:35 PM
    I want it to pass if it can't get
  • m

    mammoth-animal-54787

    07/08/2022, 5:36 PM
    Like is cypress broken or?
  • e

    echoing-painting-40909

    07/08/2022, 5:54 PM
    That's not what I'm reading from your error message:
    but it was continuously found
    .
  • m

    mammoth-animal-54787

    07/08/2022, 6:02 PM
    There is no way
  • m

    mammoth-animal-54787

    07/08/2022, 6:02 PM
    I memoized the figure
  • m

    mammoth-animal-54787

    07/08/2022, 6:02 PM
    So, it is not memoizing it correctly
  • m

    mammoth-animal-54787

    07/08/2022, 6:02 PM
    NICE
  • m

    mammoth-animal-54787

    07/08/2022, 6:02 PM
    THIS IS WRONG
  • m

    mammoth-animal-54787

    07/08/2022, 6:02 PM
    beforeEach is not working correctly then
  • b

    better-ghost-75015

    07/08/2022, 6:14 PM
    Hey guys I recently started using cypress but am facing a weird issue i am trying to visit my localhost then my applications start to call auth url and our backend url - when i am using cy.open() => our backend url is not called and if i changed any character in the super-domain, it gets called ( does our backend domain restricted to be called ?? ) - and when using cy.run => it gets called but with 401 even i am setting cookies manually before visiting - if i tried to cy.request that url, it works perfectly Does anyone have something about that as i am blocked Thanks
  • m

    mammoth-animal-54787

    07/08/2022, 6:54 PM
    intercept not working, cannot wait on a xhr request
  • g

    gray-kilobyte-89541

    07/08/2022, 8:26 PM
    do you have a reproducible example?
  • d

    damp-artist-40731

    07/09/2022, 7:33 PM
    Hi All, what strategies does your team currently us to keep fixture data fresh/in sync with BE schema changes? We currently don't have OpenAPI or any type generator yet.
  • r

    rich-pharmacist-74804

    07/11/2022, 9:28 AM
    Actually what I want is a little different from the video tutorial. I have multiple environments so I dont want to have in url in cypress.config.js file. I want to export CYPRESS_BASE_URL=... But below in my code I want to replace Cypress.env('url') and that is where I stuck.
    Copy code
    Cypress.Commands.add('login', (userType, email) => {
      cy.visit('/auth');
      const types = {
        admin: {
          email: 'email',
          password: 'password'
        },
        sales: {
          email: 'email',
          password: 'password'
        },
        newUser: {
          email: email,
          password: 'password'
        }
      };
      const user = types[userType];
      cy.dataCy('email').find('input').clear().type(user.email);
      cy.dataCy('password').find('input').clear().type(user.password);
      cy.btnName('login');
      cy.notification('Signed in successfully');
      cy.request({
        method: 'POST',
        url: Cypress.env('url'),
        body: {
          user: { email: user.email, password: user.password, recaptcha: null, remember_me: true }
        }
      }).then(data => {
        const { headers } = data;
        cy.storeData('token', `{
         "token": "${headers.authorization}" ,
         "name": "${data.body.data.attributes.name}",
         "role": "${data.body.data.attributes.role_name}",
         "userType": "${data.body.data.attributes.user_type}"
         }`);
      });
  • p

    powerful-orange-86819

    07/11/2022, 10:08 AM
    why are you going to the page? Just use the api, make the calls without redirecting to the url, also i'd recommend declaring the env in the begining like:
    Copy code
    js
    Cypress.Commands.add("userLogin", (username, password) => {
      const env = Cypress.env(); // THIS IS HOW I DELCARE env, then accesss it with env.something
      Cypress.log({ Name: "Generating token for user: " + username });
      const options = {
        method: "POST",
        url: env.apiUrl,
        body: {
          username,
          password,
        },
      };
      cy.request(options).then((response) => {
        env.tokens[username] = response.body.access_token;
        Cypress.env(env);
      });
    });
  • h

    hallowed-florist-3643

    07/11/2022, 11:10 AM
    Hi everyone. Can you help me with this error? It appears when I try to upload a HEIF/HEIC image.
  • b

    bright-park-76512

    07/11/2022, 11:58 AM
    Hi anyone facing below issue when trying to do cypress run in Jenkins. dri3 extension not supported. Cypress 10.3.0
  • f

    fierce-judge-97877

    07/11/2022, 12:37 PM
    Hello! I updated cypress from v6 to v10. Right now all my tests which are in e2e/folder 1 and in e2e/folder 2 are skipped. Any Idea how I can make them run? I'm catching my ears in cypress.config.js
  • h

    hallowed-florist-3643

    07/11/2022, 1:55 PM
    I believe it is a file naming issue.
  • f

    flaky-tiger-25074

    07/11/2022, 2:39 PM
    Hey all.. I am having an annoying issue with cypress. I am trying to set the baseurl, but it doesn't work.. I just get randomly port generated.
  • f

    flaky-tiger-25074

    07/11/2022, 2:40 PM
    Copy code
    import { defineConfig } from "cypress";
    
    export default defineConfig({
      e2e: {
        baseUrl: "http://localhost:3000/#/",
      },
    });
  • f

    flaky-tiger-25074

    07/11/2022, 2:42 PM
    cy.visit('/') returns random port eg. http://localhost:55249/
  • g

    gray-kilobyte-89541

    07/11/2022, 2:43 PM
    Have you tried
    http://localhost:3000
    ?
  • f

    flaky-tiger-25074

    07/11/2022, 2:44 PM
    yes, i did. It doesn't still work
  • r

    rich-pharmacist-74804

    07/12/2022, 6:06 AM
    I am going to the page for entering the email and password. After login, I save the user detail (name, role, etc..) in a JSON file and later I use those data if required.
  • b

    bright-park-76512

    07/12/2022, 7:21 AM
    You've entered an invalid browser name. Error while trying to do npx cypress run --browser puppeteer. Any idea on this ? I'm using Cypress 10.3.0 Previous versions didn't had this issue
1...656667...192Latest