DEV Community

JigNect Technologies
JigNect Technologies

Posted on

2

Cypress - Cross-Origin support - yay

Crossing origins is super common with sites that use third-party authentication, for example. Before, you would have to use programmatic authentication in Cypress tests, but this wasn’t indicative of how a real person would use the app. Now with cross-origin support, you no longer need to work around your login flow:

Due to how Cypress executes your tests in a browser, visiting another site was a huge technical hurdle due to cross-origin security limitations.

In Cypress 12 cy.session() included, which support out of experimental and into general availability status. Session support can tie closely with cross-origin in that you can save a user session (storage, cookies, etc.) after authentication and restore it in a subsequent test. This cuts down on overall test suite execution time as each test won’t need to go through the authentication flow.

Sample Code:

Image description

Read more at Cross-Origin-Testing

Witness how our meticulous approach and cutting-edge solutions elevated quality and performance to new heights. Begin your journey into the world of software testing excellence. To know more refer to Tools & Technologies & QA Services

Happy Automated Testing 🙂

Hostinger image

Get n8n VPS hosting 3x cheaper than a cloud solution

Get fast, easy, secure n8n VPS hosting from $4.99/mo at Hostinger. Automate any workflow using a pre-installed n8n application and no-code customization.

Start now

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs