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

v3.0.2 #276

Open
wants to merge 112 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
112 commits
Select commit Hold shift + click to select a range
4ac0622
turn npm install to npm ci
M0rgan01 Jun 1, 2023
9193f8b
Bump browserify-sign from 4.2.1 to 4.2.2
dependabot[bot] Oct 27, 2023
aa67d8a
Merge pull request #234 from PrestaShop/dependabot/npm_and_yarn/brows…
nicosomb Oct 29, 2023
1a3e582
Merge pull request #225 from M0rgan01/worklow-improvement
matks Nov 3, 2023
0928606
Update and rename upgrade-0.3.php to upgrade-0.3.0.php
Hlavtox Jan 11, 2024
aaaa3f2
Update and rename upgrade-1.1.php to upgrade-1.1.0.php
Hlavtox Jan 11, 2024
9a3fc73
Merge pull request #237 from Hlavtox/standardize-upgrade-files
Hlavtox Jan 11, 2024
e017978
Update blockwishlist.php
Hlavtox Jan 11, 2024
8d1e243
Update config.xml
Hlavtox Jan 11, 2024
dbaf532
Merge pull request #238 from Hlavtox/bump-version
Hlavtox Jan 11, 2024
29fa3b8
Added UI Tests
Progi1984 Jan 8, 2024
a0f6a43
Removed sample test
Progi1984 Jan 18, 2024
08befe5
Open the HTML Report
Progi1984 Jan 18, 2024
fb593f4
Ignore the .env file
Progi1984 Jan 18, 2024
eb101de
Test : Use step & try import unique
Progi1984 Jan 18, 2024
fa89052
Import unique
Progi1984 Jan 19, 2024
e5b82af
Bump dependency @prestashop-core/ui-testing to 0.0.3
Progi1984 Jan 22, 2024
825df30
Github Action : Continue if error
Progi1984 Jan 22, 2024
3029fe0
Fixed CI
Progi1984 Jan 22, 2024
67592e3
Bump dependency @prestashop-core/ui-testing to 0.0.4
Progi1984 Jan 22, 2024
9e997a8
Use prestashop/prestashop image
Progi1984 Jan 24, 2024
0153840
Bump dependency @prestashop-core/ui-testing to 0.0.5
Progi1984 Jan 24, 2024
52441e2
Bump dependency @prestashop-core/ui-testing to 0.0.6
Progi1984 Jan 24, 2024
574011d
Update config reporter
Progi1984 Jan 25, 2024
9218da8
Use Core config
Progi1984 Jan 26, 2024
f3a4082
Added workflow nightly
Progi1984 Feb 1, 2024
3615431
Update the action `actions/upload-artifact` to v4
Progi1984 Feb 1, 2024
3acfbc5
Added logs Docker
Progi1984 Feb 6, 2024
09c4b30
Changed check URL after docker up
Progi1984 Feb 20, 2024
c59e9a5
Removed mochawesome reporter
Progi1984 Feb 20, 2024
85c15d5
Added dependabot
Progi1984 Feb 20, 2024
f7fdd69
Added support to 8.1.4
Progi1984 Feb 20, 2024
b320b4e
Fixed some spaces
Progi1984 Feb 20, 2024
b96aa6d
Fixed matrix
Progi1984 Feb 20, 2024
fb1ddd0
Merge pull request #236 from Progi1984/ciTestsUI
jolelievre Feb 20, 2024
4ff182b
Tests UI : Remove pwmochamesome dependency
Progi1984 Feb 20, 2024
72f3bde
Merge pull request #244 from Progi1984/removePwMochawesome
Progi1984 Feb 20, 2024
ed4e4ef
Bump @types/node from 20.11.5 to 20.11.19 in /tests/UI
dependabot[bot] Feb 20, 2024
7d47758
Bump dotenv from 16.3.1 to 16.4.5 in /tests/UI
dependabot[bot] Feb 20, 2024
8653bc6
Merge pull request #242 from PrestaShop/dependabot/npm_and_yarn/tests…
Progi1984 Feb 20, 2024
57cd63a
Merge pull request #243 from PrestaShop/dependabot/npm_and_yarn/tests…
Progi1984 Feb 20, 2024
6b4b58a
Bump @playwright/test from 1.40.1 to 1.41.2 in /tests/UI
dependabot[bot] Feb 20, 2024
965cde6
Merge pull request #240 from PrestaShop/dependabot/npm_and_yarn/tests…
Progi1984 Feb 20, 2024
a64b9f5
UI Tests : Add permissions
Progi1984 Feb 21, 2024
a4cc5e3
Merge pull request #245 from Progi1984/gaTestsUiPermissions
Progi1984 Feb 21, 2024
5630998
Remove duplicated dependencies
Progi1984 Feb 21, 2024
91c9a7f
Merge pull request #246 from Progi1984/removeDependency
Progi1984 Feb 21, 2024
a5aad12
UI Tests : Push to GCP
Progi1984 Feb 22, 2024
73923fb
Merge pull request #248 from PrestaShop/gaCITestsUI
Progi1984 Feb 22, 2024
b107eca
UI Tests : Fixed output of the download-artifact
Progi1984 Feb 23, 2024
070ef11
Merge pull request #249 from Progi1984/fixNightly20240223
Progi1984 Feb 23, 2024
fc314f0
Fix buttons on wishlist products
SharakPL Mar 2, 2024
a91972b
Remove unneeded styles
SharakPL Mar 2, 2024
b1bea1b
Remove harmful styles
SharakPL Mar 3, 2024
d2653e7
Merge pull request #252 from SharakPL/fix-modals2
SharakPL Mar 5, 2024
46273b6
Merge pull request #251 from SharakPL/fix-buttons
SharakPL Mar 5, 2024
f4cc47d
UI Tests : Bump `@prestashop-core/ui-testing` to 0.0.11
Progi1984 Mar 21, 2024
2350111
Merge pull request #253 from Progi1984/uiTestsBump
Progi1984 Mar 22, 2024
88ea946
UI Tests : Execute tests on 8.1.5
Progi1984 Mar 27, 2024
9595059
Merge pull request #254 from Progi1984/uiTestsBump
Progi1984 Mar 27, 2024
b62cbc9
Migration from Docker Compose v1 to v2
Progi1984 Apr 3, 2024
53ae2bb
Merge pull request #256 from PrestaShop/byeByeDockerComposeV1
Progi1984 Apr 3, 2024
f50762d
Functional Tests : Bump to PS8.1.6
Progi1984 May 16, 2024
8939fae
Merge pull request #257 from Progi1984/uiTestBump816
Progi1984 May 16, 2024
231c5ae
Nightly : Bump to 8.1.6
Progi1984 May 28, 2024
4e41dc9
Merge pull request #258 from Progi1984/uiTestBump816
nicosomb May 28, 2024
2d2d9ce
Functional Tests : Wishlist module - Help header buttons
Progi1984 Jun 24, 2024
b1b31ec
Merge pull request #261 from Progi1984/test4249
Progi1984 Jun 25, 2024
b234424
Bump @prestashop-core/ui-testing in /tests/UI
dependabot[bot] Jul 1, 2024
bc36cad
Merge pull request #262 from PrestaShop/dependabot/npm_and_yarn/tests…
Progi1984 Jul 1, 2024
6177bc5
Bump @prestashop-core/ui-testing in /tests/UI
dependabot[bot] Jul 8, 2024
7d9004a
Merge pull request #263 from PrestaShop/dependabot/npm_and_yarn/tests…
Progi1984 Jul 8, 2024
675bae1
Bump @prestashop-core/ui-testing in /tests/UI
dependabot[bot] Jul 15, 2024
5167e66
Merge pull request #264 from PrestaShop/dependabot/npm_and_yarn/tests…
Progi1984 Jul 15, 2024
a5c02e4
Bump @prestashop-core/ui-testing in /tests/UI
dependabot[bot] Jul 22, 2024
c56831a
Merge pull request #265 from PrestaShop/dependabot/npm_and_yarn/tests…
Progi1984 Jul 22, 2024
f89e065
Functional Tests : Added 2 scenarios
Progi1984 Jul 22, 2024
fdc70ca
Merge pull request #266 from Progi1984/uiTestsAddScenarios
Progi1984 Jul 24, 2024
880a9bb
Functional Tests : Fixed nightly
Progi1984 Jul 25, 2024
2d5ff82
Merge pull request #267 from PrestaShop/Progi1984-patch-1
nicosomb Jul 25, 2024
6e64e37
Bump @prestashop-core/ui-testing in /tests/UI
dependabot[bot] Jul 29, 2024
6ae576c
Merge pull request #268 from PrestaShop/dependabot/npm_and_yarn/tests…
Progi1984 Jul 29, 2024
b32bbe8
Functional Tests : Added scenario "Uninstall and delete module"
Progi1984 Aug 1, 2024
d923832
Merge pull request #269 from Progi1984/uiTestsAddScenarios
Progi1984 Aug 1, 2024
4fef750
Bump @prestashop-core/ui-testing in /tests/UI
dependabot[bot] Aug 5, 2024
d449025
Merge pull request #270 from PrestaShop/dependabot/npm_and_yarn/tests…
Progi1984 Aug 5, 2024
9288e62
Bump @prestashop-core/ui-testing in /tests/UI
dependabot[bot] Aug 12, 2024
ae7b3ce
Merge pull request #271 from PrestaShop/dependabot/npm_and_yarn/tests…
Progi1984 Aug 26, 2024
ee5b636
UI Tests : Bump `@prestashop-core/ui-testing`
Progi1984 Aug 26, 2024
d89cc57
Merge pull request #273 from Progi1984/bumpUITestingLib
Progi1984 Aug 26, 2024
d52f264
Fixed ability to mark a product (with specific combination) as favorite
nicosomb Aug 27, 2024
c23cc9f
Removed the skipped test
nicosomb Aug 27, 2024
ecbb893
Restored correct variable
nicosomb Aug 27, 2024
659df65
Merge pull request #274 from PrestaShop/fix-combination-favorite
nicosomb Aug 29, 2024
1f7652b
Bump @prestashop-core/ui-testing in /tests/UI
dependabot[bot] Sep 2, 2024
d09e32f
Merge pull request #277 from PrestaShop/dependabot/npm_and_yarn/tests…
Progi1984 Sep 2, 2024
ad2a44f
Bump actions/download-artifact from 3 to 4.1.7 in /.github/workflows
dependabot[bot] Sep 3, 2024
7c597d8
Merge pull request #278 from PrestaShop/dependabot/github_actions/dot…
Progi1984 Sep 4, 2024
fa175d6
Bump @prestashop-core/ui-testing in /tests/UI
dependabot[bot] Sep 9, 2024
49dc273
Merge pull request #279 from PrestaShop/dependabot/npm_and_yarn/tests…
Progi1984 Sep 9, 2024
e6e8c9c
Fixed undefined array key category_name in statistics
nicosomb Sep 10, 2024
3e55b3b
Remove unused meta_keywords
Hlavtox Sep 10, 2024
99ee98c
Merge pull request #281 from Hlavtox/remove-keywords
kpodemski Sep 11, 2024
117de4f
Bump @prestashop-core/ui-testing in /tests/UI
dependabot[bot] Sep 16, 2024
6cfae7c
Merge pull request #282 from PrestaShop/dependabot/npm_and_yarn/tests…
Progi1984 Sep 16, 2024
f583d5c
Bump serve-static and express in /tests/UI
dependabot[bot] Sep 16, 2024
5191d70
Merge pull request #283 from PrestaShop/dependabot/npm_and_yarn/tests…
Progi1984 Sep 16, 2024
6232e70
Bump @prestashop-core/ui-testing in /tests/UI
dependabot[bot] Sep 23, 2024
b08dfe9
Merge pull request #287 from PrestaShop/dependabot/npm_and_yarn/tests…
Progi1984 Sep 23, 2024
0ba7be0
Bump @prestashop-core/ui-testing in /tests/UI
dependabot[bot] Sep 30, 2024
36c8a36
Merge pull request #288 from PrestaShop/dependabot/npm_and_yarn/tests…
Progi1984 Sep 30, 2024
5b312ca
Merge pull request #280 from PrestaShop/fix-undefined-array-key
Hlavtox Oct 1, 2024
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
16 changes: 16 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
version: 2
updates:
- package-ecosystem: npm
directory: "/tests/UI"
schedule:
interval: weekly
day: monday
time: "04:00"
open-pull-requests-limit: 10
target-branch: dev
reviewers:
- "PrestaShop/qa-automation"
labels:
- "dependencies"
- "E2E Tests"
- "TE"
4 changes: 2 additions & 2 deletions .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
with:
node-version: 14.x

