Skip to content

HurayraIIT/playwright-e2e-ea

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

88 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Playwright E2E Testing - Essential Addons for Elementor

Playwright Node.js License

Automated end-to-end testing suite for all Essential Addons for Elementor demo pages

πŸ“‹ Overview

This project provides comprehensive automated testing for Essential Addons for Elementor demo pages. It uses Playwright to perform visual regression testing and functional validation across all widget demos.


🎯 Project Status

πŸ“Š Test Coverage

Coverage Automated Total Tests Remaining

βœ… 81 Demos Automated | πŸ§ͺ 324 Total Tests | ⏳ 34 Demos Remaining | πŸ“ˆ 70.43% Complete


🎯 Purpose

  • Automate testing for all Essential Addons demo pages
  • Perform visual regression testing using screenshot comparison
  • Ensure widget functionality across different layouts
  • Maintain quality and consistency of demo pages
  • Provide continuous integration support

✨ Features

  • Visual Regression Testing: Screenshot-based comparison with 3% pixel difference tolerance
  • Parallel Execution: Tests run in parallel for faster execution
  • Comprehensive Coverage: 324 test cases across 81 widgets (70.43% of 115 total widgets)
  • CI/CD Ready: Configured for continuous integration environments
  • Detailed Reporting: HTML reports with screenshots, traces, and videos
  • Network Optimization: Blocks unnecessary third-party scripts for faster tests
  • Category Completion: 6 categories fully automated (Content, Documentation, Marketing, LearnDash, Form Styler, WooCommerce)

πŸš€ Getting Started

Prerequisites

  • Node.js 18 or higher
  • npm or yarn package manager

Installation

  1. Clone the repository:
git clone <repository-url>
cd playwright-e2e-ea
  1. Install dependencies:
npm install
  1. Install Playwright browsers:
npx playwright install

How To Update Playwright

# Update playwright
npm install -D @playwright/test@latest

# Install new browsers
npx playwright install

# See what version of Playwright you have by running the following command
npx playwright --version

Configuration

The project uses environment variables for configuration. Create a .env file in the root directory:

BASE_URL=https://essential-addons.com

πŸ§ͺ Running Tests

Run all tests

npx playwright test

Run tests in headed mode

npx playwright test --headed

Run specific test file

npx playwright test tests/creative-elements/interactive-cards.spec.js

View test report

npx playwright show-report

πŸ“ Project Structure

