Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UI tests - Add PS versions from 1.7.7.0 ~ 1.7.7.8 to 1.7.8.11 and 8.2.0 on PHP 7.1 ~ 7.3 #755

Merged
merged 10 commits into from
Oct 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ui-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ jobs:
- name: Update
run: |
docker exec -t prestashop php modules/autoupgrade/bin/console update:start --channel=online admin-dev
docker exec -t prestashop chmod 777 -R /var/www/html/var/cache
docker exec -t prestashop chmod 777 -R /var/www/html/var

- name: Install dependencies
working-directory: tests/UI/
Expand Down Expand Up @@ -123,7 +123,7 @@ jobs:
nightly:
name: Nightly Report
if: ${{ github.event_name == 'schedule' }}
needs:
needs:
- ui_test_matrix
- ui_test
runs-on: ubuntu-latest
Expand Down
143 changes: 141 additions & 2 deletions .github/workflows/ui-test/nightly.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,146 @@
{
"include": [
{
"comment": "1.7.7.0 ~ 1.7.7.8 -> 1.7.8.11 PHP 7.1"
},
{
"PS_VERSION_START": "1.7.7.0",
"PS_VERSION_END": "1.7.8.11",
"PHP_VERSION": "7.1"
},
{
"PS_VERSION_START": "1.7.7.1",
"PS_VERSION_END": "1.7.8.11",
"PHP_VERSION": "7.1"
},
{
"PS_VERSION_START": "1.7.7.2",
"PS_VERSION_END": "1.7.8.11",
"PHP_VERSION": "7.1"
},
{
"PS_VERSION_START": "1.7.7.3",
"PS_VERSION_END": "1.7.8.11",
"PHP_VERSION": "7.1"
},
{
"PS_VERSION_START": "1.7.7.4",
"PS_VERSION_END": "1.7.8.11",
"PHP_VERSION": "7.1"
},
{
"PS_VERSION_START": "1.7.7.5",
"PS_VERSION_END": "1.7.8.11",
"PHP_VERSION": "7.1"
},
{
"PS_VERSION_START": "1.7.7.6",
"PS_VERSION_END": "1.7.8.11",
"PHP_VERSION": "7.1"
},
{
"PS_VERSION_START": "1.7.7.7",
"PS_VERSION_END": "1.7.8.11",
"PHP_VERSION": "7.1"
},
{
"PS_VERSION_START": "1.7.7.8",
"PS_VERSION_END": "1.7.8.11",
"PHP_VERSION": "7.1"
},
{
"comment": "1.7.7.0 ~ 1.7.7.8 -> 8.2.0 PHP 7.2 ~ 7.3"
},
{
"PS_VERSION_START": "1.7.7.0",
"PS_VERSION_END": "8.2.0",
"PHP_VERSION": "7.2"
},
{
"PS_VERSION_START": "1.7.7.0",
"PS_VERSION_END": "8.2.0",
"PHP_VERSION": "7.3"
},
{
"PS_VERSION_START": "1.7.7.1",
"PS_VERSION_END": "8.2.0",
"PHP_VERSION": "7.2"
},
{
"PS_VERSION_START": "1.7.7.1",
"PS_VERSION_END": "8.2.0",
"PHP_VERSION": "7.3"
},
{
"PS_VERSION_START": "1.7.7.2",
"PS_VERSION_END": "8.2.0",
"PHP_VERSION": "7.2"
},
{
"PS_VERSION_START": "1.7.7.2",
"PS_VERSION_END": "8.2.0",
"PHP_VERSION": "7.3"
},
{
"PS_VERSION_START": "1.7.7.3",
"PS_VERSION_END": "8.2.0",
"PHP_VERSION": "7.2"
},
{
"PS_VERSION_START": "1.7.7.3",
"PS_VERSION_END": "8.2.0",
"PHP_VERSION": "7.3"
},
{
"PS_VERSION_START": "1.7.7.4",
"PS_VERSION_END": "8.2.0",
"PHP_VERSION": "7.2"
},
{
"PS_VERSION_START": "1.7.7.4",
"PS_VERSION_END": "8.2.0",
"PHP_VERSION": "7.3"
},
{
"PS_VERSION_START": "1.7.7.5",
"PS_VERSION_END": "8.2.0",
"PHP_VERSION": "7.2"
},
{
"PS_VERSION_START": "1.7.7.5",
"PS_VERSION_END": "8.2.0",
"PHP_VERSION": "7.3"
},
{
"PS_VERSION_START": "1.7.7.6",
"PS_VERSION_END": "8.2.0",
"PHP_VERSION": "7.2"
},
{
"PS_VERSION_START": "1.7.7.6",
"PS_VERSION_END": "8.2.0",
"PHP_VERSION": "7.3"
},
{
"PS_VERSION_START": "1.7.7.7",
"PS_VERSION_END": "8.2.0",
"PHP_VERSION": "7.2"
},
{
"PS_VERSION_START": "1.7.7.7",
"PS_VERSION_END": "8.2.0",
"PHP_VERSION": "7.3"
},
{
"PS_VERSION_START": "1.7.7.8",
"PS_VERSION_END": "8.2.0",
"PHP_VERSION": "7.2"
},
{
"PS_VERSION_START": "1.7.7.8",
"PS_VERSION_END": "8.2.0",
"PHP_VERSION": "7.3"
},
{
"comment": "1.7.8.0 ~ 1.7.8.10 -> 1.7.8.11 PHP 7.1"
},
Expand All @@ -26,7 +167,6 @@
{
"PS_VERSION_START": "1.7.8.4",
"PS_VERSION_END": "1.7.8.11",
"UPGRADE_CHANNEL": "online",
"PHP_VERSION": "7.1"
},
{
Expand All @@ -47,7 +187,6 @@
{
"PS_VERSION_START": "1.7.8.8",
"PS_VERSION_END": "1.7.8.11",
"UPGRADE_CHANNEL": "online",
"PHP_VERSION": "7.1"
},
{
Expand Down
16 changes: 16 additions & 0 deletions .github/workflows/ui-test/sanity.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
{
"include": [
{
"comment": "1.7.7.0 -> 1.7.8.11 PHP 7.1"
},
{
"PS_VERSION_START": "1.7.7.0",
"PS_VERSION_END": "1.7.8.11",
"PHP_VERSION": "7.1"
},
{
"comment": "1.7.7.8 -> 8.2.0 PHP 7.3"
},
{
"PS_VERSION_START": "1.7.7.8",
"PS_VERSION_END": "8.2.0",
"PHP_VERSION": "7.3"
},
{
"comment": "1.7.8.10 -> 1.7.8.11 PHP 7.1"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ test.describe('BO - Catalog - Products : CRUD product with combinations', async
},
],
});
// Data to update product with combinations
// Data to update product with combinations
const updateProductData: FakerProduct = new FakerProduct({
type: 'combinations',
taxRule: 'No tax',
Expand All @@ -60,7 +60,7 @@ test.describe('BO - Catalog - Products : CRUD product with combinations', async
attributes: [
{
name: 'color',
values: ['Gray', 'Taupe', 'Red'],
values: ['Gray', 'Grey', 'Taupe', 'Red'],
},
{
name: 'size',
Expand Down
12 changes: 9 additions & 3 deletions tests/UI/campaigns/sanity/04_cartFO/01_editCheckCart.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ import {
} from '@playwright/test';

const baseContext: string = 'sanity_cartFO_editCheckCart';
import semver from 'semver';

const psVersion = utilsTest.getPSVersion();

/*
Open the FO home page
Expand Down Expand Up @@ -153,12 +156,15 @@ test.describe('FO - Cart : Check Cart in FO', async () => {

await foClassicCartPage.editProductQuantity(page, 2, 2);

// getNumberFromText is used to get the new price ATI
const totalPrice = await foClassicCartPage.getATIPrice(page);
expect(totalPrice).toBeGreaterThan(totalATI);

// getNumberFromText is used to get the new products number
const productsNumber = await foClassicCartPage.getCartNotificationsNumber(page);
let productsNumber: number = 0;
if (semver.gte(psVersion, '7.8.0')) {
productsNumber = await foClassicCartPage.getCartNotificationsNumber(page);
} else {
productsNumber = await foClassicCartPage.getProductsNumber(page);
}
expect(productsNumber).toBeGreaterThan(itemsNumber);
});
});
4 changes: 2 additions & 2 deletions tests/UI/package-lock.json

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