This directory contains end-to-end tests for ZAP, organized by test mode (zigbee, matter, multiprotocol).
cypress/ ├── e2e/ │ ├── common/ # Tests that work across all modes │ ├── zigbee/ # Zigbee-specific tests │ ├── matter/ # Matter-specific tests ├── multiprotocolFixtures/ # Test fixtures for Muliprotocol mode │ └── [other folders] # Legacy tests (still supported for backward compatibility) ├── fixtures/ # Test fixtures for Zigbee mode ├── matterFixtures/ # Test fixtures for Matter mode ├── mmultiprotocolFixtures/ # Test fixtures for Muliprotocol mode └── support/ # Cypress support files (commands, etc.)
Tests are automatically filtered based on the mode specified when running:
npm run test:e2e or npm run test:e2e-cinpm run test:e2e-matter or npm run test:e2e-matter-cinpm run test:e2e-multiprotocol or npm run test:e2e-multiprotocol-ciTests that are specific to a particular mode should be placed in the corresponding folder:
cypress/e2e/zigbee/ - Zigbee-only testscypress/e2e/matter/ - Matter-only testscypress/e2e/multiprotocol/ - Multiprotocol-only testsTests that work across all modes should be placed in:
cypress/e2e/common/ - Shared tests for all modesTests in the root cypress/e2e/ folder (outside of organized folders) are still supported for backward compatibility. These tests will run for all modes unless they have explicit mode checks.
Each mode has its own fixture folder:
cypress/fixtures/data.json - Zigbee test datacypress/matterFixtures/data.json - Matter test datacypress/multiprotocolFixtures/data.json - Multiprotocol test dataThe appropriate fixture folder is automatically selected based on the test mode.
If you need to write a test that only runs in a specific mode, you can:
Place it in the mode-specific folder (recommended):
cypress/e2e/matter/cypress/e2e/zigbee/cypress/e2e/multiprotocol/Use mode checks in the test (for legacy tests):
if (Cypress.env('mode') !== 'matter') { return // Skip test }
The test filtering is configured in cypress.config.js using the mode environment variable, which is set by src-script/zap-uitest.js when running tests.