- run: npm install
- run: npm ci

- name: Build PrestaShop assets
run: |
Expand Down Expand Up @@ -61,7 +61,7 @@ jobs:
if: github.event_name == 'push' && github.event.ref == 'refs/heads/master'
steps:
- name: Download artifact
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4.1.7
with:
name: ${{ github.event.repository.name }}

Expand Down
160 changes: 160 additions & 0 deletions .github/workflows/ui-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,160 @@
name: UI Tests
on:
## Check each PR
push:
pull_request:
## Manual execution on branch
workflow_dispatch:
## Nightly
### Needs secrets
#### GC_PROJECT_ID
#### GC_SERVICE_KEY
#### NIGHTLY_TOKEN
schedule:
- cron: '0 0 * * *'

env:
CAMPAIGN: 'blockwishlist'

jobs:
ui_test:
name: UI Tests
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
include:
- PS_VERSION: '8.0.5'
PHP_VERSION: '8.1'
- PS_VERSION: '8.1.7'
PHP_VERSION: '8.1'
- PS_VERSION: 'nightly'
PHP_VERSION: '8.2'

env:
PS_VERSION: ${{ matrix.PS_VERSION }}

steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 16

- name: Build
run: npm install && npm run build

- name: Build ZIP
run: |
cd ..
zip -r ${{ github.event.repository.name }}.zip ${{ github.event.repository.name }}
cd ${{ github.event.repository.name }}

