Stage 2 Integration with Cypress
[Step 0] - Installation of dependencies
- npm
- yarn
- pnpm
npm --save @mapgrab/cypress
yarn add @mapgrab/cypress
pnpm add @mapgrab/cypress
[Step 1] - Integration with framework
Add this changes to support/e2e.ts file
//support/e2e.ts
import { setupCommands } from '@mapgrab/cypress';
import './commands';
setupCommands();
[Step 2] - Write first test
describe('Map', { testIsolation: false }, () => {
it('should display city on map', () => {
cy.mapLocator('layer[id=cities]').first().should('be.visibleOnMap');
});
});