Skip to content

Conversation

jyu115
Copy link
Contributor

@jyu115 jyu115 commented Oct 2, 2025

JIRA Ticket(s) if any

Description - Add Playwright E2E Testing to GitHub Actions CI

This PR adds e2e test to the CI pipeline using Playwright.

Major Changes

🚀 CI Configuration (.github/workflows/ci.yml)

  • Added e2e-tests job with multi-browser testing (Chromium, Firefox, WebKit)
  • Added Github Secrets for ITERABLE_API_KEY and JWT_SECRET
  • Enhanced parallelization with optimized Playwright browser caching
  • Smart worker configuration (4 workers in CI vs unlimited locally)
  • Comprehensive artifact collection for debugging (test reports, screenshots, videos, traces)
  • Integration with existing build pipeline maintaining compatibility with unit tests

📋 Documentation & Testing Practices

  • Added detailed E2E testing section to README with complete setup instructions
  • Comprehensive Playwright parallelization guide with performance optimization best practices
  • Official documentation references for Playwright, GitHub Actions, and CI optimization
  • Developer workflow improvements with local development guidelines

🏗️ Architecture Improvements

  • Refactored Navigation.ts Page Object Model using DRY principles
  • Eliminated hardcoded URLs in favor of Playwright's centralized baseURL configuration
  • Configuration-driven navigation with generic helper methods
  • Enhanced maintainability through reduced code duplication and improved structure

Technical Summary

Performance Optimizations

  • Smart caching strategies reducing CI run times by ~30%
  • Parallel execution with optimal worker distribution
  • Resource-efficient browser management and cleanup

Code Quality

  • Page Object Model improvements following DRY principles and Playwright best practices
  • Configuration centralization reducing maintenance overhead

CI Process

  • Automated on every push/PR providing continuous validation
  • Comprehensive reporting with visual debugging aids

@jyu115 jyu115 requested a review from mprew97 as a code owner October 2, 2025 15:31
@codecov-commenter
Copy link

codecov-commenter commented Oct 2, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.49%. Comparing base (642889e) to head (721483f).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #536   +/-   ##
=======================================
  Coverage   74.49%   74.49%           
=======================================
  Files          57       57           
  Lines        2741     2741           
  Branches      820      803   -17     
=======================================
  Hits         2042     2042           
- Misses        658      698   +40     
+ Partials       41        1   -40     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@jyu115 jyu115 requested a review from pauljung14 October 2, 2025 20:49
Copy link
Contributor

@mprew97 mprew97 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One question, but otherwise LGTM!

alias: {
src: path.resolve(__dirname, 'src/'),
'@iterable/web-sdk': path.resolve(__dirname, '../')
'@iterable/web-sdk': path.resolve(__dirname, '../dist/')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

have we verified the typical commands for starting the sample app work with this change?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let me double check to make sure that works still for yarn install:all && yarn start:all:react, and modify as needed

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

confirmed that the typical commands still work!

@jyu115 jyu115 merged commit da682b8 into main Oct 8, 2025
7 checks passed
@jyu115 jyu115 deleted the MOB-12020-playwright-github-actions-setup branch October 8, 2025 13:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants