- Follow the Page Object Model pattern strictly
- Separate locators and actions in page object files
- Maintain directory structure that mirrors business logic
- Page objects should be independent from one another when possible
- Reuse existing page objects and utilities before creating new ones
- NO conditionals in test files
- Instead of adding comments to separate test sections, use test.step, but don't overdo it
- Follow DRY (Don't Repeat Yourself) principle
- Follow eslint/tslint rules
- Do not add unnecessary comments
- Before writing new tests or page objects:
- Analyze existing similar examples in the codebase
- Follow established patterns and practices
- Review the readme.md file for comprehensive best practices
- Page objects should follow a consistent naming convention
- Utility functions should be centralized and well-documented (utils directory)
- Some global variables can be found in the globalVariables directory
- Implement proper timeout handling for asynchronous operations
- Ensure tests are resilient to environmental differences