- name: Start containers
working-directory: tests/UI/
env:
PS_VERSION: ${{ matrix.PS_VERSION }}
PHP_VERSION: ${{ matrix.PHP_VERSION }}
run: |
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
working-directory: tests/UI/
run: npm ci

- name: Install Playwright Browsers
working-directory: tests/UI/
run: npx playwright install chromium --with-deps

- name: Run Playwright tests
working-directory: tests/UI/
run: npx playwright test

- name: Upload artifact report
uses: actions/upload-artifact@v4
with:
name: playwright-report-${{ matrix.PS_VERSION }}
path: tests/UI/report.json

- name: Export Docker errors
working-directory: tests/UI/
if: always()
run: docker compose logs --no-color >& docker-compose.log

- name: Upload artifact logs
uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-logs-${{ matrix.PS_VERSION }}
path: |
tests/UI/reports/
tests/UI/docker-compose.log

nightly:
name: Nightly Report
if: ${{ github.event_name == 'schedule' }}
needs:
- ui_test
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
include:
- PS_VERSION: '8.0.5'
PHP_VERSION: '8.1'
- PS_VERSION: '8.1.7'
PHP_VERSION: '8.1'
- PS_VERSION: 'nightly'
PHP_VERSION: '8.2'

env:
PS_VERSION: ${{ matrix.PS_VERSION }}
PHP_VERSION: ${{ matrix.PHP_VERSION }}

