Questions tagged [cypress-component-test-runner]

This tag should be used in questions related to running Cypress tests with Component Test Runner and the configuration or other issues with the Cypress Component Test Runner.

This tag should be used in questions related to running Cypress tests with Component Test Runner and the configuration or other issues with the Cypress Component Test Runner itself.

References:

Related tags:

180 questions
2
votes
2 answers

Cannot read properties of undefined (reading 'displayName') for Cypress component test

I have a working nextjs app and am wanting to add Cypress component tests for my react components. e2e cypress tests are working without issue, but when trying to implement component tests I'm receiving the error, "Cannot read properties of…
2
votes
0 answers

You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. TypeScript/Javascript

Im trying to do some component testing with cypress version 10. I keep running into this error telling me I need an appropriate loader , and that I have none to process files in my app. My repo is primarily javascript, when I initialize cypress it…
2
votes
2 answers

Quasar2 Vue3 Cypress Cannot read properties of undefined (reading 'deep')

I have the following component test: import AutoGeneratedPage from '../../../src/components/AutoGenerate/AutoGenerate.vue'; // <= note the absence of `.vue` extension, here we are importing the JS/TS part of a Double File…
2
votes
1 answer

Attaching resources in Vue component tests

I'm running component tests on my Vue project, have followed the documentation Getting Started with Cypress Component Testing (Vue 2/3). import { mount } from '@cypress/vue' import HelloWorld from './HelloWorld.vue' describe('HelloWorld', () => { …
Nora
  • 139
  • 6
2
votes
2 answers

How to make Cypress use test files located outside of default integration folder?

I am trying to keep my **.spec.js files for testing next to the actual files that need to be tested like such: . ├── product | ├── product.js | ├── product.spec.js ├── user | ├── user.js | ├── user.spec.js The above *.spec.js files don't…
2
votes
1 answer

Vue Cypress Component Test Runner - VueRouter

I have added the Cypress Vue Component Test runner to an existing Vue(vite) app. However, when I run the test I get an error that the $route in my component is undefined. Am I missing something with my component test setup? maybe regarding vue…
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…
2
votes
1 answer

How to work on 2FA when I am trying to log in into an account using Cypress?

I want to log in into an account, but I am receiving 2FA and to confirm the new device I am getting emails in my inbox, and I am not able to login in into account. Anyone, can you please tell me how to handle this or if I can do something with…
2
votes
1 answer

How to handle the plain/text POST request in the cypress

I have a postman collection and It's POST call and the request body is type of plain/text and I just want to automate this using cy.request but I'm not sure how to pass the test body in the cy.request body section and it returned 400 bad request if…
ArrchanaMohan
  • 2,314
  • 4
  • 36
  • 84
2
votes
5 answers

Cypress - iframe handling

I have some code that tries to catch elements inside an iframe but I just keep getting thrown back an error it('Send Medication',function(){ cy.get('.aut-iframe') .should(iframe => expect(iframe.contents().find('body')).to.exist) …
2
votes
2 answers

How to map different JSON objects from the fixture into specific spec test file in the cypress

I have the below Input.json as fixture and It contains two different test cases. Input.json (Fixture folder) [ { "searchKeyword":"cypress" }, { "username":"QATesting", "password":"testprofile" } ] The above…
ArrchanaMohan
  • 2,314
  • 4
  • 36
  • 84
2
votes
1 answer

Cypress cy.tick() not forwarding time the second time it is called

I have been reading the docs about cy.clock and using it with the component testing setup. But I seem to be doing something wrong here it.only('shows an estimate on when it is ready (fulfilled)', () => { const now = new Date() …
Norfeldt
  • 8,272
  • 23
  • 96
  • 152
2
votes
2 answers

Can't mock module import in Cypress Vue component tests

I'm new to Cypress component testing, but I was able to set it up easily for my Vue project. I'm currently investigating if we should replace Jest with Cypress to test our Vue components and I love it so far, there is only one major feature I'm…
pmrotule
  • 9,065
  • 4
  • 50
  • 58
1
vote
2 answers

the textarea value not changing with .type() by Cypress

I'm new to Cypress. I got the following error. assert expected to have value "New message from user134", but the value was ' ' Any idea what the problem is? This is the component that include the…
idiltugba
  • 323
  • 1
  • 2
  • 10
1
vote
1 answer

React js using Cypress to test Login Auth0

I want to test login auth0 with this code: file cypress/component/login.cy.jsx import App from "../../src/App"; describe('login.cy.jsx', () => { it('playground', () => { cy.viewport(1200,750) cy.mount() }) }) my…
1
2
3
11 12