Skip to content

Commit

Permalink
Merge pull request #755 from nesrineabdmouleh/addMatrice177ToMinor
Browse files Browse the repository at this point in the history
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
  • Loading branch information
nesrineabdmouleh authored Oct 25, 2024
2 parents 96c18b0 + 78a9e72 commit 987be6a
Show file tree
Hide file tree
Showing 6 changed files with 172 additions and 11 deletions.
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.

0 comments on commit 987be6a

Please sign in to comment.