Cypress: Difference between revisions

From bibbleWiki
Jump to navigation Jump to search
Created page with "=Introduction= This is notes of my usage of cypress =Configuration= When I installed Cypress it was v12 of the product. This has changed slightly from most of the tutorials as the name of the tests no longer have spec and but cy and reside in e2e rather than the integration folder. The other change was that Cypress has all tests isolated by default. I.E. it resets the browser in between tests <syntaxhighlight lang="ts"> import { defineConfig } from 'cypress' // eslint-d..."
 
Line 6: Line 6:
import { defineConfig } from 'cypress'
import { defineConfig } from 'cypress'


// eslint-disable-next-line import/no-default-export
export default defineConfig({
export default defineConfig({
   testIsolation: false,
   testIsolation: false,
Line 12: Line 11:
~                                                                                                                                                                 
~                                                                                                                                                                 
~       
~       
</syntaxhighlight>                                                                                                                                                        
</syntaxhighlight>
 
=Cypress EST API=
=Cypress EST API=
Perhaps an unusual usage but I use the to validate my OpenAPI 3.0 swagger files used in Node.
Perhaps an unusual usage but I use the to validate my OpenAPI 3.0 swagger files used in Node.

Revision as of 04:36, 5 June 2023

Introduction

This is notes of my usage of cypress

Configuration

When I installed Cypress it was v12 of the product. This has changed slightly from most of the tutorials as the name of the tests no longer have spec and but cy and reside in e2e rather than the integration folder. The other change was that Cypress has all tests isolated by default. I.E. it resets the browser in between tests

import { defineConfig } from 'cypress'

export default defineConfig({
   testIsolation: false,
})
~                                                                                                                                                                 
~

Cypress EST API

Perhaps an unusual usage but I use the to validate my OpenAPI 3.0 swagger files used in Node.