Skip to content

Commit

Permalink
Functional Tests : Cash on delivery (COD) module: Upgrade module
Browse files Browse the repository at this point in the history
  • Loading branch information
Progi1984 committed Oct 11, 2024
1 parent 6bf8dfc commit 6f386b2
Show file tree
Hide file tree
Showing 8 changed files with 432 additions and 18 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/ui-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ jobs:
fail-fast: false
matrix:
PS_VERSION:
- '1.7.6.9'
- '1.7.7.8'
- '1.7.8.11'
- '8.0.5'
- '8.1.6'
- '8.2.0'
#- '1.7.6.9'
#- '1.7.7.8'
#- '1.7.8.11'
#- '8.0.5'
#- '8.1.6'
#- '8.2.0'
- 'nightly'
env:
PS_VERSION: ${{ matrix.PS_VERSION }}
Expand All @@ -38,7 +38,7 @@ jobs:
- name: Start containers
working-directory: tests/UI/
run: |
docker compose -f "docker-compose.yml" up -d --build
USER_ID=$(id -u) GROUP_ID=$(id -g) docker compose -f "docker-compose.yml" up -d --build
bash -c 'while [[ "$(curl -L -s -o /dev/null -w %{http_code} http://localhost/en/)" != "200" ]]; do sleep 5; done'
- name: Install dependencies
Expand Down
401 changes: 401 additions & 0 deletions tests/UI/campaigns/01_installation/01_upgradeModule.spec.ts

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import {
foClassicCheckoutOrderConfirmationPage,
foClassicHomePage,
foClassicLoginPage,
utilsTest,
foClassicModalBlockCartPage,
foClassicModalQuickViewPage,
utilsTest,
} from '@prestashop-core/ui-testing';

import { test, expect, Page, BrowserContext } from '@playwright/test';
Expand Down
7 changes: 2 additions & 5 deletions tests/UI/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,8 @@ services:
- DB_PASSWD=prestashop
- DB_NAME=prestashop
volumes:
- type: bind
# Local Path
source: ../../
# Mount Path
target: /var/www/html/modules/ps_cashondelivery
- ./tests/UI/docker-scripts:/tmp/post-install-scripts:ro
- ../../:/tmp/ps_cashondelivery
ports:
- 80:80
mysql:
Expand Down
16 changes: 16 additions & 0 deletions tests/UI/docker-scripts/1-install_ps_cashondelivery.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/sh
## set -eu
echo "$(pwd)" > /tmp/ps_cashondelivery/tests/UI/reports/docker.log
echo "$0" > /tmp/ps_cashondelivery/tests/UI/reports/docker.log

cd "$(dirname $0)" || exit 1
echo "$(pwd)" > /tmp/ps_cashondelivery/tests/UI/reports/docker.log
ls -al /tmp/ps_cashondelivery > /tmp/ps_cashondelivery/tests/UI/reports/docker.log
ls -al /var/www/html/modules/ > /tmp/ps_cashondelivery/tests/UI/reports/docker.log
echo "* Copying module..." > /tmp/ps_cashondelivery/tests/UI/reports/docker.log
cp -r /tmp/ps_cashondelivery /var/www/html/modules/
ls -al /var/www/html/modules/ > /var/www/html/modules/ps_cashondelivery/tests/UI/reports/docker.log
echo "* Installing the module..." > /var/www/html/modules/ps_cashondelivery/tests/UI/reports/docker.log
cd "$PS_FOLDER"
echo "$(pwd)" > /var/www/html/modules/ps_cashondelivery/tests/UI/reports/docker.log
php -d memory_limit=-1 bin/console prestashop:module --no-interaction install "ps_cashondelivery"
8 changes: 4 additions & 4 deletions tests/UI/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tests/UI/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"author": "",
"license": "MIT",
"devDependencies": {
"@prestashop-core/ui-testing": "https://github.com/PrestaShop/ui-testing-library#main",
"@prestashop-core/ui-testing": "https://github.com/PrestaShop/ui-testing-library#pull/157/head",
"@types/node": "^20.11.5",
"@types/semver": "^7.5.8",
"dotenv": "^16.3.1",
Expand Down

0 comments on commit 6f386b2

Please sign in to comment.