Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 07:24
    azakordonets commented #15767
  • 06:58
    cypress[bot] commented #15776
  • 06:29
    lmiller1990 commented #15776
  • 06:28
    lmiller1990 commented #15776
  • 06:26
    cypress[bot] commented #15776
  • 06:24
    lmiller1990 synchronize #15776
  • 06:24

    lmiller1990 on DesignSystemSetup

    remove design system from CI (compare)

  • 06:17
    lmiller1990 commented #15903
  • 06:14
    lmiller1990 labeled #15934
  • 06:14
    lmiller1990 opened #15934
  • 06:11
    lmiller1990 edited #15933
  • 06:08
    lmiller1990 edited #15933
  • 06:07
    lmiller1990 labeled #15933
  • 06:07
    lmiller1990 opened #15933
  • 06:02
    lmiller1990 edited #15932
  • 06:02
    lmiller1990 labeled #15932
  • 06:02
    lmiller1990 opened #15932
  • 05:54
    lmiller1990 synchronize #15776
  • 05:54

    lmiller1990 on DesignSystemSetup

    chore: release @cypress/react-v… fix: only log process.emitWarni… fix(component-testing): Correct… and 19 more (compare)

  • 05:38
    lmiller1990 closed #15108
Antoine Guillien
@antoine86_gitlab
did anyone ever had issues with require in plugin/index.js ? I require some installed module (works locally on my docker container) but when I run it on gitlab CI I get some Error cannot find module globby
jodi-matrix (Jochen)
@jodi-matrix:matrix.org
[m]
The styled problem was easy to reproduce with an existing public project of mine. I opened cypress-io/cypress#15879
Jatin Bansal
@jabansal2

i am using cy.writefile for updating an existing json file in fixtures. But am unable to see any changes made to file. However, if i print the content of file after cy.write file, i see the updated content in console but the file doesn't get updated.. Below is my code snippet:

    const path = require("path");
    const dir = path.join(__dirname, "../../fixtures/");
    const newFilePath = path.join(dir, "hello.json")
    const dirpath = path.join(dir, afixture.name);
    cy.readFile(dirpath).then((obj) => {
      obj.password = 'MyNewPassword123'
      cy.writeFile(dirpath, JSON.stringify(obj))

    }) 

Fixture File Before running the script is :
{
"username": "testA1213",
"password": "Admin123$"
}

It remains same after running the file.

Console output however is showing the content of the file has changed:

image.png
Gleb Bahmutov
@bahmutov
@jabansal2 fixtures are loaded just once, so any modifications are NOT reflected. I opened an issue cypress-io/cypress-documentation#3814 to explain it slightly better
Eric Haughee
@ehaughee
Has anyone seen a cross origin error where the two origins noted in the error are the same?
Example:
Cypress detected a cross origin error happened on page load:

  > Blocked a frame with origin "http://localhost:3000" from accessing a cross-origin frame.

Before the page load, you were bound to the origin policy:

  > http://localhost:3000
Gleb Bahmutov
@bahmutov
@ehaughee yeah, it is some race condition that is possible, I have seen it, but unable to track down, some bug in the browser
11 replies
Eric Haughee
@ehaughee
*sad trombone*
Jatin Bansal
@jabansal2

@jabansal2 fixtures are loaded just once, so any modifications are NOT reflected. I opened an issue cypress-io/cypress-documentation#3814 to explain it slightly better

Thanks for reverting @bahmutov . Is there a way to accomplish in cypress, what i am intending to do. So basically i am using the username and password from fixtures to login to my application. My usecase is to change the password of the account i am accessing using credentials in this fixtures file and i am trying to update the password in the fixtures file as well. So can this not be accomplished in cypress as you are mentioning that fixtures only are loaded just once? Any more inputs will be appreciated. In additions thanks for creating an issue as mentioned :).

Gleb Bahmutov
@bahmutov
Angie D
@angiedaley
Has anyone run into moment not working suddenly? I have a number of specs that use Cypress.moment to capture the date to be used in the various tests and they are all now giving the error: Cypress.moment is not a function
Janessa Garrow
@jgarrow

In implementing the Cypress GitHub Action, it throws the following error after installing Cypress, but before running any of the tests: ERR! Cannot read property 'length' of undefined. Has anyone run into this issue before? I enabled the debugging logs to see if I could get any more information, but this is all it gives me around that error:

2021-04-08T20:22:55.906Z cypress:cli finished installation in /home/runner/.cache/Cypress/6.4.0
[20:22:55]  Finishing Installation  [completed]
25h
You can now open Cypress by running: node_modules/.bin/cypress open

