https://github.com/pickleboxer/qavapeinitaly
https://github.com/pickleboxer/qavapeinitaly
Last synced: 11 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/pickleboxer/qavapeinitaly
- Owner: PickleBoxer
- Created: 2025-07-02T09:00:51.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2025-07-02T09:29:40.000Z (12 months ago)
- Last Synced: 2025-07-02T09:39:32.723Z (12 months ago)
- Language: JavaScript
- Size: 0 Bytes
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# VapeIniItaly E2E Tests
End-to-end testing suite for the VapeIniItaly website using [Playwright](https://playwright.dev/).
## đ Overview
This project contains automated end-to-end tests for the VapeIniItaly e-commerce website. It tests critical user flows including:
- Age verification popup functionality
- Cookie consent handling
- MailChimp popup interactions
- User authentication
- Payment options validation
The tests run on Chromium by default, with configurations available for Firefox and WebKit.
## đ§ Setup
### Prerequisites
- Node.js 16 or higher
- npm or yarn
### Installation
1. Clone the repository:
```bash
git clone https://github.com/yourusername/vapeinitaly-tests.git
cd vapeinitaly-tests
```
2. Install dependencies:
```bash
npm ci
```
3. Install Playwright browsers:
```bash
npx playwright install --with-deps
```
4. Set up environment variables:
```bash
npm run setup-env
```
This will create a `.env` file from the `.env.example` template if one doesn't exist.
Update the `.env` file with your test credentials.
## đ Running Tests
### Run all tests:
```bash
npm test
```
### Run specific test categories:
```bash
# Run only functional tests
npx playwright test tests/UI/campaigns/functional/
```
### Run specific test areas:
```bash
# Run login/logout tests
npx playwright test tests/UI/campaigns/functional/FO/01_login/
```
### Run a specific test file:
```bash
npx playwright test tests/UI/campaigns/01_test.spec.js
```
### Run tests with UI mode:
```bash
npx playwright test --ui
```
### Run tests in headed mode (to see the browser):
```bash
npx playwright test --headed
```
### Run a specific test by title pattern:
```bash
npx playwright test -g "Payment Option"
```
## đ Test Reports
After running tests, you can view the HTML report:
```bash
npx playwright show-report
```
The report will be available at `playwright-report/index.html`.
## đ Project Structure
### Test Categories
#### đ§ **Functional Tests** (`functional/FO/`)
Tests that verify specific functionality works as expected.
#### đ **Regression Tests** (`regression/`)
Tests that ensure existing functionality continues to work after changes.
#### ⥠**Sanity Tests** (`sanity/`)
Quick smoke tests to verify basic functionality.
#### đ **Integration Tests** (`01_test_refactored.spec.js`)
Complex cross-functional tests.
### Configuration Files
- **playwright.config.js** - Main Playwright configuration
- **.github/workflows/** - CI/CD workflow configuration
- **.env** - Local environment variables (not committed to git)
- **.env.example** - Template for environment variables
- **TEST_ORGANIZATION.md** - Detailed test organization documentation
## đ Environment Variables
The following environment variables are required:
- `TEST_USER_EMAIL` - Email for user authentication tests
- `TEST_USER_PASSWORD` - Password for user authentication tests
> **âšī¸ Note:**
> The following variables are **only required for GitHub workflows** and are **not necessary for local development**:
>
> - `QA_UPLOAD_TOKEN` â Token for uploading test results to the reporting API
> - `API_BASE_URL` â Base URL for the API used in tests
For local development, these can be set in the `.env` file.
For CI/CD, these are set as GitHub secrets.
## đ¤ CI/CD Integration
Tests are automatically run on GitHub Actions:
- On manual triggers (workflow_dispatch)
- On a nightly schedule (midnight)
The workflow uploads test results to a reporting API for monitoring.
## đ ī¸ Troubleshooting
If you encounter issues with environment variables:
1. Make sure the `.env` file exists and contains the required variables
2. Run `npm run setup-env` to verify the setup
For test failures, check the screenshots and traces in the `test-results/` directory.