Skip to content

fix: profile photo priority higher than avatar fields #540

fix: profile photo priority higher than avatar fields

fix: profile photo priority higher than avatar fields #540

Workflow file for this run

name: Playwright tests/e2e
on:
workflow_dispatch:
inputs:
testsuite:
description: 'Test suite to run'
required: true
default: 'E2E'
type: choice
options:
- 'E2E'
schedule:
# 1:00 AM Bangladesh Time
- cron: '0 19 * * 0'
push:
branches: ['develop']
pull_request:
branches: ['develop']
jobs:
test:
if: github.repository != 'weDevsOfficial/wp-user-frontend' && github.repository != 'weDevsOfficial/wpuf-pro'
timeout-minutes: 240
runs-on: ubuntu-22.04
steps:
# Setup PHP
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: "7.4"
# Checkout WP-User-Frontend repo
- name: Checkout testing repo
id: clone-wp-user-frontend
uses: actions/checkout@v4
# Use desired version of NodeJS
- name: Use desired version of NodeJS
uses: actions/setup-node@v4
with:
node-version: 18
cache: npm
# Clone wpuf-pro
- name: Clone wpuf-pro
id: clone-wpuf-pro
uses: actions/checkout@v4
with:
repository: weDevsOfficial/wpuf-pro
token: ${{ secrets.ACCESS_TOKEN }}
path: plugins/wpuf-pro
ref: develop
# Build wpuf-pro
- name: Build WPUF-pro
working-directory: plugins/wpuf-pro
run: |
composer i --no-dev -o
composer update --no-dev -o
npm i --legacy-peer-deps
grunt --force
# Build wp-user-frontend
- name: Build wpuf-lite
run: |
composer i --no-dev -o
composer update --no-dev -o
npm i
npm run build
grunt release --force
grunt --force
# Install test dependencies with performance optimizations
- name: Install test dependencies
working-directory: tests/e2e
run: |
npm ci --prefer-offline --no-audit --no-fund
- name: Install Plugins
working-directory: plugins/
run: |
# Download and extract WP Mail Log
wget https://downloads.wordpress.org/plugin/wp-mail-log.latest-stable.zip
unzip wp-mail-log.latest-stable.zip
rm wp-mail-log.latest-stable.zip
# Download and extract WooCommerce
wget https://downloads.wordpress.org/plugin/woocommerce.latest-stable.zip
unzip woocommerce.latest-stable.zip
rm woocommerce.latest-stable.zip
# Download and extract Easy Digital Downloads
wget https://downloads.wordpress.org/plugin/easy-digital-downloads.latest-stable.zip
unzip easy-digital-downloads.latest-stable.zip
rm easy-digital-downloads.latest-stable.zip
# Download and extract WC Vendors
wget https://downloads.wordpress.org/plugin/wc-vendors.latest-stable.zip
unzip wc-vendors.latest-stable.zip
rm wc-vendors.latest-stable.zip
# Download and extract WC Multivendor Membership
wget https://downloads.wordpress.org/plugin/wc-multivendor-membership.latest-stable.zip
unzip wc-multivendor-membership.latest-stable.zip
rm wc-multivendor-membership.latest-stable.zip
# Download and extract Dokan
wget https://downloads.wordpress.org/plugin/dokan-lite.latest-stable.zip
unzip dokan-lite.latest-stable.zip
rm dokan-lite.latest-stable.zip
# # Download and extract The Events Calendar
# wget https://downloads.wordpress.org/plugin/the-events-calendar.latest-stable.zip
# unzip the-events-calendar.latest-stable.zip
# rm the-events-calendar.latest-stable.zip
# Start wordpress environment
- name: Start WordPress Env and Show URL
id: wp-env
if: success()
uses: nick-fields/retry@v3
with:
timeout_minutes: 4
max_attempts: 2
retry_on: error
command: |
cd tests/e2e
npx wp-env start
# Cache browser binaries, cache key is based on Playwright version and OS
- name: Cache playwright binaries
id: playwright-cache
uses: actions/cache@v4
with:
path: |
~/.cache/ms-playwright
key: ${{ runner.os }}-playwright-${{ env.PLAYWRIGHT_VERSION }}
restore-keys: |
${{ runner.os }}-playwright-
# Install browser binaries & OS dependencies if cache missed
- name: Install Playwright browser binaries & OS dependencies
id: pw-install
if: steps.playwright-cache.outputs.cache-hit != 'true'
working-directory: tests/e2e
run: |
npx playwright install chromium --with-deps
# Run Playwright tests/e2e
- name: 🧪 Run e2e tests
env:
CI: true
# Test environment variables
BASE_URL: ${{ secrets.QA_BASE_URL }}
ADMIN_USERNAME: ${{ secrets.QA_ADMIN_USERNAME }}
ADMIN_PASSWORD: ${{ secrets.QA_ADMIN_PASSWORD }}
WPUF_PRO_LICENSE_KEY: ${{ secrets.WPUF_PRO_LICENSE_KEY }}
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
GOOGLE_MAP_API_KEY: ${{ secrets.GOOGLE_MAP_API_KEY }}
RECAPTCHA_SITE_KEY: ${{ secrets.RECAPTCHA_SITE_KEY }}
RECAPTCHA_SECRET_KEY: ${{ secrets.RECAPTCHA_SECRET_KEY }}
CLOUDFLARE_TURNSTILE_SITE_KEY: ${{ secrets.CLOUDFLARE_TURNSTILE_SITE_KEY }}
CLOUDFLARE_TURNSTILE_SECRET_KEY: ${{ secrets.CLOUDFLARE_TURNSTILE_SECRET_KEY }}
if: success() && (github.event_name != 'workflow_dispatch' || ( github.event_name == 'workflow_dispatch' && (github.event.inputs.testsuite == 'E2E' || github.event.inputs.testsuite == 'All')))
working-directory: tests/e2e
run: |
mkdir -p test-results
npm run test:sharded:ci
# continue-on-error: true
# Generate and post advanced test summary
- name: Generate and post advanced test summary
if: always()
working-directory: tests/e2e
run: npm run sharded-summary
# ✅ Upload Playwright HTML report (always)
- name: Upload Playwright HTML Report
if: always()
uses: actions/upload-artifact@v4
with:
name: playwright-report
path: |
tests/e2e/playwright-report/
tests/e2e/test-results/
retention-days: 1
# Send Email Report if passed
- name: Send Test Report on email (Passed)
if: success()
uses: dawidd6/action-send-mail@v3
with:
server_address: smtp.gmail.com
server_port: 465
username: ${{ secrets.SMTP_EMAIL_USERNAME }}
password: ${{ secrets.SMTP_EMAIL_PASSWORD }}
subject: ${{ github.job }} job of ${{ github.repository }} has ${{ job.status }}
body: |
${{ github.job }} job in workflow ${{ github.workflow }} of ${{ github.repository }} has ${{ job.status }}.
Test was conducted on WPUF plugin.
To View full test run, click on the following link: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
to: [email protected], [email protected]
from: [email protected]
# Send Email Report if failed
- name: Send Test Report on email (Failed)
if: failure()
uses: dawidd6/action-send-mail@v3
with:
server_address: smtp.gmail.com
server_port: 465
username: ${{ secrets.SMTP_EMAIL_USERNAME }}
password: ${{ secrets.SMTP_EMAIL_PASSWORD }}
subject: ${{ github.job }} job of ${{ github.repository }} has ${{ job.status }}
body: |
${{ github.job }} job in workflow ${{ github.workflow }} of ${{ github.repository }} has ${{ job.status }}.
Test was conducted on WPUF plugin.
To View full test run, click on the following link: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
to: [email protected]
from: [email protected]