From 5a487b7d6527ea1b591ebfe5c79062ee38955103 Mon Sep 17 00:00:00 2001 From: "Md. Nahid Hasan" <42797913+nahidthenh@users.noreply.github.com> Date: Thu, 2 Jan 2025 14:29:23 +0600 Subject: [PATCH] Access Token Permison Update - Publish Test Result - Send Slack Report 100% Done --- .github/workflows/playwright.yml | 4 --- readme.md | 48 +++++++++++++++----------------- 2 files changed, 22 insertions(+), 30 deletions(-) diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml index b77c0bc..aaa1e59 100644 --- a/.github/workflows/playwright.yml +++ b/.github/workflows/playwright.yml @@ -37,10 +37,6 @@ jobs: run: npx playwright test --project=chromium --workers=4 continue-on-error: true # Ensures workflow continues even if tests fail - # - name: Move HTML Report - # run: mv playwright-report /tmp/playwright-report - # continue-on-error: true # Ensures workflow continues even if tests fail - - name: Upload Playwright report if: ${{ !cancelled() }} uses: actions/upload-artifact@v4 diff --git a/readme.md b/readme.md index 51d41f3..08c80a6 100644 --- a/readme.md +++ b/readme.md @@ -1,7 +1,7 @@ # EmbedPress Test Automation Testing the EmbedPress Plugin Using Playwright -# About EmbedPress? +# About EmbedPress EmbedPress – embed from unlimited sources – embed pdf with 3d flipbook viewer, embed youtube, social feeds, google docs, maps, vimeo, wistia, spotify, etc without coding & display in websites created with elementor, gutenberg block editor, or other page builders @@ -10,35 +10,31 @@ EmbedPress enhances the interactive storytelling on your WordPress website by of Fuel up your website’s engagement and make it aesthetically pleasing by embedding content directly in Classic Editor, Gutenberg Block Editor, Elementor, or by using EmbedPress shortcodes on other WordPress page builders with ease. ## Getting Started - Install playwright using the following command: - -### Step 1 - Clone this repo -```bash -git clone git@github.com:nahidthenh/embedpress-playwright-automation.git - ``` -### Step 2 - Install NPM -```bash -npm install -f - +npm init playwright@latest ``` -### Step 3 - Running the Script -```bash -npx playwright test +Install dotenv: ``` - -### Step 3.1 - Running a Specific Test -```bash -npx playwright test tests/gutenberg/modern_pdf.spec.js +npm install dotenv@latest ``` - -### Step 3.2 - Running a Specific Test on a Specific Browser -```bash -npx playwright test tests/gutenberg/modern_pdf.spec.js --project chromium +Install playwright-slack-report ``` - -### Step 3.3 - Running a Specific Test on a Specific Browser with headed mode -```bash -npx playwright test tests/gutenberg/modern_pdf.spec.js --project chromium --headed +npm install playwright-slack-report@latest +``` +To update playwright: +``` +npm install -D @playwright/test@latest +``` +Usually after Playwright update, browsers need to be updated with command: +``` +npx playwright install --with-deps +``` +Install WordPress e2e test Utils For Playwright +Documentation: https://github.com/WordPress/gutenberg/tree/trunk/packages/e2e-test-utils-playwright +``` +npm install @wordpress/e2e-test-utils-playwright +``` +Test Result +Result: https://nahidthenh.github.io/embedpress-playwright-automation/ ``` \ No newline at end of file