Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
323 commits
Select commit Hold shift + click to select a range
2ff46aa
Merge branch 'qa' of https://github.com/woocommerce/woocommerce-paypa…
mishautkin Mar 6, 2025
5f53a56
Merge pull request #3184 from woocommerce/qa-pay-later-messaging
mishautkin Mar 6, 2025
80d938a
Add PLM default UI test
mishautkin Mar 6, 2025
24a1103
Merge pull request #3187 from woocommerce/qa-plm-default-ui
mishautkin Mar 7, 2025
2834771
Add test `Settings - Pay Later Messaging - Disabled on all pages`
mishautkin Mar 7, 2025
ed5ec85
Merge pull request #3188 from woocommerce/qa-pml-disable-on-all-pages
mishautkin Mar 7, 2025
0790a94
Add tests for PLM configurator
mishautkin Mar 7, 2025
d4d4526
Fix beforeAll, function name and lint issues
mishautkin Mar 7, 2025
77dff38
Merge pull request #3191 from woocommerce/qa-plm-configurator-tests
mishautkin Mar 7, 2025
1708a2a
Fix learn more links - Italy
Mar 11, 2025
5425891
Settings - Onboarding - Default UI test updated.
Mar 12, 2025
c8ae012
.only removed
Mar 12, 2025
6084d9c
fix: var name changed
Mar 12, 2025
f36c20b
fix: var name changed in spec file
Mar 12, 2025
42f5ec8
fix: the test data file name changed
Mar 12, 2025
8c411f1
Merge pull request #3206 from woocommerce/qa-update-default-ui-test
Mar 12, 2025
77f0387
Fix and updates
Mar 13, 2025
abe55eb
Unsued import removed
Mar 13, 2025
d4958cd
Update in functions
Mar 13, 2025
6e17611
camelCase used in var name
Mar 13, 2025
052898a
Merge pull request #3209 from woocommerce/sedat-work
Mar 13, 2025
c2cc0aa
A missing step added to Learn more links test case
Mar 13, 2025
4550149
Updates
Mar 13, 2025
e421aa7
Merge pull request #3215 from woocommerce/qa-update-visual-default-ui…
Mar 14, 2025
df1a7cd
Add test PCP-4315 and PCP-4316.
Mar 14, 2025
094efdf
Fix lint issues
Mar 14, 2025
8e214c7
Add test and remove unnecessary ones
Mar 14, 2025
6131881
Fix lint issues
Mar 14, 2025
9fac39f
Merge pull request #3220 from woocommerce/qa-pcp-4315/4316
Mar 18, 2025
7aaa513
Add test PCP-4315 and PCP-4316.
Mar 14, 2025
1ac0fb8
Fix lint issues
Mar 14, 2025
607d3e3
Merge pull request #3221 from woocommerce/QA-Test-PCP-4318
Mar 18, 2025
7c22716
Fix typo, file-resolution errors
mishautkin Mar 18, 2025
88a0f50
Add Styling tab functionality and default UI test
mishautkin Mar 18, 2025
7f10901
Add test PCP-4356
Mar 18, 2025
7f27120
Moved methods to snapshot PayPal buttons to PayPalUI class
mishautkin Mar 19, 2025
950a901
Merge pull request #3233 from woocommerce/qa-styling
mishautkin Mar 19, 2025
44c4ada
Fix and updates
Mar 19, 2025
37d1057
Fİx lint issues
Mar 19, 2025
e6328e4
Merge pull request #3234 from woocommerce/QA-add-test-pcp-4356
Mar 19, 2025
d175900
Introduce PcpApi + cleanup
mishautkin Mar 20, 2025
e0456e6
Remove unused imports from `PcpApi`
mishautkin Mar 20, 2025
0a574d2
Merge pull request #3247 from woocommerce/qa-pcp-api
mishautkin Mar 20, 2025
1f2037c
spec file updated
Mar 20, 2025
1fc07d3
Spec file renamed
Mar 24, 2025
38898cf
Test keys updated
Mar 24, 2025
27b5895
Fix badges test
Mar 25, 2025
e86695b
fix country
Mar 25, 2025
63632f1
Add BaseExtend type to playwright.config
mishautkin Apr 16, 2025
8abfbd1
Introduce default country/currency based on `.env`
mishautkin Apr 16, 2025
b155229
Updated types in Pcp namespace
mishautkin Apr 16, 2025
b3bdbb7
Fix type in PcpApi updatePaymentMethods
mishautkin Apr 16, 2025
e5ae90d
Update -pcp-gateways according to change in types
mishautkin Apr 16, 2025
c7d31ca
Merge pull request #3323 from woocommerce/qa-general-updates
mishautkin Apr 17, 2025
a95792e
Merge pull request #3324 from woocommerce/qa-pcp-types-update
mishautkin Apr 17, 2025
d0b09bf
Split PayPanUi locators and methods
mishautkin Apr 17, 2025
eb52fbb
Correct fixture naming for PayPalUi, PayPalUiClassic and PayPalApi in…
mishautkin Apr 17, 2025
996aadd
Update naming of PayPalUi, PayPalUiClassic and PayPalApi in other files.
mishautkin Apr 17, 2025
65e6727
Fix import in test.ts
mishautkin Apr 17, 2025
b3c1f0f
Add PcpPaymentMethods class and spec
mishautkin Apr 17, 2025
86c7f61
Update README.md
mishautkin Apr 17, 2025
5bf54fc
Merge pull request #3326 from woocommerce/qa-paypal-ui
mishautkin Apr 18, 2025
c0ca4b6
Update types
mishautkin Apr 18, 2025
44604c8
Add types to makeOrder methods
mishautkin Apr 18, 2025
ff782d4
Add 'Deactivate Disable new UI plugin' to `woocommerce.setup`
mishautkin Apr 18, 2025
878ba4c
Fix paypal popup login with phone
mishautkin Apr 18, 2025
e7bdaa4
Add transaction tests scenarios for all pages
mishautkin Apr 18, 2025
01bc1e6
Add transaction tests initial data for paypal and venmo
mishautkin Apr 18, 2025
85a1ae0
Add transaction spect for block and classic pages
mishautkin Apr 18, 2025
9844355
fixes and updates:
Apr 21, 2025
6e23b47
Merge pull request #3333 from woocommerce/sedat-work
Apr 21, 2025
ff19869
Merge pull request #3329 from woocommerce/qa-type-fix
mishautkin Apr 22, 2025
e292f21
Merge pull request #3330 from woocommerce/qa-transaction-tests
mishautkin Apr 22, 2025
99ef3d3
PCP-4366-4367-4368-4369-4370-4371-4372-4373 added
Apr 29, 2025
9f14452
Migrate tests for legacy UI
mishautkin Apr 30, 2025
574866d
Merge pull request #3353 from woocommerce/qa-legacy-ui
mishautkin Apr 30, 2025
47fa7a7
Merge branch 'qa' of https://github.com/woocommerce/woocommerce-paypa…
mishautkin May 2, 2025
6a58aaf
Update types and pcp-gateways according to requirements
mishautkin May 2, 2025
04b78bd
Update test Settings - USA - Payment Methods - Default UI
mishautkin May 2, 2025
15d40a8
Lint:js:fix, general fixes (typos, comments, etc.)
mishautkin May 2, 2025
e98a37b
Merge pull request #3327 from woocommerce/qa-payment-methods
mishautkin May 5, 2025
ededb7c
Update playwright.config.ts
mishautkin May 5, 2025
41da879
Update woocommerce.setup.ts
mishautkin May 5, 2025
50fc15c
Merge branch 'qa' into QA-add-test-pcp-4366-4367-4368-4369-4370-4371-…
May 5, 2025
f9cba4e
fix: PCP-4366,4367,4368,4369,4370,4371,7372,4373
May 5, 2025
c4e700b
Update .gitignore
mishautkin May 5, 2025
3c02eaa
Add locators for Onboarding page
mishautkin May 6, 2025
89c1258
Add/update snapshot methods in `pcp-admin-page`
mishautkin May 6, 2025
9ceb62a
Remove `percy` from resources
mishautkin May 6, 2025
89b8c8f
Replace `percy` in subscriptions
mishautkin May 6, 2025
e6311d8
Update `visual-onboarding-ui.spec`
mishautkin May 6, 2025
bbb6893
Add separate spec with badges tests
mishautkin May 6, 2025
050ce82
General changes
mishautkin May 6, 2025
d117a61
Merge pull request #3361 from woocommerce/qa-replace-percy
mishautkin May 6, 2025
9cdaf7b
Update .gitignore
mishautkin May 5, 2025
a92a067
Add locators for Onboarding page
mishautkin May 6, 2025
a196289
Add/update snapshot methods in `pcp-admin-page`
mishautkin May 6, 2025
e6eda17
Remove `percy` from resources
mishautkin May 6, 2025
4766fcb
Replace `percy` in subscriptions
mishautkin May 6, 2025
af4d8f4
Update `visual-onboarding-ui.spec`
mishautkin May 6, 2025
3538ebc
Add separate spec with badges tests
mishautkin May 6, 2025
aff1b49
General changes
mishautkin May 6, 2025
3e44f00
Update Playwright Screenshots functionality
mishautkin May 7, 2025
fbfc121
Merge pull request #3364 from woocommerce/qa-screenshots-correction
May 8, 2025
53737a2
Update Playwright Screenshots functionality
mishautkin May 7, 2025
d91840a
Updates
May 8, 2025
87064d0
.only removed
May 8, 2025
f50ccb7
Merge branch 'qa' into QA-add-test-pcp-4366-4367-4368-4369-4370-4371-…
May 8, 2025
86b3b44
Fix and changes
May 9, 2025
6e6db43
Fix and changes
May 9, 2025
af7cbba
Merge pull request #3359 from woocommerce/QA-add-test-pcp-4366-4367-4…
May 9, 2025
03d56c5
fix: Locator name changed and test script updated
May 9, 2025
c216c6c
Tests added:
May 9, 2025
ee78531
fixes and updates
May 14, 2025
be8de4a
Merge pull request #3375 from woocommerce/QA-Add-test-PCP-4382-and-PC…
May 14, 2025
313f4d6
Some cosmetic changes
May 14, 2025
3a88c14
QA-add-test-pcp-4403
May 14, 2025
047934b
Merge pull request #3381 from woocommerce/QA-add-test-pcp-4403
May 14, 2025
972a69b
Automation of PCP-4005, PCP-4578, PCP-4596, PCP-3079
mishautkin May 14, 2025
8bb8815
Automation of PCP-4005, PCP-4578, PCP-4596, PCP-3079
mishautkin May 14, 2025
613da79
QA-add-test-pcp-4357
May 14, 2025
23e5580
fix: unused fixtures removed
May 14, 2025
f9837e2
fix: remove unused import
May 14, 2025
d193f7b
Merge pull request #3383 from woocommerce/qa-fastlane
mishautkin May 14, 2025
77ecaad
fix: click action for continueButton moved to test from function
May 15, 2025
0582714
Merge pull request #3384 from woocommerce/QA-add-test-pcp-4357
mishautkin May 15, 2025
1741f26
.only removed
May 15, 2025
264ba01
Replaced 02-dashboard-ui with 02-onboarding, 03-plugin-settings
mishautkin May 15, 2025
825bb00
Move merchant credentials from `/resources/` to `.env`
mishautkin May 15, 2025
37310ee
Add `.setup` to setup files
mishautkin May 15, 2025
be77808
Add `.scenario` to files in `_test-scenarios` folders
mishautkin May 15, 2025
5c5e7f4
Add ShopOrder type (has `title` field)
mishautkin May 15, 2025
b295cbd
Lint fix
mishautkin May 15, 2025
8c8120d
Remove unused methods
mishautkin May 15, 2025
c955fa9
Add missing types and descriptions
mishautkin May 15, 2025
48c0705
Merge pull request #3387 from woocommerce/qa-refactoring
mishautkin May 15, 2025
59495f8
screenshot function changed to snapshotLocator()
May 16, 2025
894caa3
Add ACDC tests
mishautkin May 19, 2025
7b10d2c
General fixes, adding missing descriptions, removed @Critical labels
mishautkin May 19, 2025
ece6f41
Add PCP-4360 and various updates
May 20, 2025
3043537
fix: snapshotName var removed
May 20, 2025
5125581
Merge pull request #3393 from woocommerce/qa-acdc
mishautkin May 20, 2025
6312dfe
Fix `pcpOnboarding.snapshotContent`
mishautkin May 21, 2025
2275b21
Merge pull request #3398 from woocommerce/QA-add-test-pcp-4360
May 21, 2025
ce622f0
Fix 'pcpOnboarding.snapshotLocator' for pcp-4403
May 21, 2025
9ba7533
Fix learn more links and page title texts
May 22, 2025
08b4041
QA Add refund tests PCP-1394, PCP-1395, PCP-1405, PCP-1406
mishautkin May 23, 2025
11783b5
Merge changes from `qa`
mishautkin May 23, 2025
6d60d29
Merge branch 'qa' of https://github.com/woocommerce/woocommerce-paypa…
mishautkin May 23, 2025
3cbbf4c
Update playwright-utils version
mishautkin May 26, 2025
c9a8aa8
Test added: PCP-4733
May 26, 2025
951386d
Merge branch 'qa' of https://github.com/woocommerce/woocommerce-paypa…
mishautkin May 26, 2025
ae98f87
Merge pull request #3409 from woocommerce/qa-refund
mishautkin May 26, 2025
8577723
Merge pull request #3414 from woocommerce/qa-add-test-pcp-4733
May 26, 2025
b42c7a3
Update for PayPal user creds
mishautkin May 27, 2025
5d39434
Merge pull request #3419 from woocommerce/qa-paypal-creds
mishautkin May 27, 2025
70c106c
Implement onboarding API options
mishautkin May 27, 2025
0eee390
Merge pull request #3420 from woocommerce/qa-onboarding-api
mishautkin May 27, 2025
c7c1629
Move test credentials to `.env` for qa-legacy-ui
mishautkin May 28, 2025
dd78b2b
Update README.md
mishautkin May 28, 2025
ce796b7
Update README.md
mishautkin May 28, 2025
5ed26a9
Update README.md
mishautkin May 28, 2025
0ca88b4
Update README.md
mishautkin May 28, 2025
c3fb1ce
Update README.md
mishautkin May 28, 2025
02f3d34
Update README.md
mishautkin May 28, 2025
a0229e1
Update README.md
mishautkin May 29, 2025
d91b641
Implement vaulting functionality for new UI
mishautkin Jun 2, 2025
8f4094f
Add vaulting tests for My Account
mishautkin Jun 3, 2025
0d9ef41
Add test scenarios for transactions (see README from previous commit)
mishautkin Jun 6, 2025
5b5074b
Add pay-by-link scenarios
mishautkin Jun 6, 2025
eae84d0
Add tests data
mishautkin Jun 6, 2025
192a281
Add spec files
mishautkin Jun 6, 2025
f9ee836
Lint fixes
mishautkin Jun 6, 2025
50e79e4
Merge pull request #3434 from woocommerce/qa-vaulting
mishautkin Jun 10, 2025
db51c42
Cleanup
mishautkin Jun 10, 2025
f45a091
Add README for subscription tests.
mishautkin Jun 11, 2025
a3498cd
Update README.md
mishautkin Jun 12, 2025
4e165d5
Add env setup commands
mishautkin Jun 13, 2025
c875db1
Fix env setup scripts
mishautkin Jun 16, 2025
4a702c6
A verificiation has been added for Intent Authorization
Jun 19, 2025
bbd79d7
Comment removed from woocommerce-edit fixture and test commit to see …
Jun 20, 2025
55d55ad
Merge pull request #3470 from woocommerce/PCP-4890-transaction-intent…
sedatbsr Jun 23, 2025
ae9843c
Update automated env setup script
mishautkin Jun 24, 2025
05716ed
Merge branch 'qa' of https://github.com/woocommerce/woocommerce-paypa…
mishautkin Jun 24, 2025
5613690
Merge pull request #3461 from woocommerce/qa-env-setup
mishautkin Jun 24, 2025
3608066
Merge branch 'qa' of https://github.com/woocommerce/woocommerce-paypa…
mishautkin Jun 24, 2025
36dd440
Update playwright-utils to v2.6.2
mishautkin Jun 24, 2025
d186828
Optimize PayPal functionality for subscriptions
mishautkin Jun 24, 2025
ce30d9d
Update `/resources/`
mishautkin Jun 24, 2025
a824dc7
Update shipping methods selection on checkout pages
mishautkin Jun 24, 2025
0bbd997
Add urls to work with subscriptions
mishautkin Jun 24, 2025
2fa7db7
Fix method in customer-payment-methods
mishautkin Jun 24, 2025
3d9d3d0
Add creation of PayPal subscription products
mishautkin Jun 24, 2025
75bea3a
Add automated env setup script for PayPal subscriptions
mishautkin Jun 24, 2025
46c53ac
Update Readme for automated env setup scripts
mishautkin Jun 24, 2025
4211a63
Add API methods for subscription renewals
mishautkin Jun 24, 2025
bfdd7bd
Add subscription transaction tests for checkout pages
mishautkin Jun 24, 2025
749f430
Merge branch 'trunk' of https://github.com/woocommerce/woocommerce-pa…
mishautkin Jun 25, 2025
62f2bac
Merge pull request #3450 from woocommerce/qa-subscriptions
mishautkin Jun 27, 2025
02c2ced
Fix PayPal popup
mishautkin Jun 27, 2025
eca7e6f
Merge pull request #3492 from woocommerce/qa-fix-paypal-popup
mishautkin Jun 27, 2025
19447e9
Merge branch 'trunk' of https://github.com/woocommerce/woocommerce-pa…
mishautkin Jun 30, 2025
c031896
Update playwright-utils version
mishautkin Jul 2, 2025
b3785f3
Add functionality for subscription renewal
mishautkin Jul 4, 2025
e1d8335
Add subscription renewal data, scenario, spec, README
mishautkin Jul 4, 2025
43db150
General fixes in package.json and playwright.config
mishautkin Jul 4, 2025
aae01a4
Merge pull request #3507 from woocommerce/qa-subscriptions
mishautkin Jul 8, 2025
13d4a9f
Merge branch 'trunk' of https://github.com/woocommerce/woocommerce-pa…
mishautkin Jul 9, 2025
d5c2fcf
couponMessage text updated
Jul 10, 2025
f80244c
General updates
mishautkin Jul 12, 2025
9c1d334
Fix paypal popup behavior
mishautkin Jul 12, 2025
6f4d96e
Update default country to USA
mishautkin Jul 12, 2025
f2cbe10
Move specs from Germany to USA as default country
mishautkin Jul 12, 2025
3b14f3c
Fix assertions according to new changes
mishautkin Jul 12, 2025
9eb3344
Update test title
mishautkin Jul 12, 2025
028c90e
Lint fix
mishautkin Jul 12, 2025
28cac62
Remove unused methos (PayPalUi -> savePaymentMethod)
mishautkin Jul 12, 2025
1b6eb77
Fix for DDEV
mishautkin Jul 15, 2025
4092668
Merge branch 'qa' of https://github.com/woocommerce/woocommerce-paypa…
mishautkin Jul 15, 2025
8abf572
General updates
mishautkin Jul 26, 2025
7b27a98
Update resources
mishautkin Jul 26, 2025
bb62ac8
Fix transaction pre-conditions/post-conditions
mishautkin Jul 26, 2025
b603a8c
Add test keys, links and bug to test data
mishautkin Jul 26, 2025
dbff191
Fix PcpApi.getSubscriptionRenewalOrderIds
mishautkin Jul 26, 2025
9ae8fe1
Fix utils.restoreCustomer
mishautkin Jul 26, 2025
8eddf80
Fix CustomerPaymentMethods.savePaymentMethod
mishautkin Jul 26, 2025
37292ed
Fix locators and methods in PayPalUi
mishautkin Jul 26, 2025
e0a6ba4
Fix assertion in PayPalUiClassic
mishautkin Jul 29, 2025
7df8425
Update subscription-renewal.spec
mishautkin Jul 29, 2025
be1c1fa
Fix extra export
mishautkin Aug 4, 2025
7435029
Fixes for PCP v3.0.8
mishautkin Aug 19, 2025
bf45a3b
Update README.md
mishautkin Sep 3, 2025
187dc36
Un-gitignore auxiliary .zip files in tests/qa and tests/qa-legacy-ui
mishautkin Sep 3, 2025
43ef541
Updated README.md
mishautkin Sep 3, 2025
a213d39
Lint js and md fixes
mishautkin Sep 3, 2025
5b9fccc
General updates
mishautkin Sep 4, 2025
47e4ee0
Un-gitignore .zip files in `resources/files`
mishautkin Sep 4, 2025
db6bb25
Merge branch 'qa' of https://github.com/woocommerce/woocommerce-paypa…
mishautkin Sep 4, 2025
512a863
Merge pull request #3632 from woocommerce/qa-fix-legacy-ui
mishautkin Sep 4, 2025
78aaf66
Update `playwright-utils` to v2.7.2
mishautkin Sep 4, 2025
fa4b510
Remove Percy vars from .env.example
mishautkin Sep 9, 2025
de37039
Add `.fixme` to 03-plugin-settings tests
mishautkin Sep 9, 2025
c01fcce
Add docs/, refactor main README
mishautkin Sep 9, 2025
ed77cf7
Add .fixme to onboarding-badges visual tests
mishautkin Sep 11, 2025
c08756d
Administrative updates
mishautkin Sep 11, 2025
f68cb66
Un-gitignore screenshots for onboarding tests
mishautkin Sep 11, 2025
b469d35
Add new versions of PCP and WC Subscriptions plugins
mishautkin Sep 12, 2025
67dd6d8
Update playwright-utils to v2.7.3
mishautkin Sep 17, 2025
8ca1cef
Fix onboarding-ui.spec
mishautkin Sep 17, 2025
fb43436
Add comments
mishautkin Sep 17, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ modules/*/vendor/*
modules/*/assets/*
!modules/ppcp-wc-gateway/assets/images
*.zip
!tests/qa/resources/files/*.zip
!tests/qa-legacy-ui/resources/files/*.zip
.env
.env.integration
auth.json
Expand Down
40 changes: 40 additions & 0 deletions tests/qa-legacy-ui/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# JDoe test single site, PHP x.x
# playwright-utils config
WP_BASE_URL=''
WP_USERNAME=***
WP_PASSWORD=***
WP_BASIC_AUTH_USER=***
WP_BASIC_AUTH_PASS=***
STORAGE_STATE_PATH='./storage-states'
STORAGE_STATE_PATH_ADMIN='./storage-states/admin.json'

# WooCommerce
WC_API_KEY=***
WC_API_SECRET=***
# WC_DEFAULT_COUNTRY=usa
# WC_DEFAULT_CURRENCY=usa

# Xray in Jira
XRAY_CLIENT_ID=
XRAY_CLIENT_SECRET=
# TEST_EXEC_KEY=''

# MERCHANT_USA_EMAIL=
# MERCHANT_USA_CLIENT_ID=
# MERCHANT_USA_CLIENT_SECRET=
# MERCHANT_USA_ACCOUNT_ID=

# PAYPAL_PERSONAL_EMAIL_US=
# PAYPAL_PERSONAL_PASS_US=

# FASTLANE_EMAIL_RYAN=

# Percy
# PERCY_TOKEN=web_abc123
# PERCY_CLIENT_ERROR_LOGS=false

# WP CLI
# SSH_LOGIN=
# SSH_HOST=
# SSH_PORT=
# SSH_PATH=
100 changes: 100 additions & 0 deletions tests/qa-legacy-ui/.github/workflows/pcp-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
name: PCP Tests
on:
# push:

workflow_dispatch:
inputs:
TEST_ENV:
type: choice
description: Choose test environment
required: true
default: ''
options:
- MISHA_PHP80
- MISHA_PHP81
- EMILI_PHP80
- SIARHEI_PHP81
TEST_EXEC_KEY:
type: string
description: Enter Test Execution ticket key
default: ''
TEST_SET:
type: choice
description: Choose test set
default: defaultOrder
options:
- testCI
- all
- critical
- transaction
- defaultOrder

jobs:
test:
timeout-minutes: 180
runs-on: ubuntu-latest
environment: ${{ inputs.TEST_ENV }}
env:
# PERCY_TOKEN: ${{ secrets.PCP_PERCY_TOKEN }}

# Xray in Jira
XRAY_CLIENT_ID: ${{ secrets.XRAY_AUTOTEST_ID }}
XRAY_CLIENT_SECRET: ${{ secrets.XRAY_AUTOTEST_SECRET }}

# Xray Test Execution key
TEST_EXEC_KEY: ${{ inputs.TEST_EXEC_KEY }}

# Website config
WP_BASE_URL: ${{ vars.WP_BASE_URL }}
WP_USERNAME: ${{ secrets.WP_USERNAME }}
WP_PASSWORD: ${{ secrets.WP_PASSWORD }}
WP_BASIC_AUTH_USER: ${{ secrets.WP_BASIC_AUTH_USER }}
WP_BASIC_AUTH_PASS: ${{ secrets.WP_BASIC_AUTH_PASS }}
STORAGE_STATE_PATH: './storage-states/admin-credentials.json'

# WooCommerce API config
WC_API_KEY: ${{ secrets.WC_API_KEY }}
WC_API_SECRET: ${{ secrets.WC_API_SECRET }}

steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18

- name: Github Packages Auth
run: |
npm config set @inpsyde:registry 'https://npm.pkg.github.com'
npm config set //npm.pkg.github.com/:_authToken ${{ secrets.DEPLOYBOT_PACKAGES_READ_ACCESS_TOKEN}}

- name: Setup Playwright tests and dependencies
run: npm run setup:tests

- name: Install Playwright Browsers
run: npx playwright install --with-deps

- name: Run Playwright tests (${{ inputs.TEST_SET }})
id: run-tests
run: npm run test:paypal:${{ inputs.TEST_SET }}

- uses: actions/upload-artifact@v4
id: artifact-upload-step
if: always()
with:
name: playwright-report
path: projects/paypal/playwright-report/
retention-days: 30

- name: Post to a Slack channel
id: slack
if: always()
uses: slackapi/[email protected]
with:
channel-id: '${{ secrets.TEST_SLACK_CHANNEL }}'
slack-message: |
PCP test run (${{ inputs.TEST_SET }} on ${{ inputs.TEST_ENV }})
${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
Status: ${{ steps.run-tests.outcome == 'success' && '*Passed*' || '*Failed*' }}
${{ env.TEST_EXEC_KEY && format('Test execution: https://inpsyde.atlassian.net/browse/{0}', env.TEST_EXEC_KEY) || '' }}
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_QAREPORTER_TOKEN }}
13 changes: 13 additions & 0 deletions tests/qa-legacy-ui/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.idea
.vscode
node_modules
playwright-utils
playwright-report
playwright/.cache
storage-states
test-results
package-lock.json

.env*
!.env.example
.DS_Store
1 change: 1 addition & 0 deletions tests/qa-legacy-ui/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@inpsyde:registry=https://npm.pkg.github.com
180 changes: 180 additions & 0 deletions tests/qa-legacy-ui/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,180 @@
# PCP Tests (legacy UI)

Depends on [`@inpsyde/playwright-utils`](https://github.com/inpsyde/playwright-utils) package.
## Project structure

- `resources` - files with test-data, images, project related installation packages, types, etc.

- `tests` - test specifications. For payment plugins contains following folders:

- `01-plugin-foundation` - general tests for plugin installation, uninstallation, activation, deactivation, display of plugin in __WooCommerce -> Settings -> Payments__.

- `02-merchant-setup` - tests for connection of current plugin instance to the payment system provider API via merchant (seller) credentials.

- `03-plugin-settings` - tests for various plugin settings, may include assertions of settings effect on frontend.

- `04-frontend-ui` - tests for plugin UI on frontend: display of payment buttons, display of payment methods depending on customer's country, etc.

- `05-transaction` - tests of payment process. Typically include: adding products to cart as precondition, payment (transaction) process, assertions on order received page, dashboard order edit page, payment via payment system provider API.

- `06-refund` - tests for refund transactions. Typically include: finished transaction as precondition, refund via payment system provider API on dashboard order edit page, assertion of refund statuses.

- `07-vaulting` - tests for transactions with enabled vaulting (saved payment methods for registered customers). Ability to remember payment methods and use them for transactions.

- `08-subscriptions` - tests for transactions for subscription products. Requires WooCommerce Subscriptions plugin. Usually available to registered customers and also includes vaulting and renewal of subscription (with automatic payment). WooCommerce Subscriptions plugin (can be [downloaded here](https://woocommerce.com/my-account/downloads/), login credentials in 1Password).

- `09-compatibility` - tests for compatibility with other themes, plugins, etc.

\* - folders are numerated on purpose, to force correct sequence of tests - from basic to advanced. Although each test should be independent and work separately, it is better to start testing from `plugin-foundation` and move to more complex tests.

\*\* - folders and numeration can be different, based on project requirements.

- `utils` - project related utility files, built on top of `@inpsyde/playwright-utils`.

- `admin` - functionality for operating dashboard pages.

- `frontend` - functionality for operating frontend pages, hosted checkout pages (payment system provider's pages).

- `test.ts` - declarations of project related test fixtures.

- other project related functionality, like helpers, APIs, urls.

- `.env`, `playwright.config.ts`, `package.json` - see below.

## Setup @inpsyde/playwright-utils as a node package

> See also [@inpsyde/playwright-utils documentation](https://github.com/inpsyde/playwright-utils?tab=readme-ov-file#installation).

1. Make sure you're logged in the [Syde npm package registry](https://inpsyde.atlassian.net/wiki/spaces/AT/pages/3112894465/GitHub+Package+Registry+for+npm).

2. Make sure that `"workspaces": [ "playwright-utils" ]` node isn't present in `./tests/qa/package.json`.

3. In the terminal change directory to `./tests/qa` and run following command:

```bash
npm run setup:tests
```

## Setup @inpsyde/playwright-utils for local development

> See also [@inpsyde/playwright-utils documentation](https://github.com/inpsyde/playwright-utils?tab=readme-ov-file#development).

1. Add `"workspaces": [ "playwright-utils" ]` to `./tests/qa/package.json`.

2. Delete `@inpsyde/playwright-utils` from `./tests/qa/node_modules`.

3. In the terminal change directory to `./tests/qa` and run following command:

```bash
git clone https://github.com/inpsyde/playwright-utils.git
```

[`@inpsyde/playwright-utils`](https://github.com/inpsyde/playwright-utils) repository should be cloned as `playwright-utils` right inside the root directory of project.

4. Restart VSCode editor. This will create `playwright-utils` instance in the source control tab of VSCode editor.

5. Run following command:

```bash
npm run setup:utils
```

6. `@inpsyde/playwright-utils` should reappear in node_modules. Following message (coming from `tsc-watch`) should be displayed in the terminal:

```bash
10:00:00 - Found 0 errors. Watching for file changes.
```

7. If you plan to make changes in `playwright-utils` keep current terminal window opened and create another instance of terminal for other commands.

## Project configuration

1. [SSE setup](https://inpsyde.atlassian.net/wiki/spaces/AT/pages/3175907370/Self+Service+WordPress+Environment) - will be deprecated in Q1 of 2025.

2. Configure `.env` file following [these steps](https://github.com/inpsyde/playwright-utils?tab=readme-ov-file#env-variables). See also `/tests/qa/.env.example`. The [`.env` content with actual test users' credentials](https://start.1password.com/open/i?a=UL7QZZ6P6JDVBI422AOVJXMEGU&v=uthlbcp4jkori6w6rhgxvsvfoe&i=klejf7rgcip76c7auhsnhvxcbi&h=inpsyde.1password.eu) is in 1Password in Legacy UI section.

3. Configure `playwright.config.ts` of the project following [these steps](https://github.com/inpsyde/playwright-utils?tab=readme-ov-file#playwright-configuration).

4. Additional website and WooCommerce configuration is done automatically via `setup-woocommerce` dependency project (see [`/tests/_setup/woocommerce.setup.ts`](./tests/_setup/woocommerce.setup.ts)).

5. To avoid conflicts make sure any other payment plugins are deleted.

6. Reporting to __Xray in Jira__ is configured [this way](https://github.com/inpsyde/playwright-utils/blob/main/docs/test-report-api/report-to-xray.md).

## Run tests

To execute tests, in the terminal, navigate to the __qa__ directory of the project (e.g. `cd tests/qa`) and run following command:

```bash
npx playwright test
```

### Additional options to run tests from command line

- Add scripts to `package.json` of the project (eligible for Windows, not tested on other OS):

```json
"scripts": {
"test:smoke": "npx playwright test --grep \"@Smoke\"",
"test:critical": "npx playwright test --grep \"@Critical\"",
"test:ui": "npx playwright test --grep \"UI\"",
"test:functional": "npx playwright test --grep \"Functional\"",
"test:all": "npm run test:ui & npm run test:functional"
},
```

Run script with the following command:

```bash
npm run test:critical
```

- Run several tests by test ID (on Windows, Powershell):

```bash
npx playwright test --grep --% "WOL-123^|WOL-124^|WOL-125"
```

It may be required additionally to specify the project (if tests relate to more then one project):

```bash
npx playwright test --project "project-name" --grep --% "WOL-123^|WOL-124^|WOL-125"
```

## Autotest Execution workflow

1. Create Test Execution ticket in Jira, named after the tested plugin version, for example "Test Execution for v2.3.4-rc1, PHP8.1".

2. Link release ticket (via `tests: WOL-234`).

3. Set Test Execution ticket status `In progress`.

4. Add/update test execution ticket key in `.env` file of the project (`TEST_EXEC_KEY`).

5. Download tested plugin `.zip` package (usually attached to release ticket) and add it to `/project/<project-name>/resources/files`. You may need to remove version number from the file name.

6. Optional: delete previous version of tested plugin from the website if you don't execute __plugin foundation__ tests.

7. Start autotest execution from command line for the defined scope of tests (e.g. all, Critical, etc.). You should see `Test execution Jira key: WOL-234` in the terminal.

8. When finished test results should be exported to the specified test execution ticket in Jira.

9. Analyze failed tests (if any). Restart execution for failed tests, possibly in debug mode (for Windows):

```bash
npx playwright test --grep --% "WOL-123^|WOL-124^|WOL-125" --debug
```

10. Report bugs (if any) and attach them to the test-runs of failed tests (Click "Create defect" or "Add defect" on test execution screen).

11. If needed fix failing tests in a new branch, create a PR and assign it for review.

12. Set Test execution ticket status to `Done`.

## Coding standards

Before commiting changes run following command:

```bash
npm run lint:js:fix
```
29 changes: 29 additions & 0 deletions tests/qa-legacy-ui/global-setup.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/**
* External dependencies
*/
import { FullConfig } from '@playwright/test';
import { restLogin, guestStorageState } from '@inpsyde/playwright-utils/build';

async function globalSetup( config: FullConfig ) {
const projectUse = config.projects[ 0 ].use;

await restLogin( {
baseURL: projectUse.baseURL,
storageStatePath: String( projectUse.storageState ),
httpCredentials: projectUse.httpCredentials,
user: {
// @ts-ignore
username: process.env.WP_USERNAME,
// @ts-ignore
password: process.env.WP_PASSWORD,
},
} );

await guestStorageState( {
baseURL: projectUse.baseURL,
httpCredentials: projectUse.httpCredentials,
storageStatePath: `${ process.env.STORAGE_STATE_PATH }/guest.json`,
} );
}

export default globalSetup;
Loading
Loading