Relative Content

Tag Archive for cypress

How to write a precondition for a special test case using Cypress?

I want to write the precondition for a special test case in a test suite using Cypress. The options I know are before() which runs once before all test cases and the other option is beforeEach() which run before every test. I want to run precondition for some tests in a test suite. How can I do that?

I cant submit a iframe window pop up in Cypress

I am testing a endpoint made with aspx with cypress the issue appears on a popup iframe form for adding credit card info when I complete the info and hit on save buttom using of course cypress test runner this function or buttom doesnt work so I assume it looks like it’s not loading the credit card library, it looks like cypress is not allowing it to load for some reason.
this cypress code represents how i go through iframe and try to submit the info for credit card form

Cypress runner is not running the latest changes in the code

I need some help because right now I’m trying to test cypress locally first before push to Gitlab but I’ve notice whenever I made any new changes on the code the cypress runner will not capturing the latest changes. I need to push to Gitlab first the only I can see it’s updated.

Cypress test visits routes before login completes when using loop in GitHub Actions

I’m writing Cypress tests for my web application and encountered an issue where my test starts visiting restricted pages before the login process is complete when using a loop. However, if I remove the loop and test each page one by one, everything works fine. This issue only occurs when running the tests in GitHub Actions.
Here is my test code: