This project contains automated tests using Cucumber.js and Playwright.
- Install dependencies:
npm install
The test configuration is managed in config/test-config.js. You can modify this file directly or use environment variables to override the default settings.
- Browser Type: Choose between Chromium, Firefox, or WebKit
- Headless Mode: Run tests with or without visible browser
- Viewport Size: Configure browser window dimensions
- Test Timeouts: Set global timeout for test steps
- Screenshots: Enable/disable screenshots on test failure
- Test Data: Configure test credentials and other data
You can use the following environment variables to override configuration:
BROWSER: Set browser type ('chromium', 'firefox', 'webkit')HEADLESS: Control headless mode ('true', 'false')SLOW_MO: Add delay between test actions in millisecondsTIMEOUT: Set global timeout in millisecondsBASE_URL: Override the base URLTEST_USERNAME: Set test usernameTEST_PASSWORD: Set test password
Run all feature tests:
npm run mcp
- Headless Mode (default):
npm run mcp:headless - Headed Mode (browser visible):
npm run mcp:headed - Specific Browser:
- Firefox:
npm run mcp:firefox - WebKit:
npm run mcp:webkit - Chromium:
npm run mcp:chrome
- Firefox:
- Run only login tests:
npm run mcp:login - Slow motion for debugging:
npm run mcp:slow - Generate HTML report:
npm run mcp:report
You can also set custom environment variables before running tests:
set BASE_URL=https://dev.gatherit.co&& npm run mcp
For multiple options:
set HEADLESS=false&& set BROWSER=firefox&& set SLOW_MO=50&& npm run mcp
When a test fails, a screenshot is automatically captured and saved to the screenshots directory (if enabled in config).
The tests are written in Gherkin format in .feature files. The main features include:
- Login functionality
- Project creation
- Item management