playwright-e2e-ea/
β”œβ”€β”€ tests/                          # Test files organized by category (81 spec files, 324 tests)
β”‚   β”œβ”€β”€ content-elements/            # Content element tests (25 specs, 111 tests) ✨
β”‚   β”‚   β”œβ”€β”€ advanced-accordion.spec.js
β”‚   β”‚   β”œβ”€β”€ advanced-google-map.spec.js
β”‚   β”‚   β”œβ”€β”€ advanced-menu.spec.js
β”‚   β”‚   β”œβ”€β”€ advanced-search.spec.js
β”‚   β”‚   β”œβ”€β”€ advanced-tabs.spec.js
β”‚   β”‚   β”œβ”€β”€ breadcrumbs.spec.js
β”‚   β”‚   β”œβ”€β”€ code-snippet.spec.js
β”‚   β”‚   β”œβ”€β”€ content-toggle.spec.js
β”‚   β”‚   β”œβ”€β”€ creative-buttons.spec.js
β”‚   β”‚   β”œβ”€β”€ dual-color-headline.spec.js
β”‚   β”‚   β”œβ”€β”€ event-calendar.spec.js
β”‚   β”‚   β”œβ”€β”€ feature-list.spec.js
β”‚   β”‚   β”œβ”€β”€ flip-box.spec.js
β”‚   β”‚   β”œβ”€β”€ info-box.spec.js
β”‚   β”‚   β”œβ”€β”€ logo-carousel.spec.js
β”‚   β”‚   β”œβ”€β”€ offcanvas-content.spec.js
β”‚   β”‚   β”œβ”€β”€ protected-content.spec.js
β”‚   β”‚   β”œβ”€β”€ simple-menu.spec.js
β”‚   β”‚   β”œβ”€β”€ static-product.spec.js
β”‚   β”‚   β”œβ”€β”€ sticky-video.spec.js
β”‚   β”‚   β”œβ”€β”€ team-members-carousel.spec.js
β”‚   β”‚   β”œβ”€β”€ team-members.spec.js
β”‚   β”‚   β”œβ”€β”€ testimonial-slider.spec.js
β”‚   β”‚   β”œβ”€β”€ testimonials.spec.js
β”‚   β”‚   └── tooltip.spec.js
β”‚   β”œβ”€β”€ creative-elements/          # Creative element tests (15 specs, 71 tests)
β”‚   β”‚   β”œβ”€β”€ countdown.spec.js
β”‚   β”‚   β”œβ”€β”€ counter.spec.js
β”‚   β”‚   β”œβ”€β”€ divider.spec.js
β”‚   β”‚   β”œβ”€β”€ fancy-chart.spec.js
β”‚   β”‚   β”œβ”€β”€ fancy-text.spec.js
β”‚   β”‚   β”œβ”€β”€ filterable-gallery.spec.js
β”‚   β”‚   β”œβ”€β”€ image-accordion.spec.js
β”‚   β”‚   β”œβ”€β”€ image-comparison.spec.js
β”‚   β”‚   β”œβ”€β”€ image-hotspots.spec.js
β”‚   β”‚   β”œβ”€β”€ image-scroller.spec.js
β”‚   β”‚   β”œβ”€β”€ interactive-cards.spec.js
β”‚   β”‚   β”œβ”€β”€ interactive-circle.spec.js
β”‚   β”‚   β”œβ”€β”€ interactive-promo.spec.js
β”‚   β”‚   β”œβ”€β”€ one-page-nav.spec.js
β”‚   β”‚   └── progress-bar.spec.js
β”‚   β”œβ”€β”€ documentation-elements/     # Documentation element tests (3 specs, 5 tests) ✨
β”‚   β”‚   β”œβ”€β”€ betterdocs-category-box.spec.js
β”‚   β”‚   β”œβ”€β”€ betterdocs-category-grid.spec.js
β”‚   β”‚   └── betterdocs-search-form.spec.js
β”‚   β”œβ”€β”€ dynamic-content-elements/  # Dynamic content element tests (3 specs, 10 tests)
β”‚   β”‚   β”œβ”€β”€ advanced-data-table.spec.js
β”‚   β”‚   β”œβ”€β”€ content-timeline.spec.js
β”‚   β”‚   └── table.spec.js
β”‚   β”œβ”€β”€ form-styler-elements/       # Form styler element tests (11 specs, 34 tests) ✨
β”‚   β”‚   β”œβ”€β”€ caldera-forms.spec.js
β”‚   β”‚   β”œβ”€β”€ contact-form-7.spec.js
β”‚   β”‚   β”œβ”€β”€ fluent-forms.spec.js
β”‚   β”‚   β”œβ”€β”€ formstack.spec.js
β”‚   β”‚   β”œβ”€β”€ gravity-forms.spec.js
β”‚   β”‚   β”œβ”€β”€ login-register-form.spec.js
β”‚   β”‚   β”œβ”€β”€ mailchimp.spec.js
β”‚   β”‚   β”œβ”€β”€ ninja-forms.spec.js
β”‚   β”‚   β”œβ”€β”€ typeform.spec.js
β”‚   β”‚   β”œβ”€β”€ weforms.spec.js
β”‚   β”‚   └── wpforms.spec.js
β”‚   β”œβ”€β”€ learndash-elements/         # LearnDash element tests (1 spec, 5 tests) ✨
β”‚   β”‚   └── learndash-course-list.spec.js
β”‚   β”œβ”€β”€ marketing-elements/         # Marketing element tests (4 specs, 22 tests) ✨
β”‚   β”‚   β”œβ”€β”€ call-to-action.spec.js
β”‚   β”‚   β”œβ”€β”€ multicolumn-pricing-table.spec.js
β”‚   β”‚   β”œβ”€β”€ price-menu.spec.js
β”‚   β”‚   └── pricing-table.spec.js
β”‚   β”œβ”€β”€ social-elements/            # Social element tests (3 specs, 6 tests)
β”‚   β”‚   β”œβ”€β”€ instagram-feed.spec.js
β”‚   β”‚   β”œβ”€β”€ twitter-feed-carousel.spec.js
β”‚   β”‚   └── twitter-feed.spec.js
β”‚   β”œβ”€β”€ woocommerce-elements/       # WooCommerce element tests (16 specs, 60 tests) ✨
β”‚   β”‚   β”œβ”€β”€ woo-account-dashboard.spec.js
β”‚   β”‚   β”œβ”€β”€ woo-add-to-cart.spec.js
β”‚   β”‚   β”œβ”€β”€ woo-cart.spec.js
β”‚   β”‚   β”œβ”€β”€ woo-checkout.spec.js
β”‚   β”‚   β”œβ”€β”€ woo-cross-sells.spec.js
β”‚   β”‚   β”œβ”€β”€ woo-product-carousel.spec.js
β”‚   β”‚   β”œβ”€β”€ woo-product-compare.spec.js
β”‚   β”‚   β”œβ”€β”€ woo-product-gallery.spec.js
β”‚   β”‚   β”œβ”€β”€ woo-product-grid.spec.js
β”‚   β”‚   β”œβ”€β”€ woo-product-images.spec.js
β”‚   β”‚   β”œβ”€β”€ woo-product-list.spec.js
β”‚   β”‚   β”œβ”€β”€ woo-product-price.spec.js
β”‚   β”‚   β”œβ”€β”€ woo-product-rating.spec.js
β”‚   β”‚   β”œβ”€β”€ woo-product-slider.spec.js
β”‚   β”‚   β”œβ”€β”€ woo-thank-you.spec.js
β”‚   β”‚   └── woocommerce-product-collections.spec.js
β”‚   └── example.spec.js             # Example test
β”œβ”€β”€ global-setup.js                 # Global test configuration
β”œβ”€β”€ playwright.config.js            # Playwright configuration
β”œβ”€β”€ package.json                    # Project dependencies
└── README.md                       # This file

