Skip to content

Add dotenv environment variable support for Playwright tests #131

@krugazul

Description

@krugazul

Bug Report

Describe the bug
Playwright tests currently use hardcoded URLs and configuration. There is no support for environment variables, making it difficult to run tests in different environments or with custom settings.

To Reproduce
Run Playwright tests in the tests/ directory. The URLs and other config are hardcoded in the test files.

Expected behavior
Tests should use environment variables for configuration, such as the base URL, loaded via the dotenv package. This will allow flexible test configuration and easier CI integration.

Proposed Solution

  • Add dotenv as a dev dependency.
  • Load environment variables in Playwright test setup.
  • Use variables (e.g., process.env.BASE_URL) in test files instead of hardcoded values.

Additional context
This will improve test portability and allow for different environments (local, staging, CI) without code changes.


This issue was generated by GitHub Copilot.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions