Skip to content
Advertisement

Tag: cypress

Cypress is not running in ci SyntaxError: Unexpected token ‘export’ with cypress-io/github-action@v2 typescript

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

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.

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).

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

Advertisement