✨ = Fully automated category (100% coverage)

βš™οΈ Configuration Details

Playwright Config

  • Test Directory: ./tests
  • Parallel Execution: Enabled
  • Workers: 4 (in CI and local)
  • Timeout: 30 seconds per test
  • Retries: 1 (in CI), 0 (local)
  • Screenshot Diff Tolerance: 3% max pixel ratio
  • Base URL: https://essential-addons.com

Global Setup

The global-setup.js file includes:

  • Route blocking for third-party analytics and tracking scripts
  • Custom page goto wrapper with domcontentloaded wait
  • Lightbox close button handler

πŸ“Š Publishing Reports

To publish test reports to the live server:

npm run publish-report

This command uses rsync to deploy the playwright-report directory to the remote server.

🎨 Test Patterns

Basic Test Structure

import { test, expect } from "../../global-setup";

test.describe("Widget Name", () => {
  let slug = "/widget-slug";
  let heading = "Widget Name";

  test.beforeEach(async ({ page }) => {
    await page.goto(slug);
    await expect.soft(page.getByRole("heading", { name: heading, exact: true })).toBeVisible();
  });

  test("Layout 01", async ({ page }) => {
    const section = page.getByTestId("element-id");
    await section.scrollIntoViewIfNeeded();
    await expect(section).toHaveScreenshot();
  });
});

πŸ“ˆ Automation Progress

This section tracks the automation status of all Essential Addons for Elementor demo pages. Checked items have automated tests implemented.

Content Elements (24)

  • Advanced Search
  • Event Calendar
  • Info Box
  • Testimonial Slider
  • Testimonials
  • Toggle
  • Simple Menu
  • Flip Box
  • Team Member Carousel
  • Team Member
  • Protected Content
  • Feature List
  • Creative Buttons
  • Logo Carousel
  • Advanced Accordion
  • Tooltip
  • Offcanvas
  • Breadcrumb
  • Static Product
  • Dual Color Heading
  • Advanced Tabs
  • Sticky Video
  • Advanced Menu
  • Code Snippet

