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

    helpful-tent-74010

    09/01/2022, 5:06 AM
    i.e
    <ParentComponent><Child-1 /><Child-2 /></ParentComponent>
    If I want to mock Child-2 while running component test, whats the best way to do it.
  • m

    most-jackal-31319

    09/01/2022, 6:10 AM
    Hi! How can I test my react app in mobile view with Cypress? I do not mean viewports but actually changing the cursor to be "touch" like in mobile? The reason I want to do this is because my MUI components are changed when the cursor is mobile it seems. And I want to run some tests for that. To clarify, I want the same functionality in Cypress as this button does in the browser:
  • t

    thankful-vegetable-38026

    09/01/2022, 6:51 AM
    i'm guessing there is just nobody that could help me?
  • d

    delightful-microphone-80931

    09/01/2022, 10:03 AM
    Hi All, how do we manage VPN access with Cypress or Cypress Experimental Studio?
  • d

    delightful-microphone-80931

    09/01/2022, 10:16 AM
    Hi @fresh-doctor-14925 , will it be enough to locally be connected to the VPN in order to connect to the website through Cypress?
  • a

    astonishing-postman-6253

    09/01/2022, 11:03 AM
    I have a question about dynamic tests with Cypress. We have many micro frontends that utilize the same React components. We covered one of the apps with dynamic tests, which is terrific, so we would like to share our dynamic tests between them. Did anyone have any experience with that? I would be happy to see an example.
  • g

    gentle-dress-1046

    09/01/2022, 12:49 PM
    Hi, I have a question about component testing, we just upgrade to cypress 10 and wanted to try component testing. Im having a problem with with linking cypress with the angular project, basically, My project structure is like this:
    Copy code
    - test (cypress)
    - web
      - client(angular project)
    When I try to run cypress component tests it cant find the project root directory because it searches for in only from the
    Test
    folder, so I tried to configure it through the config like this:
    Copy code
    options: {
      projectConfig: {
      root: '../web',
      sourceRoot: 'client/src'
    }
    that fixes the couldn't find the angular project, but gives me other errors related to
    buildOptions
    parameter, so basically if I want to override the sourceRoot and root I also need to provide buildOptions which is a huge object that I'm not sure how to handle, does anyone had something similar and can help?
  • a

    aloof-caravan-18471

    09/01/2022, 1:25 PM
    Hi everyone, I'm trying to integrate Cypress to my CI and everything is working great except for the browser language. I run my test using
    cypress run --browser chrome
    and I want the browser to use French. I tried many after googled it but I can't make it works. Here's my current setup :
    Copy code
    js
    cy.visit('/', {
          onBeforeLoad(win) {
            Object.defineProperty(win.navigator, 'language', { value: 'fr-FR' });
            Object.defineProperty(win.navigator, 'languages', { value: ['fr'] });
            Object.defineProperty(win.navigator, 'accept_languages', {
              value: ['fr'],
            });
          },
          headers: {
            'Accept-Language': 'fr',
          },
        });
    But still got this error :
  • s

    stale-optician-85950

    09/01/2022, 2:07 PM
    Have you tried this: https://glebbahmutov.com/blog/cypress-tips-and-tricks/#control-navigatorlanguage
  • a

    aloof-caravan-18471

    09/01/2022, 2:34 PM
    Yes i already tried it
  • a

    average-train-81585

    09/01/2022, 5:15 PM
    httpscypress tipscoursesnetwork testing
  • m

    most-jackal-31319

    09/02/2022, 3:57 AM
    How can I test simulate mobile in cypress for my react app? Im not talking about the viewport but the pointer being mobile, because this changes how my component library renders components
  • m

    most-jackal-31319

    09/02/2022, 4:07 AM
    also is there a way to choose pointer for the cypress test? Right now cypress chooses pointer: fine but I dont want it because its a desktop app
  • s

    stale-optician-85950

    09/02/2022, 6:09 AM
    By launching Cypress with a mobile user-agent https://glebbahmutov.com/blog/mobile-tests/
  • f

    fierce-beach-68131

    09/02/2022, 8:44 AM
    Hi. How to use " should("be.visible).and("contain.text",elementName) " as a custom command?
  • a

    adorable-nest-81107

    09/02/2022, 9:22 AM
    Hi there Preface this message saying I'm usually a backend guy but after changing some CI stuff, I ended up debugging Cypress issues. :D So very very new to Cypress but well-versed with JS outside of that. I want a little sanity check here please. Our tests currently are kind of a pain to debug in CI. A lot of the times, the error message gets swallowed and doesn't make it to the results. I understood that Cypress has an internal work-queue to solve async stuff and thus we don't need async/await. However, I think that when defining commands, we should still handle async ourselves, right? I've refactored one of our commands from a callback/then.catch approach into async/await (diff in screenshot) and that did help a lot with the error reporting. Is this the proper way to do it? When using
    cy.<something>()
    we should NOT use async/await (as Cypress' internal work queue handles it) When creating our own commands, we SHOULD use async/await Thanks!
  • s

    stale-optician-85950

    09/02/2022, 10:41 AM
    What have you tried from the documentation examples? https://docs.cypress.io/api/cypress-api/custom-commands
  • t

    thankful-vegetable-38026

    09/02/2022, 12:46 PM
    How would i get the current step/test name in commands?
  • a

    acceptable-hamburger-48790

    09/02/2022, 12:48 PM
    https://docs.cypress.io/api/cypress-api/currenttest#Syntax
  • t

    thankful-vegetable-38026

    09/02/2022, 12:50 PM
    I,,, 've been trying that and now it suddenly works??? I don't understand code
  • t

    thankful-vegetable-38026

    09/02/2022, 12:51 PM
    well then, surprised that it works now and thx!
  • g

    gray-kilobyte-89541

    09/02/2022, 2:07 PM
    you are refactoring Node code in the plugins/config file - that can use async/await, anything really, since this is not a Cypress test. It is more like backend for the test runner. https://glebbahmutov.com/blog/powerful-cy-task/
  • a

    adorable-nest-81107

    09/02/2022, 2:08 PM
    Awesome, thank you!
  • p

    proud-hydrogen-75341

    09/02/2022, 2:32 PM
    Is there a way to configure where the
    component-index.html
    file is located for component testing or does it have to be in the cypress/support folder?
  • p

    proud-hydrogen-75341

    09/02/2022, 7:59 PM
    Is there a way to use Quasar plugin options with a custom mount command in Cypress component testing?
    • 1
    • 2
  • p

    polite-room-86985

    09/02/2022, 9:32 PM
    Hi. I would like to delete my cypress Dashboard account and I receive an Internal server error. can someone please help?
  • p

    polite-room-86985

    09/02/2022, 9:33 PM
    Used to submit tests without the account and would like to be able to do that again. Don't want to use record. Have old tests would like to run again. Please help
  • p

    polite-room-86985

    09/02/2022, 9:34 PM
    Deleted the projects but cannot delete the account. Have nothing in the account I want to use. Just want to be able to use cypress like I used to
  • p

    polite-room-86985

    09/02/2022, 9:37 PM
    Do I need to uninstall and reinstall Cypress - will that do it?
  • u

    user

    09/03/2022, 12:16 PM
    Hi
1...139140141...252Latest