To execute both unit and e2e test use command
npm run test
Run the following command to execute unit tests
npm run test:unit
- Make sure you have access to the drive folder specified in the fstab of this project.
- Create all collaterals under the
/drafts/tests/doc-based
folder. - Publish it using AEM sidekick.
- Use cloud instance:https://author-p133911-e1313554.adobeaemcloud.com/.
- Create test collateral inside
/formsanddocuments/xwalk-test-collateral
folder and then publish it. - Create a page with a form block in
/drafts/tests/x-walk
folder in drive. - Add the published guideContainer.model.json url of the test collateral in the form block.
- Now publish the page using AEM sidekick.
Run the following command to execute integration tests
npm run test:e2e
To run a specific test file, use the following command
npm run test:e2e <name-of-the-test-file>
To debug a specific test file, use the following command
npm run debug:e2e <name-of-the-test-file>
NOTE: To debug your e2e test locally comment the globalSetup
in the playwright.config.js