Dynamic Content Elements (13)

  • Advanced Data Table
  • Advanced Google Map
  • Post Grid
  • Business Reviews
  • Post Block
  • Content Ticker
  • Data Table
  • NFT Gallery
  • Post Timeline
  • Content Timeline
  • Smart Post List
  • Dynamic Gallery
  • Post Carousel

Marketing Elements (4)

  • Pricing Table
  • Call to Action
  • Price Menu
  • Multicolumn Pricing Table

Creative Elements (20)

  • Interactive Circle
  • Filterable Gallery
  • Divider
  • Lightbox and Modal
  • SVG Draw
  • Interactive Cards
  • Image Hotspots
  • Fancy Text
  • Flip Carousel
  • Fancy Chart
  • Interactive Promo
  • Image Scroller
  • Counter
  • Progress Bar
  • Stacked Cards
  • One Page Navigation
  • Image Comparison
  • Countdown
  • Image Accordion
  • 360 Degree Photo Viewer

Figma Design (1)

  • Figma to Elementor Converter

Form Styler Elements (11)

  • Typeform
  • MailChimp
  • weForms
  • Contact Form 7
  • Caldera Forms
  • Formstack
  • WPForms
  • Login Register Form
  • Gravity Forms
  • Ninja Forms
  • FluentForm

Social Elements (4)

  • Twitter Feed Carousel
  • Twitter Feed
  • Instagram Feed
  • Facebook Feed

LearnDash Elements (1)

  • LearnDash Course List

Documentation Elements (3)

  • BetterDocs Category Grid
  • BetterDocs Category Box
  • BetterDocs Search Form

WooCommerce Elements (16)

  • Woo Thank You
  • Woo Cart
  • Woo Product Carousel
  • Woo Product Gallery
  • Woo Checkout
  • Woo Product Slider
  • Woo Product Collections
  • Woo Product Grid
  • Woo Product Compare
  • Woo Cross Sells
  • Woo Account Dashboard
  • Woo Product List
  • Woo Product Price
  • Woo Add To Cart
  • Woo Product Rating
  • Woo Product Images

Extensions (18)

  • Dynamic Tags
  • Scroll To Top
  • Content Protection
  • Post Duplicator
  • Table of Contents
  • Parallax
  • Reading Progress Bar
  • Particles
  • Advanced Tooltip
  • Conditional Display
  • Wrapper Link
  • Interactive Animations
  • Hover Interaction
  • Custom JS
  • Cross-Domain Copy Paste
  • Liquid Glass Effects
  • Custom Cursor
  • Image Masking
  • Vertical Text Orientation

Total Progress: 81/115 demos automated (70.43%) | 324 individual test cases

Breakdown by Category:

Category Demos Tests Coverage
βœ… Content Elements 24/24 111 tests 100% ✨
βœ… Creative Elements 15/20 71 tests 75%
βœ… Documentation Elements 3/3 5 tests 100% ✨
βœ… Dynamic Content Elements 4/13 10 tests 31%
βœ… Form Styler Elements 11/11 34 tests 100% ✨
βœ… LearnDash Elements 1/1 5 tests 100% ✨
βœ… Marketing Elements 4/4 22 tests 100% ✨
βœ… Social Elements 3/4 6 tests 75%
βœ… WooCommerce Elements 16/16 60 tests 100% ✨
⏳ Figma Design 0/1 0 tests 0%
⏳ Extensions 0/18 0 tests 0%

πŸŽ‰ Fully Automated Categories: Content Elements, Documentation Elements, Marketing Elements, LearnDash Elements, Form Styler Elements, WooCommerce Elements

πŸ”— Links

About

This project provides comprehensive automated testing for Essential Addons for Elementor demo pages. It uses Playwright to perform visual regression testing and functional validation across all widget demos.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors