Skip to content

Tinkering with Playwright and exploring TypeScript. These tests run in my main repo (readytotest.github.io) on PR/Push in a GitHub Actions workflow.

License

Notifications You must be signed in to change notification settings

readytotest/test-playwright

Repository files navigation

Playwright Test Automation Project

Quality gate

GitHub Actions GitGuardian GitHub Actions Playwright in readytotest.github.io Repo

GitHub commit activity GitHub last commit

Overview

I use Playwright at my current job and I tinker 🧰🪛🛠️🚧 with it here in my personal repo too!

Workflow

The scripts in this repository are designed to be executed within a GitHub Actions workflow that resides in my primary repository.
When a pull request or commit occurs in the primary repository, the following workflow is triggered:

  1. Both repos are checked out (the primary repo that contains my website and this repo that has the Playwright specs)
  2. A local Node.js server is started within the GitHub runner environment
  3. Playwright scripts located in this repo execute tests against the locally hosted GitHub pages site in my primary repo.

Usage

The main entry point for the Playwright scripts is located in scripts/navigation.ts. By default, these scripts are configured to interact with a local server running at http://localhost:3000.

NOTE! If you try to run these scripts on your computer they will fail because there is no local server running and the files for the website exist in a different repo. If you want to run these tests, it's easiest to just swap the localHost variable for production in the navigation.ts script. This will allow you to run these tests against the live site. Otherwise, you would need to also clone my main repo, open both repos in VSCode, start the server, and then run the tests.

Contributions

Feel free to contribute to this project by forking the repo and creating and submitting a pull request.

About

Tinkering with Playwright and exploring TypeScript. These tests run in my main repo (readytotest.github.io) on PR/Push in a GitHub Actions workflow.

Topics

Resources

License

Stars

Watchers

Forks