https://on.cypress.io/installing-cypress

25hnpm ERR! Cannot read property 'length' of undefined

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/runner/.npm/_logs/2021-04-08T20_22_56_966Z-debug.log
##[debug]The process '/usr/local/bin/npm' failed with exit code 1
##[debug]Error: The process '/usr/local/bin/npm' failed with exit code 1
##[debug]    at ExecState._setResult (/home/runner/work/_actions/cypress-io/github-action/v2/dist/index.js:1066:25)
##[debug]    at ExecState.CheckComplete (/home/runner/work/_actions/cypress-io/github-action/v2/dist/index.js:1049:18)
##[debug]    at ChildProcess.<anonymous> (/home/runner/work/_actions/cypress-io/github-action/v2/dist/index.js:943:27)
##[debug]    at ChildProcess.emit (events.js:210:5)
##[debug]    at maybeClose (internal/child_process.js:1021:16)
##[debug]    at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
Error: The process '/usr/local/bin/npm' failed with exit code 1
##[debug]Node Action run completed with exit code 1
##[debug]CI='1'
##[debug]CYPRESS_CACHE_FOLDER='/home/runner/.cache/Cypress'
##[debug]npm_config_cache='/home/runner/.npm'
##[debug]Finishing: Cypress run

For our action, we first get the deploy preview url from Netlify before moving onto the Cypress action. Here is the full GitHub action .yml file:

name: Cypress tests
on: [push]
jobs:
  cypress-tests:
    runs-on: ubuntu-latest
    steps:
      - name: Wait for Netlify Deploy
        uses: probablyup/wait-for-netlify-action@3.2.0
        id: waitForDeployment
        with:
          site_id: ${{ secrets.NETLIFY_SITE_API_ID }}
        env:
          NETLIFY_TOKEN: ${{ secrets.NETLIFY_TOKEN }}

      - name: Checkout
        uses: actions/checkout@v2

      - name: Cypress run
        uses: cypress-io/github-action@v2
        env:
          DEBUG: 'cypress:*'
        with:
          browser: chrome
          headless: true
          record: true
          config: baseUrl=${{ steps.waitForDeployment.outputs.url }}
James Gooding
@jameseg
@bahmutov do you have any advice/tutorial for implementing Cypress with signalr? is there a way to wait on that stuff or potentially mock it out?
also anyone else lol ^
Gleb Bahmutov
@bahmutov
@jgarrow enable the github action debug first, but also I would try the newer Cypress versions https://github.com/cypress-io/github-action#debugging
@jameseg can you create a repo with a signalr application so we can see it and what is going wrong? And open a discussion or an issue describing what is not working
@angiedaley Cypress.moment was deprecated for a while and has been removed from Cypress v7 https://on.cypress.io/changelog#7-0-0
princeap173
@princeap173
Hi guys! I am testing an application where I need to check if a download file functionality is working properly. Is there anyway I can check through Cypress if the file is downloaded ? Currently I use cy.exec to list the directory contents and grep for the filename. Is there any other way through cypress ? Thanks
DINKARSINGH
@DinkarSingh
Screenshot 2021-04-09 at 12.26.06.png
can you please any one help me on this error "cy.find() failed because this element is detached from the DOM."
6 replies
Reinis Ivanovs
@slikts
Is there a way to wait for all assets to load? I have a visual test that's flaky due to an image sometimes loading slowly
cy.find('img'). should('be.visible') seems a bit hacky, and it wouldn't work for background images
Gleb Bahmutov
@bahmutov
okyrylenko
@okyrylenko
hello everybody. A couple questions regarding the env file - cyprss.env.json
  1. Do I need to store inside the cypress folder, in core project directory, or anywhere ?
  2. Can I access it from the command.js file. The docs says - "From test file". Does command.js considered as "test file" or not?
    Pretty much my issue is I have cypress.env.json file and I try to access it from the commands .js file by Cyppres.env('key') and getting undefined
