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

    handsome-telephone-90688

    05/19/2022, 12:33 PM
    i need help that how to avoid opening a new tab in cypress, just want to open the new link in the same window.
  • b

    blue-bird-1589

    05/19/2022, 12:34 PM
    you can use this if the href has a - target=_blank att cy.get('').invoke('removeAttr', 'target').click()
  • h

    handsome-telephone-90688

    05/19/2022, 12:36 PM
    M using cy.get("locator").invoke('removeAttr', 'target').click() @blue-bird-1589
  • h

    handsome-telephone-90688

    05/19/2022, 12:51 PM
    helpp/........
  • h

    hundreds-spring-479

    05/19/2022, 2:16 PM
    Hi everyone! I'm having this exact same issue https://github.com/cypress-io/cypress/issues/9265 which was supposed to be fixed a while ago. In my case, it is running on Electron v94 with Cypress v9.5.3. Any ideas on what could be wrong? Thank you!
  • g

    gray-kilobyte-89541

    05/19/2022, 2:28 PM
    https://glebbahmutov.com/blog/cypress-second-tab/ and it is hard to say anything beyond this without seeing the app
  • m

    magnificent-finland-58048

    05/19/2022, 4:29 PM
    try to repro what you're doing in this repo https://github.com/muratkeremozcan/angular-playground and work through the deltas
  • m

    magnificent-finland-58048

    05/19/2022, 4:31 PM
    it may be because of the baseUrl mismatch try a regex matcher vs minify
  • m

    magnificent-finland-58048

    05/19/2022, 4:34 PM
    perfect use case for cy.origin get 9.6.1
    "experimentalSessionAndOrigin": true
    in
    cypress.json
    try something like this command https://github.com/muratkeremozcan/auth0-cypress/blob/master/cypress/support/commands.js
  • i

    icy-activity-78738

    05/19/2022, 5:53 PM
    Hello there 👋 I know that Cypress intentionally doesn't support child window access but I think I still have a valid use case and don't really know how to work around that limitation 😕 I have a Vue App that renders a component in a child window using this mechanism (https://stackoverflow.com/a/58534753) which is then basically "remote controlled" on the parent window. Of course I want to test its behavior but I don't know how if I cannot access the child window and its DOM. Does anyone have an idea?
  • a

    ambitious-petabyte-71482

    05/20/2022, 7:24 AM
    Hi all, Has anyone else been seeing issues with executing the tests having runtime over 60 minutes timing out and the dashboard doesn't publish the execution report? We have been executing the tests locally and it passes however when publishing to cypress dashboard and triggering the entire suite together the tests timeout and details cannot be seen as the reports are not published. Could really use some help with this. Thanks
  • b

    bland-lamp-18095

    05/20/2022, 9:23 AM
    Hey, I have the following plugin file for cypress:
    Copy code
    ts
    export default ((on, config) => {
      // `on` is used to hook into various events Cypress emits
      // `config` is the resolved Cypress config
    }) as Cypress.PluginConfig
    I'm using typescript. When I run it on my machine it's working but when I use
    cypress-io/github-action@v2
    in my github actions I get the following error:
    Copy code
    bash
    Your pluginsFile is invalid: /home/runner/work/XX/XX/frontend/cypress/plugins/index.ts
    
    It threw an error when required, check the stack trace below:
    
    /home/runner/work/XX/XX/frontend/cypress/plugins/index.ts:14
    export default ((on, config) => {
    ^^^^^^
    SyntaxError: Unexpected token 'export'
    My cypress config file is empty. What's the problem?
  • b

    billowy-bird-41053

    05/20/2022, 9:27 AM
    I'm having some problems with a flaky set of tests. Looking for some input in how best to deal with dropdowns where the options don't appear be loading fast enough. I thought I solved it by ensuring that the option was not disabled before selecting it.
    Copy code
    it('should successfully submit a valid file', () => {
            cy.get('@evidenceIframe')
                .find(benEvidenceTypeDropdown)
                .find('[value="5"]')
                .should('not.be.disabled')
            cy.get('@evidenceIframe')
                .find(benEvidenceTypeDropdown)
                .select(5);
    I'm new to cypress so please forgive me if this is poorly written
  • h

    handsome-telephone-90688

    05/20/2022, 12:41 PM
    Thanks @gray-kilobyte-89541 but seems difficult to understand.
  • b

    broad-salesclerk-78343

    05/20/2022, 1:11 PM
    Hi everyone! I have an app at http://localhost which loads it's assets from a Vite devserver at http://localhost:3000 . Cypress is hitting the main app correctly, but it doesn't load the assets, leaving me with a blank page. Any ideias?
  • k

    kind-artist-70775

    05/20/2022, 2:18 PM
    i want to kick off some VueJS component testing and i'm using ViteJS as a bundler. When I startup I do have a test file:
  • k

    kind-artist-70775

    05/20/2022, 2:19 PM
    but when I start Cypress with open I get this dialog:
  • k

    kind-artist-70775

    05/20/2022, 2:20 PM
    now this is not the default location but my
    cypress.json
    I believe is configured correctly:
    Copy code
    json
    {
      "downloadsFolder": "test/integration/downloads",
      "fixturesFolder": "test/fixtures",
      "commandsFolder": "test/integration/support",
      "integrationFolder": "test/integration",
      "screenshotsFolder": "test/integration/screenshots",
      "testFiles": "test/integration/**/*.test.{ts.tsx}",
      "pluginsFile": "test/integration/plugins/index.ts",
      "component": {
        "testFiles": "**/test/integration/**/*.test.{ts,jsx,tsx}",
        "componentFolder": "test/fixtures"
      },
    }
  • k

    kind-artist-70775

    05/20/2022, 2:21 PM
    and when I use the UI to add a test script it adds it to the
    test/integration
    directory but then doesn't see it 😦
  • k

    kind-artist-70775

    05/20/2022, 2:24 PM
    I think that my problem may be that I'm using
    npx cypress open
    and not
    npx cypress open-ct
    (as I do want to do component testing atm) but doing that blows up with an error relating to my
    vite.config.ts
    file: > Cannot find module './comment_char.js'
  • k

    kind-artist-70775

    05/20/2022, 2:25 PM
    btw, wondering is it only
    open-ct
    which will use ViteJS? or will
    open
    leverage that too?
  • k

    kind-artist-70775

    05/20/2022, 2:27 PM
    I have sorted the Vite error above but I still get no test scripts listed
  • k

    kind-artist-70775

    05/20/2022, 2:54 PM
    it's really looking like component testing isn't getting the love WRT to directory configuration
  • k

    kind-artist-70775

    05/20/2022, 2:56 PM
    the UI always says it's looking for "spec" file even when the glob pattern is for
    *.test.ts
    not sure how literally to take it
  • k

    kind-artist-70775

    05/20/2022, 2:57 PM
    but changing my test files to use the
    *.spec.ts
    convention makes no difference
  • k

    kind-artist-70775

    05/20/2022, 3:02 PM
    @silly-dentist-68907 @adventurous-dream-20049 @lemon-oyster-64925 @cuddly-winter-72122 @wonderful-match-15836 @fancy-match-96032 can one of you help me get over this hurdle? if so I can provide you guys with a very helpful ViteJS plugin I created 4-5 months ago which automatically generates an interface definition for
    Chainable<Subject>
    on hot-module replacement ... meaning all of your custom commands are not only available at run time but automatically and fully typed (including JSDocs)
  • k

    kind-artist-70775

    05/20/2022, 3:03 PM
    > for anyone using TS this is a really really nice to have
  • k

    kind-artist-70775

    05/20/2022, 3:06 PM
    is this community used? I can see folks are online but an hour later I have no responses ... maybe I'm being too entitled but will have to abandon soon if I can't cross the start line
  • a

    adventurous-dream-20049

    05/20/2022, 3:21 PM
    Thanks so much for reaching out with this great question! This may be best asked in #755921564108587038. Also, if you don't mind kindly refrain from using @ to reach out. It can get quite loud 😅 and we have several wonderful individuals that may chime in to help. I assure you someone with knowledge in the area will respond as soon as they are available.
  • m

    magnificent-finland-58048

    05/20/2022, 3:23 PM
    we are heavy on TS, but there is absolutely not reason for config files to be TS. You don't have anything from prettier or eslint in TS for instance, they're all just for config. Try it in JS.
1...676869...252Latest