I have the following plugin file for cypress: frontend/cypress/plugins/index.ts: When I run it on my machine it’s working but when I use cypress-io/github-action@v2 in my github actions I get the following error: This is my .github/workflows/cypress-tests.yml: My frontend/cypress.json config file is empty. This is my frontend/cypress/tsconfig.json in the cypress folder: This frontend/cypress/plugins/tsconfig.jsonis inside the Plugins folder: I have copied this
Tag: cypress
How to generate unique random emails with nodemailer
I would like to use nodemailer in a few tests to be able to pragmatically test the contents of an email that is sent. So far, its working great but there is one issue I haven’t been able to solve. I am using the createTestAccount from the Javascript nodemailer, and notice that it often returns me the same test email
Time comparison in Cypress
Issue occurs when I need to check for example that 11AM was 2hours before 1PM as my code takes difference as 10.(11 vs 1) as we have 12 hour time. Answer I notice you have the dayjs library. To handle parsing strings with various, add the customParseFormat plugin. Your dateString is passed into dayjs(dateString, format) as 1st parameter and format
Verify the checkbox is checked in Cypress
I want to verify the checkbox is checked. This is the HTML for the checkbox the js for it: Then on step definition: strangely Cypress shows that the expected value was true but the value was true Answer You have to change true to ‘true’. The true is a string.
Cypress not properly intercepting leaflet map tile calls
I am testing a react-leaflet based application in cypress. To avoid making tons of real maptile requests, I am trying to intercept calls to the mapbox maptile server, and replace with a dummy tile. I do this in my cypress/support.index.js file: A simple test: I took a look at Mock leaflet resources in Cypress, and this tactic seemed to work
How to retrieve Token for API calls in cypress
Due to a lack of knowledge in JS, I do face with below problem. I do automation testing with cypress and for external API endpoints, I need to use Dynamic Token that expires every 3600 secs. I did some short research and find out that, for reaching to JWT Token I will need 1st SSO login (that my app has).
Not able to find the locator which is inside a component in Cypress
I am trying to find the dropdown-arrow locator. I have used the cypress cmd – cy.get(‘.dropdown-arrow’).click() but it gives element not found error. Here is my code Answer From comments, shadow DOM is present. You can access elements within it either by adding this to cypress.json or in the test
Click multiple: true cypress
I have a page where I land that have about 15 icons on it all with the same source. The way im grabbing each element looks like this: The issue that have is that after clicking on an icon I have a model that pops up where I need to click another button before I can continue to the next
Issue with setting up jest mock
I have the following function that is used within cypress tests for which I want to do unit testing (filterTests.js): A test double for Cypress.env needs to be created. I’m not sure if this would technically be considered a stub, mock, fake, dummy, etc…, but the philosophical discussion isn’t the focus right now. It looks like in the Cypress world,
Cypress- SelectFile() Not working as expected in Chrome
Cypress Version: 9.5.0 Chrome Version: 98 Ive been trying to use cy.selectFile() to upload a file in Cypress test. The following code looks as such: The HTML of the File Input looks as such: The code when running the test through FF runs as expected and the file is uploaded with a 200 on the post request. However when running