permissions:
contents: 'read'
id-token: 'write'

steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Download report
uses: actions/download-artifact@v4.1.7
with:
name: playwright-report-${{ matrix.PS_VERSION }}
path: tests/UI/

- name: "Nightly : Rename file"
working-directory: tests/UI/
run: |
mkdir -p nightly
REPORT_NAME="${{ env.CAMPAIGN }}_$(date +%Y-%m-%d)-${{ matrix.PS_VERSION }}"
mv report.json nightly/${REPORT_NAME}.json

- name: "Nightly : Auth GCP"
uses: google-github-actions/auth@v1
with:
credentials_json: ${{ secrets.GC_SERVICE_KEY }}
project_id: ${{ secrets.GC_PROJECT_ID }}

- name: "Nightly : Setup GCP"
uses: google-github-actions/setup-gcloud@v1

- name: "Nightly : Upload to Google Cloud Storage (GCS)"
working-directory: tests/UI/
run: gsutil cp -r "nightly/**" gs://prestashop-core-nightly/reports

- name: "Nightly : Push Report"
run: |
REPORT_NAME="${{ env.CAMPAIGN }}_$(date +%Y-%m-%d)-${{ matrix.PS_VERSION }}"
curl -v "https://api-nightly.prestashop-project.org/import/report/playwright?token=${{ secrets.NIGHTLY_TOKEN }}&filename=${REPORT_NAME}.json&campaign=${{ env.CAMPAIGN }}&platform=chromium"
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,9 @@ node_modules

# mac
.DS_Store

## UI Tests
/tests/UI/.env
/tests/UI/node_modules/
/tests/UI/report.json
/tests/UI/reports/
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ db: docker-build
docker-build: build-back build-front

build-back:
docker-compose run --rm php sh -c "composer install"
docker compose run --rm php sh -c "composer install"

build-back-prod:
docker-compose run --rm php sh -c "composer install --no-dev -o"
docker compose run --rm php sh -c "composer install --no-dev -o"

