Skip to content

Commit

Permalink
Remove Puppeteer references (#10352)
Browse files Browse the repository at this point in the history
  • Loading branch information
eduardoumpierre authored Feb 12, 2025
1 parent 21d2c16 commit 56ab77c
Show file tree
Hide file tree
Showing 107 changed files with 257 additions and 2,620 deletions.
3 changes: 1 addition & 2 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@
"wcpaySettings": true,
"page": true,
"browser": true,
"context": true,
"jestPuppeteer": true
"context": true
},
"settings": {
"react": {
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/e2e/run-log-tests/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ runs:
name: wp(${{ env.E2E_WP_VERSION }})-wc(${{ env.E2E_WC_VERSION }})-${{ env.E2E_GROUP }}-${{ env.E2E_BRANCH }}
path: |
playwright-report/
tests/e2e-pw/test-results
tests/e2e/test-results
${{ env.E2E_RESULT_FILEPATH }}
if-no-files-found: ignore
retention-days: 14
2 changes: 1 addition & 1 deletion .github/workflows/e2e-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ env:
E2E_SLACK_CHANNEL: ${{ secrets.E2E_SLACK_CHANNEL }}
E2E_SLACK_TOKEN: ${{ secrets.E2E_SLACK_TOKEN }}
E2E_USE_LOCAL_SERVER: false
E2E_RESULT_FILEPATH: 'tests/e2e-pw/results.json'
E2E_RESULT_FILEPATH: 'tests/e2e/results.json'
WCPAY_USE_BUILD_ARTIFACT: ${{ inputs.wcpay-use-build-artifact }}
WCPAY_ARTIFACT_DIRECTORY: 'zipfile'
NODE_ENV: 'test'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/e2e-pw-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,4 @@ jobs:
run: npx playwright install chromium

- name: Run tests, upload screenshots & logs
uses: ./.github/actions/e2e-pw/run-log-tests
uses: ./.github/actions/e2e/run-log-tests
2 changes: 1 addition & 1 deletion .github/workflows/e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ env:
E2E_SLACK_CHANNEL: ${{ secrets.E2E_SLACK_CHANNEL }}
E2E_SLACK_TOKEN: ${{ secrets.E2E_SLACK_TOKEN }}
E2E_USE_LOCAL_SERVER: false
E2E_RESULT_FILEPATH: 'tests/e2e-pw/results.json'
E2E_RESULT_FILEPATH: 'tests/e2e/results.json'
WC_MIN_SUPPORTED_VERSION: '7.6.0'
NODE_ENV: 'test'
FORCE_E2E_DEPS_SETUP: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/e2e-tests-atomic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ env:
E2E_SLACK_TOKEN: ${{ secrets.E2E_SLACK_TOKEN }}
E2E_WP_VERSION: 'nightly'
E2E_WC_VERSION: 'latest'
E2E_RESULT_FILEPATH: 'tests/e2e-pw/results.json'
E2E_RESULT_FILEPATH: 'tests/e2e/results.json'
NODE_ENV: 'atomic'

concurrency:
Expand Down
13 changes: 6 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -85,16 +85,15 @@ local.env
# Screenshots created locally when running e2e tests
tests/e2e/screenshots

# E2E Performance test results
# E2E test results
tests/e2e/reports

# E2E Playwright
/playwright-report/
/blob-report/
tests/e2e-pw/.auth/
tests/e2e-pw/test-results/
tests/e2e-pw/playwright/.cache/
tests/e2e-pw/tests/e2e-pw/.auth/*
tests/e2e/.auth/
tests/e2e/test-results/
tests/e2e/playwright/.cache/
tests/e2e/tests/e2e/.auth/*

# Slate docs
docs/rest-api/build/*

Expand Down
9 changes: 0 additions & 9 deletions .puppeteerrc.cjs

This file was deleted.

4 changes: 4 additions & 0 deletions changelog/dev-10241-remove-puppeteer-references
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: dev

Remove Puppeteer references.
16 changes: 8 additions & 8 deletions client/checkout/blocks/test/payment-method-logos.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/
import React from 'react';
import { render, screen, fireEvent } from '@testing-library/react';
import { describe, test, expect } from '@jest/globals';

/**
* Internal dependencies
*/
Expand All @@ -18,7 +18,7 @@ const mockPaymentMethods = [
];

describe( 'PaymentMethodsLogos', () => {
test( 'renders without crashing', () => {
it( 'renders without crashing', () => {
render(
<PaymentMethodsLogos
maxElements={ 5 }
Expand All @@ -29,7 +29,7 @@ describe( 'PaymentMethodsLogos', () => {
expect( logoContainer ).toBeTruthy();
} );

test( 'displays correct number of logos based on maxElements', () => {
it( 'displays correct number of logos based on maxElements', () => {
render(
<PaymentMethodsLogos
maxElements={ 3 }
Expand All @@ -40,7 +40,7 @@ describe( 'PaymentMethodsLogos', () => {
expect( logos ).toHaveLength( 3 );
} );

test( 'shows popover indicator when there are more payment methods than maxElements', () => {
it( 'shows popover indicator when there are more payment methods than maxElements', () => {
render(
<PaymentMethodsLogos
maxElements={ 3 }
Expand All @@ -53,7 +53,7 @@ describe( 'PaymentMethodsLogos', () => {
expect( popoverIndicator ).toBeTruthy();
} );

test( 'opens popover on button click', async () => {
it( 'opens popover on button click', async () => {
render(
<PaymentMethodsLogos
maxElements={ 3 }
Expand All @@ -68,7 +68,7 @@ describe( 'PaymentMethodsLogos', () => {
expect( popover ).toBeTruthy();
} );

test( 'handles keyboard navigation', async () => {
it( 'handles keyboard navigation', async () => {
render(
<PaymentMethodsLogos
maxElements={ 3 }
Expand All @@ -83,7 +83,7 @@ describe( 'PaymentMethodsLogos', () => {
expect( popover ).toBeTruthy();
} );

test( 'does not show popover indicator when there are fewer payment methods than maxElements', () => {
it( 'does not show popover indicator when there are fewer payment methods than maxElements', () => {
render(
<PaymentMethodsLogos
maxElements={ 10 }
Expand All @@ -97,7 +97,7 @@ describe( 'PaymentMethodsLogos', () => {
expect( logos ).toHaveLength( mockPaymentMethods.length );
} );

test( 'does not show popover when there are fewer payment methods than maxElements', async () => {
it( 'does not show popover when there are fewer payment methods than maxElements', async () => {
render(
<PaymentMethodsLogos
maxElements={ 10 }
Expand Down
Loading

0 comments on commit 56ab77c

Please sign in to comment.