Gleb Bahmutov
@bahmutov
@okyrylenko can you show the example repo where the things are not working as expected?
okyrylenko
@okyrylenko
@bahmutov it was a typo in my code, sorry to bother.
after fixing, in case if anyone else have the same questions
Do I need to store inside the cypress folder, in core project directory, or anywhere ? - cypress.env.json can be stored anywhere in the project
Can I access it from the command.js file. The docs says - "From test file". Does command.js considered as "test file" or not? - the env file can be access from command.js or from test folders
Gleb Bahmutov
@bahmutov
@okyrylenko I would store the env file next to cypress.json I believe and commands files are considered test files as well. If an env variable is missing we would need a reproducible example and an issue to debug it. I would also read https://on.cypress.io/environment-variables
okyrylenko
@okyrylenko
@bahmutov my issue is fixed. thank you. Also, based on this page https://auth0.com/blog/end-to-end-testing-with-cypress-and-auth0/, the suggestion is to add env file in the root directory( as you mentioned above). Maybe it would be nice to add this piece of information to https://on.cypress.io/environment-variables since that is the first page users explore when they need info on env variables
Gleb Bahmutov
@bahmutov
@okyrylenko it would be nice to add, unfortunately auth0.com/blog is outside of my control
okyrylenko
@okyrylenko
@bahmutov what I meant is that it would be nice to add information of where environmental variable can be stored in official cypress documentation. As of now, the official cypress docs says - "You can create your own cypress.env.json file that Cypress will automatically check". as you can see, there is no mentioning of where the env file could be stored(root, cypress directory, anywhere etc.) That could safe some time debugging if something goes wrong with reading data from env file and also for you answering questions like mine :)
Jatin Bansal
@jabansal2
image.png
I dont know why i started getting this error in the screenshot. Can anyone please help.
Jon Austen
@djangofan
What do you all suggest for connecting to an Oracle DB from a Cypress test? My thought was: if Cypress could execute a Java .jar/class then i could just make a Java JDBC connector. I want to avoid using Oracle native type-1 driver, if possible because that requires an install outside of npm right? My tests need to run from a build machine where I cannot install stuff into.
Jon Austen
@djangofan
Maybe having Cypress call Oracle directly is a bad idea. I changed my mind. I'll make a test-microservice that knows how to verify data in Oracle. Then my Cypress test suite can proxy through that.
Gleb Bahmutov
@bahmutov
@okyrylenko I agree with you, do you want to open a quick PR into the docs to clarify this? Or at least an issue with details where the confusion is?
@jabansal2 the test is running in the browser, thus there is no process object, since this is not Node
@djangofan in general you want to connect to the database from the plugin file
arun86gupta
@arun86gupta
how to launch an application with oauth2 using cypress?
Mauro
@rainnxv_twitter
Hi guys can you take a look at this thread? https://stackoverflow.com/questions/67043398/problems-with-cypress-in-a-windows-pc i'm desperate, i should be presenting cypress this week to my company
@rainnxv_twitter it looks like it takes a really long time to fetch the sites assets. Are you using the same browser on each machine? Check version, etc. Does one have a different proxy setup? To me, it sounds and looks like a networking issue. Does this happen when you use the Cypress UI or only headless?
arun86gupta
@arun86gupta
Yusuf Öztürk
@YusufOzturk-Development
Is cyress meaningful for mobile automation?
Gleb Bahmutov
@bahmutov
@rainnxv_twitter could it be some anitvirus software running on the second PC?
Mauro
@rainnxv_twitter
@olore_twitter thank you so much for the advice. I did a test with electron on the pc that was giving me problems and noticed that it was working correctly. I then uninstalled chrome and reinstalled. Now the problem is solved. Thanks again. I also report it on stack overflow
@bahmutov After several tests I can confirm that it was something about Chrome not working, despite having the latest version.
Leonardo Mantovan
@mantovanleonardo_gitlab
Hi to all! hope you can help me with an issue. I'm on Windows 10, cypress 7.0.1, and I'm missing chrome as a browser. It doesn't show up on the right menu. Only firefox, edge and electron. I have chrome 89 on the default directory ("C:\Users\el_ra\AppData\Local\Google\Chrome\Application\chrome.exe"). I tried everything I found on the web, even a Symbolic link, but the problem persists
princeap173
@princeap173
Hi guys! I am testing an application where I need to upload a json file. I have installed cypress-file-upload node module and I was able to upload the files when testing on some different websites. But when I use it to test my application, the application throws an error stating that the file is not in JSON format when the file actually is in JSON format. If I manually upload the same file, it works. This is the command I am using to upload the file through Cypress. cy.get('[data-id="importFile"]').attachFile(filePath); . Any suggestions? Thank you
ELFCHE
@ELFCHE
Hello, after the update cypress runner stopped working - I get this error: TypeError [ERR_INVALID_ARG_TYPE] [ERR_INVALID_ARG_TYPE]: The first argument must be of type string or an instance of Buffer or Uint8Array. Received type number. Does anyone know how to fix it?