Skip to main content

@acromedia/integration-tests

Overview

This package contains integration tests for the Gesso's Demo Sites using Playwright.

The tests are designed to run in different environments, such as production, staging, local, and merge request environmnets allowing for robust testing across multiple platforms.

Configuration

Copy the .env.example file to .env and update the values to match your environment.

If you want to run the tests against an MR environment, you can set the TEST_ENVIRONMENT to match your merge request ID ie: TEST_ENVIRONMENT=mr-1234 and specify the platforms to tests by setting the TEST_PLATFORMS variable to a comma-separated list of platforms ie: TEST_PLATFORMS=shopify, bigcommerce, drupal-commerce, drupal-commerce-jsonapi.

Installation

To install the package and its dependencies, run:

pnpm install

Make sure you have the necessary dependencies installed in your environment to run Playwright tests.

Scripts

pnpm test

Runs all Playwright tests in the default environment. Use this when setting TEST_ENVIRONMENT, TEST_PLATFORMS in the .env file.


```bash
pnpm test:ui

Runs the Playwright tests with the Playwright Test UI. This allows you to run tests interactively, debug, and see detailed test results.

pnpm test:production

Runs the Playwright tests in the production environment.

pnpm test:staging

Runs the Playwright tests in the staging environment.

pnpm test:local

Runs the Playwright tests in the local environment. This is useful for testing against a local server.