GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - guigarm85/playwright-testing: Playwright and JavaScript test automation practice using SauceDemo.

BranchesTags
Open more actions menu

Latest commit

 

History

2 Commits
2 Commits

Folders and files

NameName
Last commit message
Last commit date
fixtures
fixtures
 
 
pages
pages
 
 
tests
tests
 
 
.gitignore
.gitignore
 
 
README.md
README.md
 
 
package-lock.json
package-lock.json
 
 
package.json
package.json
 
 
playwright.config.ts
playwright.config.ts
 
 

Repository files navigation

Playwright Testing Portfolio

I built this project to practice web testing with Playwright and JavaScript using SauceDemo, a public demo e-commerce website.

I started with login and product tests, then added negative scenarios, cart validation, and a complete checkout flow. I used Page Object Model (POM) to organize page interactions and a custom fixture to reuse the login setup.

Test scenarios

The project includes seven automated tests:

Test What I check
Successful login Valid credentials redirect the user to the Products page.
Login with incorrect password An incorrect password displays the expected error message.
Login with locked-out user A locked-out user cannot log in and receives the expected error message.
Add backpack to cart Adding a Sauce Labs Backpack updates the cart badge to 1.
Verify and remove backpack from cart The cart displays the correct product, quantity, and price. After removal, the product and cart badge disappear.
Complete checkout successfully The user completes a simulated purchase and sees the order confirmation message.
Verify checkout with empty required fields The checkout displays a required-field error and does not advance when customer information is empty.

Each test runs independently, with its own browser context and required setup.

Project structure

  • tests/ — Four test files covering login, products, cart, and checkout.
  • pages/ — Page Objects for LoginPage, ProductsPage, CartPage, and CheckoutPage.
  • fixtures/fixtures.js — Custom fixture that prepares an authenticated session for tests requiring login.
  • playwright.config.ts — Playwright configuration for Chromium, Firefox, and WebKit.
  • package.json — Project dependencies, including Playwright Test.

I keep the locators and page actions in the Page Objects and the assertions in the test files. This makes the tests easier to read and maintain.

Getting started

Install Node.js 20 or newer, then open the project folder in a terminal.

Install the dependencies and Playwright browsers:

npm ci
npx playwright install

Run all tests across the three configured browsers:

npx playwright test

Run only Chromium:

npx playwright test --project=chromium

Open the HTML test report:

npx playwright show-report

Environment and limitations

The tests require internet access because they run against the public SauceDemo website. They use the demo credentials provided by the website, not private accounts or real payment information.

The checkout test completes a simulated order, not a real purchase.

Test results may depend on the availability and behavior of SauceDemo. Reports and traces are generated locally and excluded from Git version control.

Test results

On 7 November 2026, I ran all seven scenarios across Chromium, Firefox, and WebKit using Playwright.

  • Total executions: 21
  • Passed: 21
  • Failed: 0
  • Browsers: Chromium, Firefox, WebKit
  • Workers: 4
  • Execution time: 14.4 seconds

I also ran the seven tests together in Chromium after reviewing and refactoring the Page Objects. All seven passed.

This is a personal learning project that I developed and reviewed while rebuilding my practical software testing skills.

About

Playwright and JavaScript test automation practice using SauceDemo.

Topics

javascriptplaywrightqa-portfoliosaucedemosoftware-testingtest-automation

Resources

Readme
Activity

Stars

2 stars

Watchers

0 watching

Forks

1 fork
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.