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

    gray-kilobyte-89541

    11/23/2022, 4:40 PM
    if you open the issue in the cypress-if repo I can see if this could be added
  • l

    little-wolf-69109

    11/23/2022, 5:26 PM
    Hello, is posible in cypress run external nodejs script? I have ui test in cypress and in the test i need call function from separate nodejs .js file. Is posible use cy.task()?
  • m

    mysterious-belgium-25713

    11/23/2022, 5:36 PM
    Yeah you can use cy.task to call the function. If you need help look at my blog how i used PostgreSQL nodejs library as a Cypress task. https://dev.to/xvier/connecting-cypress-to-a-postgresql-database-3po5
  • r

    rough-book-31535

    11/24/2022, 9:44 AM
    Hello, I have the impression that since I updated my cypress from version 10 to version 11, the cypress-if plugin does not work anymore. Even when an element does not exist, it enters the if() condition.
  • f

    fresh-doctor-14925

    11/24/2022, 10:08 AM
    It's a third party plugin, so you'd be better off raising an issue on there https://github.com/bahmutov/cypress-if/issues Gleb's pretty responsive, so I doubt you'll be waiting long before you hear back
  • r

    rough-book-31535

    11/24/2022, 10:09 AM
    Thanks for the quick answer, I'll do that
  • f

    fierce-beach-68131

    11/24/2022, 11:00 AM
    Hello, I need help regarding to "excludeSpecPattern". As you can see in my config file, my specPattern only contains feature file to execute it. But problem is, when I open the cypress although only my feature file is view in cypress overview, when I start the test, the others .js files are also displaying unexpectedly. Please also check screenshots to be more clear. My question is, how do I prevent all the ".js" files during the execution? What am I missing here?
  • f

    fresh-doctor-14925

    11/24/2022, 11:10 AM
    It seems odd to me that those scenarios are somehow appearing in
    00_loginTest.feature
    . Are you importing
    validateContentItems
    in that spec?
  • f

    fierce-beach-68131

    11/24/2022, 11:13 AM
    No, I didn't import any of these .js files to anywhere 😦
  • h

    helpful-coat-87654

    11/24/2022, 11:17 AM
    Hi everyone, trying these recipe with csv https://github.com/cypress-io/cypress-example-recipes/blob/master/examples/testing-dom__csv-table/cypress/e2e/spec.cy.js but I have this error:
    SyntaxError: 'import' and 'export' may appear only with 'sourceType: module' (1:0) while parsing
  • f

    fresh-doctor-14925

    11/24/2022, 11:52 AM
    Hard to guess based on description and screenshots. Can you share the spec to a repo?
  • m

    mysterious-belgium-25713

    11/24/2022, 11:55 AM
    Did you copy paste it fully or did you change the require statement to import? Also are you using typescript?
    h
    • 2
    • 1
  • h

    helpful-coat-87654

    11/24/2022, 12:08 PM
    Did you copy paste it fully or did you
  • w

    wooden-scientist-4695

    11/24/2022, 12:30 PM
    Hi Team Good day ,I have installed "chai-json-schema" to validate Json response schema, setup is done but - This alwasys pass even i pass invalid json schema expect(response.body[0]).to.be.jsonSchema(schema)
  • i

    icy-musician-86456

    11/24/2022, 1:07 PM
    Heyo guys! Just a quick question - i'm currently upgrading my cypress version and the first step says it will rename all
    [name].spec.[ext]
    to
    [name].cy.[ext]
    . But it does not - but why? Is it because of the sub folders? How can I force that? Do I need to upgrade this?
  • p

    powerful-journalist-49461

    11/24/2022, 1:49 PM

    https://www.youtube.com/watch?v=6ASbP_IAArUā–¾

  • f

    fierce-beach-68131

    11/24/2022, 2:08 PM
    Sorry for the late reply. Here is the repo, please do npm install first then open the cypress.
  • f

    fresh-doctor-14925

    11/24/2022, 2:18 PM
    No worries! Would it be possible for you to push it to github/gitlab instead? I'd rather not be opening unknown
    .zip
    files on my work laptop šŸ˜…
  • f

    fierce-beach-68131

    11/24/2022, 2:18 PM
    Sure, I'll do right away, give me a second.
  • f

    fresh-doctor-14925

    11/24/2022, 2:19 PM
    Thanks! Being able to see the tests should make it a lot easier to understand what's going on šŸ™‚
  • f

    fierce-beach-68131

    11/24/2022, 2:22 PM
    Here is it; https://github.com/saittalhabakir/cypressForLiam
  • i

    icy-musician-86456

    11/24/2022, 2:30 PM
    Thank you my dear!
  • f

    fresh-doctor-14925

    11/24/2022, 3:35 PM
    I'm afraid I don't use the
    cypress-cucumber-preprocessor
    , and I don't understand it enough to have an idea of what might be happening here Fortunately, lots of people on here do use it and by sharing the repo it should be easy for someone else to spot what's up. The plugin's author comes on here from time to time, so they might be able to help
  • f

    fierce-beach-68131

    11/24/2022, 3:52 PM
    Thank you for your time.
  • f

    fresh-doctor-14925

    11/24/2022, 3:56 PM
    You're welcome! Sorry I couldn't help, but I'm sure someone on here can
  • f

    fierce-beach-68131

    11/24/2022, 4:28 PM
    I found a workaround by changing project structure but let see my senior's feedback šŸ˜„ Thanks again.
  • g

    gray-kilobyte-89541

    11/24/2022, 5:54 PM
    the problem was discovered and fixed quickly https://github.com/bahmutov/cypress-if/releases/tag/v1.10.2
  • s

    strong-arm-6666

    11/25/2022, 8:28 AM
    Hello, How to build cypress binaries from cypress source code?
  • e

    echoing-painting-40909

    11/25/2022, 8:32 AM
    Hi, you'll find the instructions in the Contributing file : https://github.com/cypress-io/cypress/blob/develop/CONTRIBUTING.md#package-level-scripts
  • s

    strong-arm-6666

    11/25/2022, 11:19 AM
    I receive this error when running
    yarn run binary-build
    šŸ¤”
    Copy code
    `V8_SNAPSHOT_FROM_SCRATCH=1 yarn build-v8-snapshot-{prod or dev}`
    
    Note that this may take a while.
    šŸ”„ deploy error
    Error: Command failed with exit code 1: electron-builder --publish=never --c.electronVersion=21.0.0 --c.directories.app=C:\Users\ADMINI~1\AppData\Local\T
    emp\2\cypress-build\win32\dist --c.directories.output=C:\Users\ADMINI~1\AppData\Local\Temp\2\cypress-build\win32\build --c.icon=D:\code\cypress\packages\
    icons\dist\icons\cypress.ico --c.asar=false
        at makeError (D:\code\cypress\node_modules\execa\lib\error.js:58:11)
        at handlePromise (D:\code\cypress\node_modules\execa\index.js:114:26)
        at processTicksAndRejections (node:internal/process/task_queues:96:5)
        at async Object.buildCypressApp (D:\code\cypress\scripts\binary\build.ts:264:5) {
      shortMessage: 'Command failed with exit code 1: electron-builder --publish=never --c.electronVersion=21.0.0 --c.directories.app=C:\\Users\\ADMINI~1\\Ap
    pData\\Local\\Temp\\2\\cypress-build\\win32\\dist --c.directories.output=C:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\2\\cypress-build\\win32\\build --c.ic
    on=D:\\code\\cypress\\packages\\icons\\dist\\icons\\cypress.ico --c.asar=false',
      command: 'electron-builder --publish=never --c.electronVersion=21.0.0 --c.directories.app=C:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\2\\cypress-build\\
    win32\\dist --c.directories.output=C:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\2\\cypress-build\\win32\\build --c.icon=D:\\code\\cypress\\packages\\icons\
    \dist\\icons\\cypress.ico --c.asar=false',
1...212213214...252Latest