Skip to content

imamwahyudi08/Automation-Pintarnya

Repository files navigation

Automation-Pintarnya

Pintarnya Promo Page Automation Test

This repository contains end-to-end automated UI tests for the Pintarnya website, focusing on the "Cari Promo" section. Tests are written using Playwright with TypeScript and structured using the Page Object Model (POM) design pattern.

Project Structure

automation-pintarnya/
├── config/              # Global configuration and selectors
│   └── testConfig.ts
├── pages/               # Page Object Models
│   └── PromoPage.ts
├── tests/               # Test specifications
│   └── promo.spec.ts
├── utils/               # Utility functions
│   └── helpers.ts
├── playwright.config.ts # Playwright configuration
└── .github/workflows/   # GitHub Actions CI workflow

Test Scenario Covered

  • Navigate to the Pintarnya homepage
  • Click on the "Cari Promo" navigation button
  • Validate that the Promo page is displayed
  • Ensure at least one promo card is visible
  • Click the first promo card
  • Validate product detail is displayed correctly

Setup Instructions

  1. Install dependencies

    npm install
  2. Run tests locally

    npx playwright test
  3. Run tests for specific device (e.g., Mobile Chrome only)

    npx playwright test --project="Mobile Chrome"
  4. View test report

    npx playwright show-report

GitHub Actions

The project includes a CI workflow in .github/workflows/playwright.yml that runs tests automatically on push and pull requests targeting main or master. Tests are executed against:

  • Mobile Chrome (Pixel 5)
  • Mobile Safari (iPhone 12)

Test reports are uploaded as artifacts.

Notes

  • Default timeout is configured to 10 seconds per step (defaultTimeout: 10000).
  • waitForVisible() utility is used to ensure reliable visibility checks.
  • The test base URL is set to https://pintarnya.com/.

License

This project is open source and available under the MIT License.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published