Cypress add an option optionally
I have this case for example:
Cypress. How to pass the same data to “it” functions within one “describe” function
I am testing 2 products. 1 for users and 1 for employees. The user creates a request and then it is processed by the employee. I generate an object with random test data. Based on this data, I create a request on product 1 and want to process it on product 2. Firstly, to find it, and secondly, to check the correctness of the data transfer. My problem is that different data is generated for each “it” function, despite the fact that I generate them outside the “it” functions. As I understand it, the problem is that I call “cy.visit” in each “it” function, because I am testing 2 products. And because of this, the state is reset between tests. The object itself does not change during the tests, only data is pulled from there.
Expected output changes when converting function to custom command
I have this function that fetches all CSS properties and values of an element:
Cypress – How to create a synchronous for loop?
I want to click a series of elements in a web page and check if each of those actions produces the correct API request URL. For that, I made an array of settings for each element and iterated over them, clicked the respective element and asserted the results.
Intercept API calls in Cypress – Should I keep the wait separately?
With the cypress code snippet given below, I visit a homepage and then click on a profile button which shows the profile in the side of the home page (not in a separate page). Is it ok to wait like this or are there serious problems in my approach ?
Recursive function crashes Cypress test
In my test I need to fill particular cells in table. In tested app, cells do not exist in DOM unless they are visible in the scrolled view. So I need a method that will check if the cell with particular ID exist in DOM, if no scroll horizontal to right by 100px and check again. If it still doesn’t exist scroll again and so on.
Test that an item has appeared with different time interval – Cypress
i wanted to ask if there is a way i can test if an item has appeared in the app.
For example it can be that i clicked on a button but after 30 mins or 1hr or 1 min, i get a notification that my item has appeared.