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
2
votes
1 answer

How to solve cy.type() failed because it targeted a disabled element

I am accessing my Gmail account by command loginByGoogleApi under commands.js, then getting the requested email body and pulling the required data from the body, and saving it in a const variable code typing the pulled email data (code) in my…
Paras Verma
  • 25
  • 1
  • 3
2
votes
2 answers

Cypress expectations only work with cy.wait or without cypress-testing-lib within

I recently installed Cypress 10 on a personal project and I was implementing a dummy test to ensure everything works. I decided to go a bit "the extra" mile on the example and I am wondering why the following assertions fail. The scenario is the…
Francisco Barros
  • 279
  • 3
  • 17
2
votes
2 answers

Cypress.io is executing commented code lines

I have updated my cypress version to new version V 10.0.3 and it is running commented code lines in the test case. below is the test case I have written and the commented lines are also included. it.only('Check the item upload file validations', ()…
2
votes
1 answer

Organize Cypress Tests in categories or environment

How to organize the cypress tests based on the environment. I am running my cypress tests again mock server and a real setup both. While running against mock server i can assume that data is always there and can run the full set, but i can only run…
Suresh Nagar
  • 1,021
  • 9
  • 20
2
votes
1 answer

cypress get method can not get data-cy at my component

cy custom method Cypress.Commands.add('shouldRenderShowcase', ({ name, highlight = false }) => { cy.getByDataCy(name).within(() => { cy.findByRole('heading', { name }).should('exist') cy.getByDataCy('game-card').should('have.length.gt',…
2
votes
4 answers

Cypress / JavaScript: assertion with an URL value that contains a specific word

I'm a beginner with Cypress and JavaScript. I'm trying to improve the following assertion, I report it below. Here: cy.xpath('//div[@data-testid="column"]').should('have.css', 'background-image',…
2
votes
0 answers

Cypress run gives the error "Warning: We failed processing this video." and fails the job

I am running Cypress tests in parallel (chrome browser). And I see the below issue every time when cypress run is executed. I would need to videos for debugging purpose. Any possible solutions to fix this issue? Warning: We failed to record the…
2
votes
2 answers

Cypress.moment() is not a function on upgrading Cypress version to 9.6

Few test cases in my test suite is failing because I am using Cypress.moment() function in those I tried one of the solution mentioned online to upgrade code coverage : npm update @cypress/code-coverage but this did not solved the problem
2
votes
1 answer

How can we run Cypress tests in parallel on a single machine?

I need to run my tests on a single machine. The project has more than 50 tests (spec files). Is it possible to achieve this via jenkins configuration?
2
votes
1 answer

Cypress: how to test routes status code throughout entire test?

I have a test where a certain fetch request is happening around 70 times and at the end of the test I need to check that all the status codes were 200 or 204. So far I am intercepting the request and can check the response.statusCode for that 1…
2
votes
3 answers

Cypress : The submit button is disabled even after all the text fields have filled

I was trying to automate a text submit form using cypress. The 'Create student' button is disabled even after all the fields have been filled Please see the cypress error code : it('should be able to add a new student and update the details,…
Rithu
  • 31
  • 2
2
votes
1 answer

How to verify the request is coming from Cypress?

We have a service which verifies user before it can access data. I need to know if the request is coming from Cypress. I understand I can look into user-agent or I can also set request header but I am trying to find any other way that normal user…
2
votes
2 answers

What can I do if parsing a test email is taking too long?

I plan to test a confirmation email with Cypress and MailHog. In principle, a few attributes and values should be present there. In a test mail that is about 200 K in size, the following code worked perfectly. it.only('The body of a confirmation…
Michael S.
  • 589
  • 8
  • 25
2
votes
3 answers

Cypress - Get [value] value property from mat-button-toggle-group

I have a selector to I want to have access to [value] value, and for that I do. buttonToggleGroupSelector.should('exist').and('has.value', 'MyValue'); But this returns an empty…
Hugo Seleiro
  • 2,467
  • 5
  • 26
  • 39
2
votes
1 answer

How to run Cypress BDD Feature using TAGS in the Terminal without closing the test/browser for each Feature

I have a few feature files in my project and I need to execute only the specific cucumber tags (@Regression) from the feature file using Terminal. I could able to run the feature file using the tags. But the test/Browser window gets closed and open…
1 2
3
14 15