Questions tagged [cypress-testing-library]

Questions about Cypress end-to-end testing with the **Cypress Testing Library** utilities (a subset of the Testing Library).

Documentation can be found at Cypress Testing Library.

Testing Library provides additional testing commands to the Cypress framework.

214 questions
0
votes
1 answer

Image validations after perform action

in my case perform some random operations on image lick flip, roll, move-up and after this action image set as it is how can I validate action is happening
0
votes
2 answers

Compare two dates in cypress

How can I compare two dates in Cypress without them beeing modified? let today = new Date(); let dateDisplayed = "22.07.2022".split('.'); let dateToCompare = new Date( +dateDisplayed[2], +dateDisplayed[1] -…
sbmoschw
  • 15
  • 4
0
votes
1 answer

How to check the text of the current state of a select component in Cypress?

I have a select box that originally has no value selected. The box shows as empty, and I would like a cypress test to check that there is no currently selected option, basically check that the select box displays no value. How can I do that? I tried…
mastercooler6
  • 377
  • 2
  • 16
0
votes
0 answers

How to filter the response via API

Wanted to know if this is possible, I have 2 APIs I am testing. API 1. Gives a list of total jobs posted by the user. Response = "jobId": 15596, "jobTitle": "PHP developer" API 2. Gives the following response. "total CVs": 19, "0-7days":…
ruffainn
  • 83
  • 1
  • 14
0
votes
0 answers

how do I sync elements from dynamic local server to dev server (static files) in order to pass one cypress test on both?

I am trying to modify a Cypress test that was created by someone else, written based on the dynamic local server (dev environment). When I try to run these Cypress tests on the dev server, I keep getting errors saying that the elements in the local…
0
votes
0 answers

Cypress Error when upgrade from version 9 to version 10

I wrote BDD on version 9 and that ran smoothly, but after I upgraded on version 10 I meet this issue Please help how can I resolve enter image description here
0
votes
1 answer

Cypress resets to cy.visit() after running each describe section

I have a spec file in Cypress below and every time it runs the spec, the "Analyze Section" succeeds but the "Other Section" fails due to it returning to the login page even though the before() hook at the root should just run once based on the level…
Adam
  • 4,590
  • 10
  • 51
  • 84
0
votes
1 answer

API mocking in cypress intercept

I am new to cypress. Problem: I am not able to intercept url for API mocking, when there are multiple APIs are appearing in console-> network tab Description: My requirement is as follows: login a website, after getting the landing page,go to a…
0
votes
4 answers

How add documents into a MongoDb database in a cypress test file?

I'm writing a cypress test for a webpage that shows a list of posts with filters on the top. But for the list of posts to be shown, some documents have to be present in the Database so that I can check that they are displayed as required. How can I…
0
votes
0 answers

Cypress: I need to loop through table column and check if column has certain child element then extract that value otherwise get the column text

let result = []; cy.get('.ppl-keywords .addedKW table tbody tr td.matchType').each(($td) => { if ($td.find('.expand-btn__cell').length > 0) { cy.wrap($td).find('.expand-btn__cell').invoke('text').then((kw) => { result.push(kw) …
meena
  • 1
  • 1
0
votes
0 answers

How to get forget password link using cypress-gmail-tester

I am able to check Gmail is sent to the user, but I want to get forget password link from the received email and visit it using cypress-Gmail-tester. I am working on an ongoing project and whenever a gmail-tester is implemented it will work as per…
Krupal Vaghasiya
  • 536
  • 7
  • 21
0
votes
2 answers

How to work on random pop ups in cypress?

I have an application, where feedback pop up comes in a page randomly; like pop up may or may not come in the page after loading it for nearly 3000ms. How to handle this pop up in cypress. I tried below code: …
0
votes
2 answers

How to capture the value of options in a select dropdown for comparison?

I have a dropdown on my dashboard that will redirect the user to a new page based on the value of the option they chose. All the IDs in the dropdown are also the route in the URL, so I figured I could just select whatever option in the list and just…
LovelyAndy
  • 841
  • 8
  • 22
0
votes
1 answer

cypress - This element is not visible

i want to trigger a button after 150 seconds so i written a logic like this. /// describe("home test",function (){ it('home',function (){ …
0
votes
4 answers

Adding a new random value to an input and then asserting that value has been updated in Cypress

I am working with a dashboard that has a bunch of inputs for data. The user has the ability to edit any of the input field data and I am trying to test that functionality. The trouble I am running into is that if I have a function…
LovelyAndy
  • 841
  • 8
  • 22