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

    some-photographer-65085

    07/30/2021, 6:39 PM
    i dont know if its because i dont reload the page. but i cant reaload the page
  • t

    thankful-lunch-80439

    08/01/2021, 3:41 AM
    Why does the Cypress RWA not use arrow functions?
  • d

    dazzling-xylophone-61731

    08/03/2021, 3:03 PM
    Any ideas how to execute a command from the chrome console using Cypress? I'm using this: https://docs.cypress.io/api/commands/window
  • s

    some-photographer-65085

    08/03/2021, 3:08 PM
    https://docs.cypress.io/guides/tooling/plugins-guide#cy-task
  • s

    some-photographer-65085

    08/03/2021, 3:23 PM
    https://docs.cypress.io/api/commands/exec
  • b

    bitter-london-76358

    08/04/2021, 9:41 PM
    Hey Everyone, thanks for this great testing tool, I'm loving it so far. I'm wondering what the best strategy is to reduce flake in my tests when I want to check that a user was successfully redirected after form submission for example. Let's say for the sake of example that a user clicks submit on a login form and are redirected to the homepage (baseURL) of my application. Currently I'm using something like this
  • b

    bitter-london-76358

    08/04/2021, 9:42 PM
    but the above is flaky at best and I'd like to avoid using the cy.wait if possible
  • b

    bitter-london-76358

    08/04/2021, 9:43 PM
    I also tried listening to the
    url:changed
    event and putting my assertion in the callback but then I'm no longer seeing the assertions in the logs while my tests are running
  • b

    bulky-sundown-74498

    08/04/2021, 9:43 PM
    have you tried cy.location ?
  • b

    bulky-sundown-74498

    08/04/2021, 9:48 PM
    https://stackoverflow.com/questions/46839520/testing-a-redirect-to-a-new-route-with-cypress make sur ethe timeout fo cy.location is right
  • b

    bulky-sundown-74498

    08/04/2021, 9:49 PM
    then
    cy.url({timeout:10000}).should('equal', Cypress.config('baseUrl'))
  • b

    bulky-sundown-74498

    08/04/2021, 9:49 PM
    this should do the trick
  • b

    bulky-sundown-74498

    08/04/2021, 9:49 PM
    and retry a few times
  • b

    bulky-sundown-74498

    08/04/2021, 9:49 PM
    tell me how it goes
  • b

    bitter-london-76358

    08/04/2021, 9:50 PM
    thank you for your reply, will do!
  • b

    bulky-sundown-74498

    08/04/2021, 9:51 PM
    A great write up would be this https://docs.cypress.io/guides/core-concepts/introduction-to-cypress#Applying-Timeouts
  • b

    bitter-london-76358

    08/04/2021, 10:03 PM
    Thank you, increasing the timeout for the command seems to have resolved the issue
  • w

    worried-branch-70135

    08/05/2021, 5:46 AM
    Hello Everyone! Nice to meet you all. Everything works fine in my local but in Jenkins execution I get the below issue. This is not affecting the test case execution but I am not getting proper numbers in Allure report. It is adding irrelevant test case numbers to the result. Let say I have executed TC_1 only but it is adding TC_2 TC_4 and I have tried cleaning the folders but no use. I am not sure whether this occurrence is because of this browser profile. Could someone help me out Warning: We failed to trash the existing run results. This error will not alter the exit code. Error: Command failed: C:\Windows\SysWOW64\config\systemprofile\AppData\Local\Cypress\Cache\8.1.0\Cypress\resources\app\packages\server\node_modules\trash\lib\win-trash.exe C:\Jenkins\workspace\Project\ui\cypress\videos\features at ChildProcess.exithandler (child_process.js:317:12) at ChildProcess.emit (events.js:315:20) at maybeClose (internal/child_process.js:1048:16) at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5) Warning: We failed to remove old browser profiles from previous runs. This error will not alter the exit code. Error: EPERM: operation not permitted, unlink 'C:\Windows\system32\config\systemprofile\AppData\Roaming\Cypress\cy\production\browsers\chrome-stable\run-15520\CrashpadMetrics-active.pma'
  • l

    lively-hydrogen-13559

    08/05/2021, 1:16 PM
    Hey guys! I'm working on a crypto project and was wondering whether you have published any recipes or guides for tests that involve interactions with a crypto wallet via a browser extension, e.g. MetaMask?
  • d

    dazzling-pillow-26039

    08/07/2021, 4:33 AM
    They share contexts in between tests so that you can use this.alias. Arrow functions has a context of global.
  • s

    stocky-dream-36427

    08/07/2021, 11:32 PM
    You can install a plugin with the extensions option and then standup a website that uses the extension.... kinda like how you would develop it locally https://docs.cypress.io/faq/questions/using-cypress-faq#Can-I-test-a-chrome-extension-How-do-I-load-my-chrome-extension https://docs.cypress.io/api/plugins/browser-launch-api
  • g

    gray-kilobyte-89541

    08/10/2021, 5:09 PM
    You can mock network calls made server-side while doing Cypress.io testing. Well, you have to run the server inside the Cypress plugin process and use nock, but still. I explain how to mock getServerSideProps network call in this blog post https://glebbahmutov.com/blog/mock-network-from-server/ I have even prepared a video showing it in action

    https://youtu.be/33Hq41O0bvU▾

  • b

    bland-oil-91894

    08/11/2021, 8:31 AM
    Anyone have any experience running the GitHub action aws-actions/aws-codebuild-run-build@v1 and cypress? Tests are not running in parallel. The IAM user has admin privileges so it can initiate batch builds. If I re-trigger the workflow manually in the logs I will see that it closes after starting the first test or there is a message from cypress dashboard saying the run will not continue as it had been canceled. For the ci-build-id I am using $CODEBUILD_INITIATOR. Previously to this I have been using an action that triggers an AWS pipeline which uses the same exact codebuild and buildspec and it has been working fine. Problem with it is that the check will pass automatically as it just calls AWS to trigger the pipeline. Using aws-actions/aws-codebuild-run-build@v1 monitors and reports the logs to Github so it will keep the check open until the test suite is completed and then fail or pass the check according to the test run results. Much easier to get devs to pay attention if it is right in their face ya know :p little more detail: https://stackoverflow.com/questions/68738991/github-action-to-trigger-batch-codebuild-for-cypress-e2e-tests-not-working
  • f

    fancy-airplane-60156

    08/13/2021, 2:30 AM
    Hi Team, I'm implementing Cypress Test framework. My use cases involve filling up a form that's 5 pages and submitting it. I'm thinking of reading all the form data from a csv/Excel sheet. Is it a good idea ? Any recommendations are welcome.
  • d

    dazzling-pillow-26039

    08/13/2021, 4:15 AM
    Use json and save those files in fixtures
  • f

    fancy-airplane-60156

    08/14/2021, 11:06 AM
    Thanks @User , it worked like Magic
  • f

    fancy-airplane-60156

    08/14/2021, 11:14 AM
    I'm trying to click on a calendar and select date. Type command wont work on this as it's not a text field. Id's of the date cell changes every time. Is there a hack to modify the DOM with the date I want to select ?
  • n

    narrow-bear-20793

    08/15/2021, 12:36 PM
    @fancy-airplane-60156 you may want to get the current date, do some strips and pass it to click on using cy.contains(). Also ensure you are using cy.contains() nested for that particular month that you have in class and pass it by having a get function for month
  • f

    fancy-airplane-60156

    08/16/2021, 4:59 AM
    Thanks for the suggestion @User I'll check this.
  • f

    fancy-airplane-60156

    08/16/2021, 5:19 AM
    I've run into an issue after i completed my framework set up. In ideal world, I'd login to the secure pages via a SSO login then run my tests.As Cypress supports only single domain, in order to get around this constraint , I'm using below code to create a session before I start executing my test steps. However in the end, I'm getting 403 error when i submit my form. I'm not sure if there is any other way around this.
1...192021...192Latest