build-front:
docker-compose run --rm node sh -c "npm install"
docker-compose run --rm node sh -c "npm run build"
docker compose run --rm node sh -c "npm install"
docker compose run --rm node sh -c "npm run build"
10 changes: 5 additions & 5 deletions _dev/front/js/components/Button/Button.vue
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
EventBus.$emit('showAddToWishList', {
detail: {
productId: this.productId,
productAttributeId: parseInt(this.productAttributeId, 10),
productAttributeId: parseInt(this.idProductAttribute, 10),
forceOpen: true,
quantity: quantity ? parseInt(quantity.value, 10) : 0,
},
Expand All @@ -113,7 +113,7 @@
variables: {
productId: this.productId,
url: this.url,
productAttributeId: this.productAttributeId,
productAttributeId: this.idProductAttribute,
listId: this.idList ? this.idList : this.listId,
},
});
Expand All @@ -140,7 +140,7 @@
EventBus.$on('addedToWishlist', (event) => {
if (
event.detail.productId === this.productId
&& parseInt(event.detail.productAttributeId, 10) === this.productAttributeId
&& parseInt(event.detail.productAttributeId, 10) === this.idProductAttribute
) {
this.isChecked = true;
this.idList = event.detail.listId;
Expand All @@ -150,7 +150,7 @@
// eslint-disable-next-line
const items = productsAlreadyTagged.filter(
(e) => parseInt(e.id_product, 10) === this.productId
&& parseInt(e.id_product_attribute, 10) === this.productAttributeId,
&& parseInt(e.id_product_attribute, 10) === this.idProductAttribute,
);

if (items.length > 0) {
Expand All @@ -176,7 +176,7 @@
const itemsFiltered = productsAlreadyTagged.filter(
(e) => parseInt(e.id_product, 10) === this.productId
&& e.quantity.toString() === quantity.value
&& parseInt(e.id_product_attribute, 10) === this.productAttributeId,
&& parseInt(e.id_product_attribute, 10) === this.idProductAttribute,
);

if (itemsFiltered.length > 0) {
Expand Down
18 changes: 0 additions & 18 deletions _dev/front/js/components/Create/Create.vue
Original file line number Diff line number Diff line change
Expand Up @@ -139,21 +139,3 @@
},
};
</script>

<style lang="scss" type="text/scss">
.wishlist {
&-create {
.wishlist-modal {
opacity: 0;
pointer-events: none;
z-index: 0;

&.show {
opacity: 1;
pointer-events: all;
z-index: 1053;
}
}
}
}
</style>
19 changes: 0 additions & 19 deletions _dev/front/js/components/Delete/Delete.vue
Original file line number Diff line number Diff line change
Expand Up @@ -156,22 +156,3 @@
},
};
</script>

<style lang="scss" type="text/scss">
.wishlist {
&-delete {
.wishlist-modal {
display: block;
opacity: 0;
pointer-events: none;
z-index: 0;

&.show {
opacity: 1;
pointer-events: all;
z-index: 1053;
}
}
}
}
</style>
14 changes: 0 additions & 14 deletions _dev/front/js/components/Login/Login.vue
Original file line number Diff line number Diff line change
Expand Up @@ -65,17 +65,3 @@
},
};
</script>

<style lang="scss" type="text/scss">
.wishlist {
&-login {
.wishlist-modal {
z-index: 0;

&.show {
z-index: 1053;
}
}
}
}
</style>
28 changes: 7 additions & 21 deletions _dev/front/js/components/Product/Product.vue
Original file line number Diff line number Diff line change
Expand Up @@ -116,23 +116,23 @@
<button
class="btn wishlist-product-addtocart"
:class="{
'btn-secondary': product.customizable === '1',
'btn-primary': product.customizable === '0'
'btn-secondary': product.customizable,
'btn-primary': !product.customizable
}"
:disabled="isDisabled || forceDisable"
@click="
product.add_to_cart_url || product.customizable === '1'
product.add_to_cart_url || product.customizable
? addToCartAction()
: null
"
>
<i
class="material-icons shopping-cart"
v-if="product.customizable === '0'"
v-if="!product.customizable"
>
shopping_cart
</i>
{{ product.customizable === '1' ? customizeText : addToCart }}
{{ product.customizable ? customizeText : addToCart }}
</button>

<button
Expand Down Expand Up @@ -235,7 +235,7 @@
return false;
}

if (this.product.customizable === '1') {
if (this.product.customizable) {
return false;
}

Expand Down Expand Up @@ -271,7 +271,7 @@
});
},
async addToCartAction() {
if (this.product.add_to_cart_url && this.product.customizable !== '1') {
if (this.product.add_to_cart_url && !this.product.customizable) {
try {
this.forceDisable = true;
const datas = new FormData();
Expand Down Expand Up @@ -474,20 +474,6 @@
&-addtocart {
width: 100%;
text-transform: inherit;
padding-left: 0.625rem;

&.btn-secondary {
background-color: #dddddd;

&:hover {
background-color: #dddddd;
opacity: 0.7;
}
}

i {
margin-top: -0.1875rem;
}
}
}

Expand Down
Loading
Loading