From 889795333304442bfd635f024eac8543566a94f0 Mon Sep 17 00:00:00 2001 From: Levente Santha Date: Fri, 2 Sep 2022 15:25:57 +0300 Subject: [PATCH 01/16] CIF-2937 - 2022.08.0 Release Post Actions * set CIF components dependency to snapshot version --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 5662880f..f6de9603 100644 --- a/pom.xml +++ b/pom.xml @@ -87,7 +87,7 @@ admin admin 2.18.6 - 2.11.0 + 2.11.1-SNAPSHOT 1.7.10 9.1.0-magento242ee 5.1.2 From 953a0221a1174f28e18c4606aad0c4fb4adf54d9 Mon Sep 17 00:00:00 2001 From: Dirk Rudolph Date: Thu, 29 Sep 2022 16:07:26 +0200 Subject: [PATCH 02/16] fix: Integration Tests failing on datalayer assertions (#314) --- .../resources/datalayer/placeholder-category-items.json | 6 ++++++ .../src/main/resources/datalayer/sample-category-items.json | 6 ++++++ .../main/resources/datalayer/sample-searchresult-items.json | 6 ++++++ 3 files changed, 18 insertions(+) diff --git a/it.tests/src/main/resources/datalayer/placeholder-category-items.json b/it.tests/src/main/resources/datalayer/placeholder-category-items.json index 32019619..c9b57c19 100644 --- a/it.tests/src/main/resources/datalayer/placeholder-category-items.json +++ b/it.tests/src/main/resources/datalayer/placeholder-category-items.json @@ -3,6 +3,7 @@ "productlist-a8fbd236cd-item-e3b0c44298": { "xdm:currencyCode": "USD", "xdm:listPrice": 101.0, + "xdm:discountAmount": 0.0, "@type": "core/cif/components/commerce/productlistitem", "dc:title": "Product #1" } @@ -11,6 +12,7 @@ "productlist-a8fbd236cd-item-e3b0c44298": { "xdm:currencyCode": "USD", "xdm:listPrice": 102.0, + "xdm:discountAmount": 0.0, "@type": "core/cif/components/commerce/productlistitem", "dc:title": "Product #2" } @@ -19,6 +21,7 @@ "productlist-a8fbd236cd-item-e3b0c44298": { "xdm:currencyCode": "USD", "xdm:listPrice": 103.0, + "xdm:discountAmount": 0.0, "@type": "core/cif/components/commerce/productlistitem", "dc:title": "Product #3" } @@ -27,6 +30,7 @@ "productlist-a8fbd236cd-item-e3b0c44298": { "xdm:currencyCode": "USD", "xdm:listPrice": 104.0, + "xdm:discountAmount": 0.0, "@type": "core/cif/components/commerce/productlistitem", "dc:title": "Product #4" } @@ -35,6 +39,7 @@ "productlist-a8fbd236cd-item-e3b0c44298": { "xdm:currencyCode": "USD", "xdm:listPrice": 105.0, + "xdm:discountAmount": 0.0, "@type": "core/cif/components/commerce/productlistitem", "dc:title": "Product #5" } @@ -43,6 +48,7 @@ "productlist-a8fbd236cd-item-e3b0c44298": { "xdm:currencyCode": "USD", "xdm:listPrice": 106.0, + "xdm:discountAmount": 0.0, "@type": "core/cif/components/commerce/productlistitem", "dc:title": "Product #6" } diff --git a/it.tests/src/main/resources/datalayer/sample-category-items.json b/it.tests/src/main/resources/datalayer/sample-category-items.json index 54569c53..3c896a33 100644 --- a/it.tests/src/main/resources/datalayer/sample-category-items.json +++ b/it.tests/src/main/resources/datalayer/sample-category-items.json @@ -3,6 +3,7 @@ "productlist-a8fbd236cd-item-9fd914275e": { "xdm:SKU": "VP01", "xdm:listPrice": 108.0, + "xdm:discountAmount": 0.0, "xdm:currencyCode": "USD", "dc:title": "Selena Pants", "@type": "core/cif/components/commerce/productlistitem" @@ -12,6 +13,7 @@ "productlist-a8fbd236cd-item-089c85bf92": { "xdm:SKU": "VP02", "xdm:listPrice": 88.0, + "xdm:discountAmount": 0.0, "xdm:currencyCode": "USD", "dc:title": "Gloria Palazzo Pants", "@type": "core/cif/components/commerce/productlistitem" @@ -21,6 +23,7 @@ "productlist-a8fbd236cd-item-f60b28fa82": { "xdm:SKU": "VP03", "xdm:listPrice": 88.0, + "xdm:discountAmount": 0.0, "xdm:currencyCode": "USD", "dc:title": "Camilla Palazzo Pants", "@type": "core/cif/components/commerce/productlistitem" @@ -30,6 +33,7 @@ "productlist-a8fbd236cd-item-358f8d0758": { "xdm:SKU": "VP04", "xdm:listPrice": 98.0, + "xdm:discountAmount": 0.0, "xdm:currencyCode": "USD", "dc:title": "Clara Wide Leg Pants", "@type": "core/cif/components/commerce/productlistitem" @@ -39,6 +43,7 @@ "productlist-a8fbd236cd-item-e00955a3c3": { "xdm:SKU": "VP05", "xdm:listPrice": 78.0, + "xdm:discountAmount": 0.0, "xdm:currencyCode": "USD", "dc:title": "Honora Wide Leg Pants", "@type": "core/cif/components/commerce/productlistitem" @@ -48,6 +53,7 @@ "productlist-a8fbd236cd-item-24b8a07ed4": { "xdm:SKU": "VP06", "xdm:listPrice": 98.0, + "xdm:discountAmount": 0.0, "xdm:currencyCode": "USD", "dc:title": "Calista Linen Pants", "@type": "core/cif/components/commerce/productlistitem" diff --git a/it.tests/src/main/resources/datalayer/sample-searchresult-items.json b/it.tests/src/main/resources/datalayer/sample-searchresult-items.json index ebfa0ac9..7d30ee23 100644 --- a/it.tests/src/main/resources/datalayer/sample-searchresult-items.json +++ b/it.tests/src/main/resources/datalayer/sample-searchresult-items.json @@ -4,6 +4,7 @@ "xdm:SKU": "VP06", "xdm:listPrice": 98.0, "xdm:currencyCode": "USD", + "xdm:discountAmount": 0.0, "@type": "core/cif/components/commerce/productlistitem", "dc:title": "Calista Linen Pants" } @@ -12,6 +13,7 @@ "searchresults-5931a2d225-item-f60b28fa82": { "xdm:SKU": "VP03", "xdm:listPrice": 88.0, + "xdm:discountAmount": 0.0, "xdm:currencyCode": "USD", "@type": "core/cif/components/commerce/productlistitem", "dc:title": "Camilla Palazzo Pants" @@ -21,6 +23,7 @@ "searchresults-5931a2d225-item-df6faa2c86": { "xdm:SKU": "VD02", "xdm:listPrice": 108.0, + "xdm:discountAmount": 0.0, "xdm:currencyCode": "USD", "@type": "core/cif/components/commerce/productlistitem", "dc:title": "Candace Dress" @@ -30,6 +33,7 @@ "searchresults-5931a2d225-item-358f8d0758": { "xdm:SKU": "VP04", "xdm:listPrice": 98.0, + "xdm:discountAmount": 0.0, "xdm:currencyCode": "USD", "@type": "core/cif/components/commerce/productlistitem", "dc:title": "Clara Wide Leg Pants" @@ -39,6 +43,7 @@ "searchresults-5931a2d225-item-3385ee1d32": { "xdm:SKU": "VP07", "xdm:listPrice": 88.0, + "xdm:discountAmount": 0.0, "xdm:currencyCode": "USD", "@type": "core/cif/components/commerce/productlistitem", "dc:title": "Fauna Palazzo Pants" @@ -48,6 +53,7 @@ "searchresults-5931a2d225-item-089c85bf92": { "xdm:SKU": "VP02", "xdm:listPrice": 88.0, + "xdm:discountAmount": 0.0, "xdm:currencyCode": "USD", "@type": "core/cif/components/commerce/productlistitem", "dc:title": "Gloria Palazzo Pants" From 308cecdd4567459f30d936144a10b98fc74c0b26 Mon Sep 17 00:00:00 2001 From: Dirk Rudolph Date: Thu, 29 Sep 2022 19:31:14 +0200 Subject: [PATCH 03/16] releng: update to core cif componetns 2.12.0 --- pom.xml | 2 +- ui.frontend/package-lock.json | 12 ++++++------ ui.frontend/package.json | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/pom.xml b/pom.xml index 888340ee..0259b5dc 100644 --- a/pom.xml +++ b/pom.xml @@ -87,7 +87,7 @@ admin admin 2.18.6 - 2.11.1-SNAPSHOT + 2.12.0 1.7.10 9.1.0-magento242ee 5.1.2 diff --git a/ui.frontend/package-lock.json b/ui.frontend/package-lock.json index 935f529e..0c6d286e 100644 --- a/ui.frontend/package-lock.json +++ b/ui.frontend/package-lock.json @@ -5,14 +5,14 @@ "requires": true, "dependencies": { "@adobe/aem-core-cif-product-recs-extension": { - "version": "2.11.0", - "resolved": "https://registry.npmjs.org/@adobe/aem-core-cif-product-recs-extension/-/aem-core-cif-product-recs-extension-2.11.0.tgz", - "integrity": "sha512-u2bWXzhzYW6SlVP6XnCd6nGJStf9bGscmXZl4Rlb1Y1YQxFAHtaOd1LAHEvfZW9gMUA/xYbS7YprnC6TzNFyDw==" + "version": "2.12.0", + "resolved": "https://registry.npmjs.org/@adobe/aem-core-cif-product-recs-extension/-/aem-core-cif-product-recs-extension-2.12.0.tgz", + "integrity": "sha512-rj9QirxjcE6I+0x+uMnkt/wOLBtAz3tmoq3//JLnplASs300+Bsi0h65Ab0CaxLayTS/pSWj6LpcSZGiYSZI+Q==" }, "@adobe/aem-core-cif-react-components": { - "version": "2.11.0", - "resolved": "https://registry.npmjs.org/@adobe/aem-core-cif-react-components/-/aem-core-cif-react-components-2.11.0.tgz", - "integrity": "sha512-loGp11TrUeFpjjwcMqp7B70xQe1kJxbIlE23JiVJX/E3AWGsXYAc1pbMaJEv8wFJqhNjYL1UrKSYjCrvDPdVBA==" + "version": "2.12.0", + "resolved": "https://registry.npmjs.org/@adobe/aem-core-cif-react-components/-/aem-core-cif-react-components-2.12.0.tgz", + "integrity": "sha512-kq5REBCYad0b6xNf9+TqCpD/Iq1DNV5dP3+N28s7EkoHJydNKD7OG8oR9gUDZEUJDemp5je+FLIpAqWqBPmw7A==" }, "@apollo/client": { "version": "3.5.6", diff --git a/ui.frontend/package.json b/ui.frontend/package.json index 71c8a2fc..bd8c629e 100644 --- a/ui.frontend/package.json +++ b/ui.frontend/package.json @@ -87,8 +87,8 @@ "webpack-merge": "^4.2.1" }, "dependencies": { - "@adobe/aem-core-cif-product-recs-extension": "2.11.0", - "@adobe/aem-core-cif-react-components": "2.11.0", + "@adobe/aem-core-cif-product-recs-extension": "2.12.0", + "@adobe/aem-core-cif-react-components": "2.12.0", "@apollo/client": "^3.5.5", "@babel/runtime": "^7.4.5", "@magento/peregrine": "11.0.0", From e322da31071051cc45add0e5c8e703eab36858af Mon Sep 17 00:00:00 2001 From: Dirk Rudolph Date: Thu, 29 Sep 2022 16:07:26 +0200 Subject: [PATCH 04/16] fix: Integration Tests failing on datalayer assertions (#314) --- .../resources/datalayer/placeholder-category-items.json | 6 ++++++ .../src/main/resources/datalayer/sample-category-items.json | 6 ++++++ .../main/resources/datalayer/sample-searchresult-items.json | 6 ++++++ 3 files changed, 18 insertions(+) diff --git a/it.tests/src/main/resources/datalayer/placeholder-category-items.json b/it.tests/src/main/resources/datalayer/placeholder-category-items.json index 32019619..c9b57c19 100644 --- a/it.tests/src/main/resources/datalayer/placeholder-category-items.json +++ b/it.tests/src/main/resources/datalayer/placeholder-category-items.json @@ -3,6 +3,7 @@ "productlist-a8fbd236cd-item-e3b0c44298": { "xdm:currencyCode": "USD", "xdm:listPrice": 101.0, + "xdm:discountAmount": 0.0, "@type": "core/cif/components/commerce/productlistitem", "dc:title": "Product #1" } @@ -11,6 +12,7 @@ "productlist-a8fbd236cd-item-e3b0c44298": { "xdm:currencyCode": "USD", "xdm:listPrice": 102.0, + "xdm:discountAmount": 0.0, "@type": "core/cif/components/commerce/productlistitem", "dc:title": "Product #2" } @@ -19,6 +21,7 @@ "productlist-a8fbd236cd-item-e3b0c44298": { "xdm:currencyCode": "USD", "xdm:listPrice": 103.0, + "xdm:discountAmount": 0.0, "@type": "core/cif/components/commerce/productlistitem", "dc:title": "Product #3" } @@ -27,6 +30,7 @@ "productlist-a8fbd236cd-item-e3b0c44298": { "xdm:currencyCode": "USD", "xdm:listPrice": 104.0, + "xdm:discountAmount": 0.0, "@type": "core/cif/components/commerce/productlistitem", "dc:title": "Product #4" } @@ -35,6 +39,7 @@ "productlist-a8fbd236cd-item-e3b0c44298": { "xdm:currencyCode": "USD", "xdm:listPrice": 105.0, + "xdm:discountAmount": 0.0, "@type": "core/cif/components/commerce/productlistitem", "dc:title": "Product #5" } @@ -43,6 +48,7 @@ "productlist-a8fbd236cd-item-e3b0c44298": { "xdm:currencyCode": "USD", "xdm:listPrice": 106.0, + "xdm:discountAmount": 0.0, "@type": "core/cif/components/commerce/productlistitem", "dc:title": "Product #6" } diff --git a/it.tests/src/main/resources/datalayer/sample-category-items.json b/it.tests/src/main/resources/datalayer/sample-category-items.json index 54569c53..3c896a33 100644 --- a/it.tests/src/main/resources/datalayer/sample-category-items.json +++ b/it.tests/src/main/resources/datalayer/sample-category-items.json @@ -3,6 +3,7 @@ "productlist-a8fbd236cd-item-9fd914275e": { "xdm:SKU": "VP01", "xdm:listPrice": 108.0, + "xdm:discountAmount": 0.0, "xdm:currencyCode": "USD", "dc:title": "Selena Pants", "@type": "core/cif/components/commerce/productlistitem" @@ -12,6 +13,7 @@ "productlist-a8fbd236cd-item-089c85bf92": { "xdm:SKU": "VP02", "xdm:listPrice": 88.0, + "xdm:discountAmount": 0.0, "xdm:currencyCode": "USD", "dc:title": "Gloria Palazzo Pants", "@type": "core/cif/components/commerce/productlistitem" @@ -21,6 +23,7 @@ "productlist-a8fbd236cd-item-f60b28fa82": { "xdm:SKU": "VP03", "xdm:listPrice": 88.0, + "xdm:discountAmount": 0.0, "xdm:currencyCode": "USD", "dc:title": "Camilla Palazzo Pants", "@type": "core/cif/components/commerce/productlistitem" @@ -30,6 +33,7 @@ "productlist-a8fbd236cd-item-358f8d0758": { "xdm:SKU": "VP04", "xdm:listPrice": 98.0, + "xdm:discountAmount": 0.0, "xdm:currencyCode": "USD", "dc:title": "Clara Wide Leg Pants", "@type": "core/cif/components/commerce/productlistitem" @@ -39,6 +43,7 @@ "productlist-a8fbd236cd-item-e00955a3c3": { "xdm:SKU": "VP05", "xdm:listPrice": 78.0, + "xdm:discountAmount": 0.0, "xdm:currencyCode": "USD", "dc:title": "Honora Wide Leg Pants", "@type": "core/cif/components/commerce/productlistitem" @@ -48,6 +53,7 @@ "productlist-a8fbd236cd-item-24b8a07ed4": { "xdm:SKU": "VP06", "xdm:listPrice": 98.0, + "xdm:discountAmount": 0.0, "xdm:currencyCode": "USD", "dc:title": "Calista Linen Pants", "@type": "core/cif/components/commerce/productlistitem" diff --git a/it.tests/src/main/resources/datalayer/sample-searchresult-items.json b/it.tests/src/main/resources/datalayer/sample-searchresult-items.json index ebfa0ac9..7d30ee23 100644 --- a/it.tests/src/main/resources/datalayer/sample-searchresult-items.json +++ b/it.tests/src/main/resources/datalayer/sample-searchresult-items.json @@ -4,6 +4,7 @@ "xdm:SKU": "VP06", "xdm:listPrice": 98.0, "xdm:currencyCode": "USD", + "xdm:discountAmount": 0.0, "@type": "core/cif/components/commerce/productlistitem", "dc:title": "Calista Linen Pants" } @@ -12,6 +13,7 @@ "searchresults-5931a2d225-item-f60b28fa82": { "xdm:SKU": "VP03", "xdm:listPrice": 88.0, + "xdm:discountAmount": 0.0, "xdm:currencyCode": "USD", "@type": "core/cif/components/commerce/productlistitem", "dc:title": "Camilla Palazzo Pants" @@ -21,6 +23,7 @@ "searchresults-5931a2d225-item-df6faa2c86": { "xdm:SKU": "VD02", "xdm:listPrice": 108.0, + "xdm:discountAmount": 0.0, "xdm:currencyCode": "USD", "@type": "core/cif/components/commerce/productlistitem", "dc:title": "Candace Dress" @@ -30,6 +33,7 @@ "searchresults-5931a2d225-item-358f8d0758": { "xdm:SKU": "VP04", "xdm:listPrice": 98.0, + "xdm:discountAmount": 0.0, "xdm:currencyCode": "USD", "@type": "core/cif/components/commerce/productlistitem", "dc:title": "Clara Wide Leg Pants" @@ -39,6 +43,7 @@ "searchresults-5931a2d225-item-3385ee1d32": { "xdm:SKU": "VP07", "xdm:listPrice": 88.0, + "xdm:discountAmount": 0.0, "xdm:currencyCode": "USD", "@type": "core/cif/components/commerce/productlistitem", "dc:title": "Fauna Palazzo Pants" @@ -48,6 +53,7 @@ "searchresults-5931a2d225-item-089c85bf92": { "xdm:SKU": "VP02", "xdm:listPrice": 88.0, + "xdm:discountAmount": 0.0, "xdm:currencyCode": "USD", "@type": "core/cif/components/commerce/productlistitem", "dc:title": "Gloria Palazzo Pants" From 19286f0db91480f79d676166a41eac239790392a Mon Sep 17 00:00:00 2001 From: Dirk Rudolph Date: Fri, 30 Sep 2022 10:05:40 +0200 Subject: [PATCH 05/16] fix: remove old static templates (fixes #307) (#313) --- .../main/content/jcr_root/apps/.content.xml | 4 --- .../venia/templates/page-content/.content.xml | 30 ------------------- .../venia/templates/page-home/.content.xml | 30 ------------------- 3 files changed, 64 deletions(-) delete mode 100644 ui.apps/src/main/content/jcr_root/apps/.content.xml delete mode 100644 ui.apps/src/main/content/jcr_root/apps/venia/templates/page-content/.content.xml delete mode 100644 ui.apps/src/main/content/jcr_root/apps/venia/templates/page-home/.content.xml diff --git a/ui.apps/src/main/content/jcr_root/apps/.content.xml b/ui.apps/src/main/content/jcr_root/apps/.content.xml deleted file mode 100644 index 792d2ead..00000000 --- a/ui.apps/src/main/content/jcr_root/apps/.content.xml +++ /dev/null @@ -1,4 +0,0 @@ - - diff --git a/ui.apps/src/main/content/jcr_root/apps/venia/templates/page-content/.content.xml b/ui.apps/src/main/content/jcr_root/apps/venia/templates/page-content/.content.xml deleted file mode 100644 index 9ef8d335..00000000 --- a/ui.apps/src/main/content/jcr_root/apps/venia/templates/page-content/.content.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - <topnav - jcr:primaryType="nt:unstructured" - sling:resourceType="venia/components/topnav"/> - <par - jcr:primaryType="nt:unstructured" - sling:resourceType="wcm/foundation/components/parsys"> - <text - jcr:primaryType="nt:unstructured" - sling:resourceType="venia/components/text" - text="<p>This is a content page</p>" - textIsRich="true"/> - </par> - </jcr:content> -</jcr:root> diff --git a/ui.apps/src/main/content/jcr_root/apps/venia/templates/page-home/.content.xml b/ui.apps/src/main/content/jcr_root/apps/venia/templates/page-home/.content.xml deleted file mode 100644 index bfc32d3d..00000000 --- a/ui.apps/src/main/content/jcr_root/apps/venia/templates/page-home/.content.xml +++ /dev/null @@ -1,30 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" - jcr:description="Template for initial or main page of the site." - jcr:primaryType="cq:Template" - jcr:title="Venia Home Page" - allowedPaths="[/content/venia]" - ranking="{Long}100"> - <jcr:content - jcr:primaryType="cq:PageContent" - sling:resourceType="venia/components/page"> - <logo - jcr:primaryType="nt:unstructured" - sling:resourceType="venia/components/logo"/> - <title - jcr:primaryType="nt:unstructured" - sling:resourceType="venia/components/title"/> - <topnav - jcr:primaryType="nt:unstructured" - sling:resourceType="venia/components/topnav"/> - <par - jcr:primaryType="nt:unstructured" - sling:resourceType="wcm/foundation/components/parsys"> - <text - jcr:primaryType="nt:unstructured" - sling:resourceType="venia/components/text" - text="<p>This is a home page</p>" - textIsRich="true"/> - </par> - </jcr:content> -</jcr:root> From 13559b3ea1b5b532e9b24e288e5470f93f6f1350 Mon Sep 17 00:00:00 2001 From: Dirk Rudolph <drudolph@adobe.com> Date: Fri, 30 Sep 2022 11:03:15 +0200 Subject: [PATCH 06/16] releng: update dev after 2022.9.30 release (#316) --- all/pom.xml | 2 +- classic/all/pom.xml | 2 +- classic/dispatcher/pom.xml | 2 +- classic/ui.config/pom.xml | 2 +- classic/ui.content/pom.xml | 2 +- core/pom.xml | 2 +- dispatcher/pom.xml | 2 +- it.tests/pom.xml | 2 +- pom.xml | 2 +- ui.apps.structure/pom.xml | 2 +- ui.apps/pom.xml | 2 +- ui.config/pom.xml | 2 +- ui.content/pom.xml | 2 +- ui.frontend/pom.xml | 2 +- ui.tests/pom.xml | 2 +- 15 files changed, 15 insertions(+), 15 deletions(-) diff --git a/all/pom.xml b/all/pom.xml index 35b200d4..1a6070f8 100644 --- a/all/pom.xml +++ b/all/pom.xml @@ -23,7 +23,7 @@ <parent> <groupId>com.adobe.aem.guides</groupId> <artifactId>aem-cif-guides-venia</artifactId> - <version>2022.09.03-SNAPSHOT</version> + <version>2022.09.31-SNAPSHOT</version> <relativePath>../pom.xml</relativePath> </parent> diff --git a/classic/all/pom.xml b/classic/all/pom.xml index a7ed8a64..78c5b98c 100644 --- a/classic/all/pom.xml +++ b/classic/all/pom.xml @@ -23,7 +23,7 @@ <parent> <groupId>com.adobe.aem.guides</groupId> <artifactId>aem-cif-guides-venia</artifactId> - <version>2022.09.03-SNAPSHOT</version> + <version>2022.09.31-SNAPSHOT</version> <relativePath>../../pom.xml</relativePath> </parent> diff --git a/classic/dispatcher/pom.xml b/classic/dispatcher/pom.xml index b8199115..319cc053 100644 --- a/classic/dispatcher/pom.xml +++ b/classic/dispatcher/pom.xml @@ -22,7 +22,7 @@ <parent> <groupId>com.adobe.aem.guides</groupId> <artifactId>aem-cif-guides-venia</artifactId> - <version>2022.09.03-SNAPSHOT</version> + <version>2022.09.31-SNAPSHOT</version> <relativePath>../../pom.xml</relativePath> </parent> diff --git a/classic/ui.config/pom.xml b/classic/ui.config/pom.xml index 21f355b6..178edb55 100644 --- a/classic/ui.config/pom.xml +++ b/classic/ui.config/pom.xml @@ -23,7 +23,7 @@ <parent> <groupId>com.adobe.aem.guides</groupId> <artifactId>aem-cif-guides-venia</artifactId> - <version>2022.09.03-SNAPSHOT</version> + <version>2022.09.31-SNAPSHOT</version> <relativePath>../../pom.xml</relativePath> </parent> diff --git a/classic/ui.content/pom.xml b/classic/ui.content/pom.xml index 4118d604..7af78927 100644 --- a/classic/ui.content/pom.xml +++ b/classic/ui.content/pom.xml @@ -23,7 +23,7 @@ <parent> <groupId>com.adobe.aem.guides</groupId> <artifactId>aem-cif-guides-venia</artifactId> - <version>2022.09.03-SNAPSHOT</version> + <version>2022.09.31-SNAPSHOT</version> <relativePath>../../pom.xml</relativePath> </parent> diff --git a/core/pom.xml b/core/pom.xml index 770bc004..cb98dfdc 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -19,7 +19,7 @@ <parent> <groupId>com.adobe.aem.guides</groupId> <artifactId>aem-cif-guides-venia</artifactId> - <version>2022.09.03-SNAPSHOT</version> + <version>2022.09.31-SNAPSHOT</version> <relativePath>../pom.xml</relativePath> </parent> <artifactId>aem-cif-guides-venia.core</artifactId> diff --git a/dispatcher/pom.xml b/dispatcher/pom.xml index 1b39eee0..ae0a2618 100644 --- a/dispatcher/pom.xml +++ b/dispatcher/pom.xml @@ -7,7 +7,7 @@ <parent> <groupId>com.adobe.aem.guides</groupId> <artifactId>aem-cif-guides-venia</artifactId> - <version>2022.09.03-SNAPSHOT</version> + <version>2022.09.31-SNAPSHOT</version> <relativePath>../pom.xml</relativePath> </parent> diff --git a/it.tests/pom.xml b/it.tests/pom.xml index 0f2a3ca7..846cb7df 100644 --- a/it.tests/pom.xml +++ b/it.tests/pom.xml @@ -20,7 +20,7 @@ <parent> <groupId>com.adobe.aem.guides</groupId> <artifactId>aem-cif-guides-venia</artifactId> - <version>2022.09.03-SNAPSHOT</version> + <version>2022.09.31-SNAPSHOT</version> <relativePath>../pom.xml</relativePath> </parent> diff --git a/pom.xml b/pom.xml index 0259b5dc..66f8a74a 100644 --- a/pom.xml +++ b/pom.xml @@ -19,7 +19,7 @@ <groupId>com.adobe.aem.guides</groupId> <artifactId>aem-cif-guides-venia</artifactId> <packaging>pom</packaging> - <version>2022.09.03-SNAPSHOT</version> + <version>2022.09.31-SNAPSHOT</version> <name>Venia CIF Project - Reactor Project</name> <description>Venia CIF Project</description> <url>https://github.com/adobe/aem-cif-guides-venia</url> diff --git a/ui.apps.structure/pom.xml b/ui.apps.structure/pom.xml index bce9236a..af2018ae 100644 --- a/ui.apps.structure/pom.xml +++ b/ui.apps.structure/pom.xml @@ -8,7 +8,7 @@ <parent> <groupId>com.adobe.aem.guides</groupId> <artifactId>aem-cif-guides-venia</artifactId> - <version>2022.09.03-SNAPSHOT</version> + <version>2022.09.31-SNAPSHOT</version> <relativePath>../pom.xml</relativePath> </parent> diff --git a/ui.apps/pom.xml b/ui.apps/pom.xml index 0f8d8f4e..e4b4adc6 100644 --- a/ui.apps/pom.xml +++ b/ui.apps/pom.xml @@ -23,7 +23,7 @@ <parent> <groupId>com.adobe.aem.guides</groupId> <artifactId>aem-cif-guides-venia</artifactId> - <version>2022.09.03-SNAPSHOT</version> + <version>2022.09.31-SNAPSHOT</version> <relativePath>../pom.xml</relativePath> </parent> diff --git a/ui.config/pom.xml b/ui.config/pom.xml index c67f6128..8d0f2521 100644 --- a/ui.config/pom.xml +++ b/ui.config/pom.xml @@ -23,7 +23,7 @@ <parent> <groupId>com.adobe.aem.guides</groupId> <artifactId>aem-cif-guides-venia</artifactId> - <version>2022.09.03-SNAPSHOT</version> + <version>2022.09.31-SNAPSHOT</version> <relativePath>../pom.xml</relativePath> </parent> diff --git a/ui.content/pom.xml b/ui.content/pom.xml index dbfb9fa5..264bc726 100644 --- a/ui.content/pom.xml +++ b/ui.content/pom.xml @@ -23,7 +23,7 @@ <parent> <groupId>com.adobe.aem.guides</groupId> <artifactId>aem-cif-guides-venia</artifactId> - <version>2022.09.03-SNAPSHOT</version> + <version>2022.09.31-SNAPSHOT</version> <relativePath>../pom.xml</relativePath> </parent> diff --git a/ui.frontend/pom.xml b/ui.frontend/pom.xml index c520de11..9a2adace 100644 --- a/ui.frontend/pom.xml +++ b/ui.frontend/pom.xml @@ -23,7 +23,7 @@ <parent> <groupId>com.adobe.aem.guides</groupId> <artifactId>aem-cif-guides-venia</artifactId> - <version>2022.09.03-SNAPSHOT</version> + <version>2022.09.31-SNAPSHOT</version> <relativePath>../pom.xml</relativePath> </parent> diff --git a/ui.tests/pom.xml b/ui.tests/pom.xml index 38aab66f..bcc9b7dc 100644 --- a/ui.tests/pom.xml +++ b/ui.tests/pom.xml @@ -24,7 +24,7 @@ <parent> <groupId>com.adobe.aem.guides</groupId> <artifactId>aem-cif-guides-venia</artifactId> - <version>2022.09.03-SNAPSHOT</version> + <version>2022.09.31-SNAPSHOT</version> <relativePath>../pom.xml</relativePath> </parent> From 67ae4176fcae90470b322a8f37f34d9ca15171e6 Mon Sep 17 00:00:00 2001 From: Dirk Rudolph <drudolph@adobe.com> Date: Fri, 30 Sep 2022 13:27:56 +0200 Subject: [PATCH 07/16] releng: set next core cif components snapshot version --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 66f8a74a..417385be 100644 --- a/pom.xml +++ b/pom.xml @@ -87,7 +87,7 @@ <vault.user>admin</vault.user> <vault.password>admin</vault.password> <core.wcm.components.version>2.18.6</core.wcm.components.version> - <core.cif.components.version>2.12.0</core.cif.components.version> + <core.cif.components.version>2.12.1-SNAPSHOT</core.cif.components.version> <graphql.client.version>1.7.10</graphql.client.version> <magento.graphql.version>9.1.0-magento242ee</magento.graphql.version> <bnd.version>5.1.2</bnd.version> From 75e377073af8c8983754daa572fc249763d7638d Mon Sep 17 00:00:00 2001 From: Dirk Rudolph <drudolph@adobe.com> Date: Mon, 12 Dec 2022 13:12:23 +0100 Subject: [PATCH 08/16] CIF-1938: add ui tests for catalog page status bar (#264) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * add ui tests for catalog page status bar * skip test that requires the addon release for now * enabled UI test disabled earlier * fix tests * fix tests * fix: enable the test for actions only for cloud * fix: update to latest CS release Co-authored-by: Levente Sántha <levente@adobe.com> --- .circleci/ci/it-tests.js | 2 +- .circleci/config.yml | 2 +- ui.tests/pom.xml | 3 + ui.tests/test-module/specs/venia/statusbar.js | 88 +++++++++++++++++++ 4 files changed, 93 insertions(+), 2 deletions(-) create mode 100644 ui.tests/test-module/specs/venia/statusbar.js diff --git a/.circleci/ci/it-tests.js b/.circleci/ci/it-tests.js index edfa336f..e0ae5e2e 100644 --- a/.circleci/ci/it-tests.js +++ b/.circleci/ci/it-tests.js @@ -117,7 +117,7 @@ try { chromedriver = chromedriver.length >= 2 ? chromedriver[1] : ''; ci.dir('ui.tests', () => { - ci.sh(`CHROMEDRIVER=${chromedriver} mvn test -U -B -Pui-tests-local-execution -DHEADLESS_BROWSER=true -DSELENIUM-BROWSER=${BROWSER} -DVENIA_ACCOUNT_EMAIL=${VENIA_ACCOUNT_EMAIL} -DVENIA_ACCOUNT_PASSWORD=${VENIA_ACCOUNT_PASSWORD}`); + ci.sh(`CHROMEDRIVER=${chromedriver} mvn test -U -B -Pui-tests-local-execution -DAEM_VERSION=${classifier} -DHEADLESS_BROWSER=true -DSELENIUM-BROWSER=${BROWSER} -DVENIA_ACCOUNT_EMAIL=${VENIA_ACCOUNT_EMAIL} -DVENIA_ACCOUNT_PASSWORD=${VENIA_ACCOUNT_PASSWORD}`); }); } diff --git a/.circleci/config.yml b/.circleci/config.yml index 23fb2973..9d511234 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -64,7 +64,7 @@ executors: docker: - image: docker-adobe-cif-release.dr-uw2.adobeitc.com/circleci-qp:6.4.6-openjdk11 <<: *docker_auth - - image: docker-adobe-cif-release.dr-uw2.adobeitc.com/circleci-aem-cloudready:6582-openjdk11 + - image: docker-adobe-cif-release.dr-uw2.adobeitc.com/circleci-aem-cloudready:9398-openjdk11 <<: *docker_auth test_executor_655: docker: diff --git a/ui.tests/pom.xml b/ui.tests/pom.xml index bcc9b7dc..c3b6609f 100644 --- a/ui.tests/pom.xml +++ b/ui.tests/pom.xml @@ -43,6 +43,7 @@ <AEM_PUBLISH_URL /> <AEM_PUBLISH_USERNAME>admin</AEM_PUBLISH_USERNAME> <AEM_PUBLISH_PASSWORD>admin</AEM_PUBLISH_PASSWORD> + <AEM_VERSION>cloud</AEM_VERSION> <SELENIUM_BROWSER>chrome</SELENIUM_BROWSER> <VENIA_ACCOUNT_EMAIL /> <VENIA_ACCOUNT_PASSWORD /> @@ -151,6 +152,7 @@ <AEM_PUBLISH_URL>${AEM_PUBLISH_URL}</AEM_PUBLISH_URL> <AEM_PUBLISH_USERNAME>${AEM_PUBLISH_USERNAME}</AEM_PUBLISH_USERNAME> <AEM_PUBLISH_PASSWORD>${AEM_PUBLISH_PASSWORD}</AEM_PUBLISH_PASSWORD> + <AEM_VERSION>${AEM_VERSION}</AEM_VERSION> <VENIA_ACCOUNT_EMAIL>${VENIA_ACCOUNT_EMAIL}</VENIA_ACCOUNT_EMAIL> <VENIA_ACCOUNT_PASSWORD>${VENIA_ACCOUNT_PASSWORD}</VENIA_ACCOUNT_PASSWORD> <SELENIUM_BROWSER>${SELENIUM_BROWSER}</SELENIUM_BROWSER> @@ -241,6 +243,7 @@ <AEM_PUBLISH_URL>${AEM_PUBLISH_URL}</AEM_PUBLISH_URL> <AEM_PUBLISH_USERNAME>${AEM_PUBLISH_USERNAME}</AEM_PUBLISH_USERNAME> <AEM_PUBLISH_PASSWORD>${AEM_PUBLISH_PASSWORD}</AEM_PUBLISH_PASSWORD> + <AEM_VERSION>${AEM_VERSION}</AEM_VERSION> <VENIA_ACCOUNT_EMAIL>${VENIA_ACCOUNT_EMAIL}</VENIA_ACCOUNT_EMAIL> <VENIA_ACCOUNT_PASSWORD>${VENIA_ACCOUNT_PASSWORD}</VENIA_ACCOUNT_PASSWORD> <SELENIUM_BROWSER>${SELENIUM_BROWSER}</SELENIUM_BROWSER> diff --git a/ui.tests/test-module/specs/venia/statusbar.js b/ui.tests/test-module/specs/venia/statusbar.js new file mode 100644 index 00000000..bbb5ad06 --- /dev/null +++ b/ui.tests/test-module/specs/venia/statusbar.js @@ -0,0 +1,88 @@ +/* + * Copyright 2021 Adobe Systems Incorporated + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +const config = require('../../lib/config'); +const { OnboardingDialogHandler } = require('../../lib/commons'); +const isCloud = process.env.AEM_VERSION !== 'classic'; + +describe('Catalog Page Status', function () { + const editor_page = `${config.aem.author.base_url}/editor.html`; + const product_page = '/content/venia/us/en/products/product-page'; + const specific_page_no_suffix = '/content/venia/us/en/products/category-page/shop-the-look'; + const specific_page_with_suffix = '/content/venia/us/en/products/category-page/shop-the-look.html/shop-the-look'; + + let onboardingHdler; + + this.retries(2); + + before(() => { + // Set window size to desktop + browser.setWindowSize(1280, 960); + + // AEM Login + browser.AEMForceLogout(); + browser.url(config.aem.author.base_url); + browser.AEMLogin(config.aem.author.username, config.aem.author.password); + + // Enable helper to handle onboarding dialog popup + onboardingHdler = new OnboardingDialogHandler(browser); + onboardingHdler.enable(); + }); + + after(function () { + // Disable helper to handle onboarding dialog popup + onboardingHdler.disable(); + }); + + it('is shown on template pages', () => { + browser.url(`${editor_page}${product_page}.html`); + browser.AEMEditorLoaded(); + + expect($('coral-alert-header=Venia Demo Store - Product page')).toBeDisplayed(); + + if (isCloud) { + // actions are not available on 6.5 in general + expect($('a[data-status-action-id="open-template-page"]')).not.toBeDisplayed(); + } + }); + + it('is shown on specific pages', () => { + browser.url(`${editor_page}${specific_page_no_suffix}.html`); + browser.AEMEditorLoaded(); + + expect($('coral-alert-header=Shop the look')).toBeDisplayed(); + + if (isCloud) { + // actions are not available on 6.5 in general + expect($('a[data-status-action-id="open-template-page"]')).not.toBeDisplayed(); + } + }); + + if (isCloud) { + // due to an issue in the editors getPageInfoLocation function, the status bar is not shown + // on classic at all with a suffix. This is a known issue, fixed for CS but not yet back + // ported to 6.5 + it('is shown on specific pages with suffix', () => { + browser.url(`${editor_page}${specific_page_with_suffix}.html`); + browser.AEMEditorLoaded(); + + expect($('coral-alert-header=Shop the look')).toBeDisplayed(); + + const openTemplatePageButton = $('a[data-status-action-id="open-template-page"]'); + expect(openTemplatePageButton).toBeClickable(); + }); + } +}); From 672317f5a8b1f1269965b132cd6edba3c97d0671 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Levente=20S=C3=A1ntha?= <levente@adobe.com> Date: Wed, 8 Nov 2023 17:01:38 +0200 Subject: [PATCH 09/16] SITES-16602 - Remove sort by position option in the Search Results Component (#321) * SITES-16602 - Remove sort by position option in the Search Results Component * added custom SearchResults model implementation to illustrate the customization of sort fields * added unit test * updated dependency on CIF components * fixing test failures --------- Co-authored-by: levente <levente@qadobe.com> --- .circleci/config.yml | 3 +- core/pom.xml | 14 ++ .../models/commerce/MySearchResultsImpl.java | 147 ++++++++++++++++++ .../commerce/MySearchResultsImplTest.java | 95 +++++++++++ pom.xml | 2 +- .../specs/venia/productcollection.js | 12 +- 6 files changed, 265 insertions(+), 8 deletions(-) create mode 100644 core/src/main/java/com/venia/core/models/commerce/MySearchResultsImpl.java create mode 100644 core/src/test/java/com/venia/core/models/commerce/MySearchResultsImplTest.java diff --git a/.circleci/config.yml b/.circleci/config.yml index 9d511234..65fd9cb8 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -8,7 +8,8 @@ common: integration_test_steps: &integration_test_steps steps: - checkout - - browser-tools/install-browser-tools + - browser-tools/install-browser-tools: + chrome-version: 114.0.5735.90 # TODO: remove -> https://github.com/CircleCI-Public/browser-tools-orb/issues/75 - restore_cache: keys: - maven-repo-{{ .Environment.CACHE_VERSION }}-its-{{ arch }}-{{ .Branch }}-{{ checksum "pom.xml" }} diff --git a/core/pom.xml b/core/pom.xml index cb98dfdc..c1574371 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -180,6 +180,20 @@ Import-Package: javax.annotation;version=0.0.0,* <scope>provided</scope> </dependency> + <dependency> + <groupId>com.fasterxml.jackson.core</groupId> + <artifactId>jackson-core</artifactId> + <version>2.12.4</version> + <scope>provided</scope> + </dependency> + + <dependency> + <groupId>com.fasterxml.jackson.core</groupId> + <artifactId>jackson-databind</artifactId> + <version>2.12.7.1</version> + <scope>provided</scope> + </dependency> + <dependency> <groupId>org.junit.jupiter</groupId> <artifactId>junit-jupiter</artifactId> diff --git a/core/src/main/java/com/venia/core/models/commerce/MySearchResultsImpl.java b/core/src/main/java/com/venia/core/models/commerce/MySearchResultsImpl.java new file mode 100644 index 00000000..85f87f7e --- /dev/null +++ b/core/src/main/java/com/venia/core/models/commerce/MySearchResultsImpl.java @@ -0,0 +1,147 @@ +/******************************************************************************* + * + * Copyright 2023 Adobe. All rights reserved. + * This file is licensed to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. You may obtain a copy + * of the License at http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under + * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS + * OF ANY KIND, either express or implied. See the License for the specific language + * governing permissions and limitations under the License. + * + ******************************************************************************/ +package com.venia.core.models.commerce; + +import com.adobe.cq.commerce.core.components.models.common.ProductListItem; +import com.adobe.cq.commerce.core.components.models.searchresults.SearchResults; +import com.adobe.cq.commerce.core.components.storefrontcontext.SearchResultsStorefrontContext; +import com.adobe.cq.commerce.core.components.storefrontcontext.SearchStorefrontContext; +import com.adobe.cq.commerce.core.search.models.SearchResultsSet; +import com.adobe.cq.commerce.core.search.models.SorterKey; +import com.adobe.cq.commerce.magento.graphql.ProductAttributeFilterInput; +import com.adobe.cq.commerce.magento.graphql.ProductInterfaceQuery; +import com.adobe.cq.wcm.core.components.models.Component; +import com.adobe.cq.wcm.core.components.models.datalayer.ComponentData; +import com.fasterxml.jackson.databind.ObjectMapper; +import org.apache.sling.api.SlingHttpServletRequest; +import org.apache.sling.models.annotations.Model; +import org.apache.sling.models.annotations.Via; +import org.apache.sling.models.annotations.injectorspecific.Self; +import org.apache.sling.models.annotations.via.ResourceSuperType; + +import javax.annotation.PostConstruct; +import java.lang.reflect.Proxy; +import java.util.Collection; +import java.util.List; +import java.util.concurrent.atomic.AtomicReference; +import java.util.function.Consumer; +import java.util.function.Function; + +/** + * This class shows how to customize the sort fields of the product search results. + * As am example we remove the support for sorting by position. + * See the initModel() method for details. + */ +@Model(adaptables = SlingHttpServletRequest.class, adapters = SearchResults.class, resourceType = MySearchResultsImpl.RESOURCE_TYPE) +public class MySearchResultsImpl implements SearchResults , Component { + protected static final String RESOURCE_TYPE = "venia/components/commerce/searchresults"; + @Self + @Via(type = ResourceSuperType.class) + SearchResults searchResults; + + public MySearchResultsImpl() { + System.out.println("TEST"); + } + + @PostConstruct + public void initModel() { + // remove sort key with the name "position" + List<SorterKey> keys = searchResults.getSearchResultsSet().getSorter().getKeys(); + if (keys != null) { + keys.removeIf(sorterKey -> sorterKey.getName().equals("position")); + } + } + + @Override + public SearchStorefrontContext getSearchStorefrontContext() { + return searchResults.getSearchStorefrontContext(); + } + + @Override + public SearchResultsStorefrontContext getSearchResultsStorefrontContext() { + return searchResults.getSearchResultsStorefrontContext(); + } + + @Override + public void extendProductQueryWith(Consumer<ProductInterfaceQuery> consumer) { + searchResults.extendProductQueryWith(consumer); + } + + @Override + public void extendProductFilterWith(Function<ProductAttributeFilterInput, ProductAttributeFilterInput> function) { + searchResults.extendProductFilterWith(function); + } + + @Override + public Collection<ProductListItem> getProducts() { + return searchResults.getProducts(); + } + + @Override + public SearchResultsSet getSearchResultsSet() { + return searchResults.getSearchResultsSet(); + } + + @Override + public boolean loadClientPrice() { + return searchResults.loadClientPrice(); + } + + @Override + public String getPaginationType() { + return searchResults.getPaginationType(); + } + + @Override + public boolean isAddToCartEnabled() { + return searchResults.isAddToCartEnabled(); + } + + @Override + public boolean isAddToWishListEnabled() { + return searchResults.isAddToWishListEnabled(); + } + + @Override + public String getId() { + return ((Component)searchResults).getId(); + } + + @Override + public ComponentData getData() { + final ComponentData data = ((Component) searchResults).getData(); + final AtomicReference<ComponentData> dataRef = new AtomicReference<>(); + ComponentData componentData = (ComponentData) Proxy.newProxyInstance(this.getClass().getClassLoader(), + new Class[]{ComponentData.class}, (proxy, method, args) -> { + if (method.getName().equals("getJson")) { + return String.format("{\"%s\":%s}", getId(), new ObjectMapper().writeValueAsString(dataRef.get())); + } else if (method.getName().equals("getType")) { + return getExportedType(); + } + return method.invoke(data, args); + }); + dataRef.set(componentData); + return componentData; + } + + @Override + public String getAppliedCssClasses() { + return ((Component)searchResults).getAppliedCssClasses(); + } + + @Override + public String getExportedType() { + return "venia/components/commerce/searchresults"; + } +} diff --git a/core/src/test/java/com/venia/core/models/commerce/MySearchResultsImplTest.java b/core/src/test/java/com/venia/core/models/commerce/MySearchResultsImplTest.java new file mode 100644 index 00000000..91c755ab --- /dev/null +++ b/core/src/test/java/com/venia/core/models/commerce/MySearchResultsImplTest.java @@ -0,0 +1,95 @@ +/******************************************************************************* + * + * Copyright 2023 Adobe. All rights reserved. + * This file is licensed to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. You may obtain a copy + * of the License at http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under + * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS + * OF ANY KIND, either express or implied. See the License for the specific language + * governing permissions and limitations under the License. + * + ******************************************************************************/ +package com.venia.core.models.commerce; + +import com.adobe.cq.commerce.core.components.models.searchresults.SearchResults; +import com.adobe.cq.commerce.core.components.services.urls.UrlProvider; +import com.adobe.cq.commerce.core.search.models.SearchResultsSet; +import com.adobe.cq.commerce.core.search.models.Sorter; +import com.adobe.cq.commerce.core.search.models.SorterKey; +import com.adobe.cq.commerce.core.search.services.SearchResultsService; +import com.adobe.cq.commerce.magento.graphql.ProductAttributeFilterInput; +import com.day.cq.wcm.api.Page; +import io.wcm.testing.mock.aem.junit5.AemContext; +import io.wcm.testing.mock.aem.junit5.AemContextExtension; +import org.apache.sling.testing.mock.sling.ResourceResolverType; +import org.apache.sling.testing.mock.sling.servlet.MockSlingHttpServletRequest; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.mockito.MockitoAnnotations; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.function.Function; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.when; + +@ExtendWith(AemContextExtension.class) +public class MySearchResultsImplTest { + private static final String PAGE = "/content/page"; + private final AemContext context = new AemContext(ResourceResolverType.JCR_MOCK); + + private SearchResults underTest; + + @BeforeEach + void beforeEach() { + MockitoAnnotations.initMocks(this); + Page page = context.create().page(PAGE); + Map<String, Object> props = new HashMap<>(); + props.put("sling:resourceType", "venia/components/commerce/searchresults"); + props.put("sling:resourceSuperType", "core/cif/components/commerce/searchresults/v1/searchresults"); + context.create().resource(page, "test", props); + context.currentResource(PAGE + "/jcr:content/test"); + + SearchResultsService searchResultsService = mock(SearchResultsService.class); + SearchResultsSet searchResultsSet = mock(SearchResultsSet.class); + Function<ProductAttributeFilterInput, ProductAttributeFilterInput> a = any(); + when(searchResultsService.performSearch(any(), any(), any(), any(), any(), a)).thenReturn(searchResultsSet); + Sorter sorter = mock(Sorter.class); + when(searchResultsSet.getSorter()).thenReturn(sorter); + SorterKey k1 = mock(SorterKey.class); + when(k1.getName()).thenReturn("k1"); + SorterKey k2 = mock(SorterKey.class); + when(k2.getName()).thenReturn("k2"); + SorterKey k3 = mock(SorterKey.class); + when(k3.getName()).thenReturn("position"); + when(sorter.getKeys()).thenReturn(new ArrayList<>(Arrays.asList(k1, k2, k3))); + + context.registerService(SearchResultsService.class, searchResultsService); + context.registerService(UrlProvider.class, mock(UrlProvider.class)); + context.addModelsForClasses(MySearchResultsImpl.class); + + MockSlingHttpServletRequest request = context.request(); + request.addRequestParameter("search_query", "test"); + + underTest = request.adaptTo(MySearchResultsImpl.class); + Assertions.assertNotNull(underTest); + } + + @Test + void testSorterKeys() { + List<SorterKey> keys = underTest.getSearchResultsSet().getSorter().getKeys(); + assertFalse(keys.stream().anyMatch(sorterKey -> sorterKey.getName().equals("position"))); + assertEquals(2, keys.size()); + } +} diff --git a/pom.xml b/pom.xml index 417385be..06d494af 100644 --- a/pom.xml +++ b/pom.xml @@ -87,7 +87,7 @@ <vault.user>admin</vault.user> <vault.password>admin</vault.password> <core.wcm.components.version>2.18.6</core.wcm.components.version> - <core.cif.components.version>2.12.1-SNAPSHOT</core.cif.components.version> + <core.cif.components.version>2.12.2</core.cif.components.version> <graphql.client.version>1.7.10</graphql.client.version> <magento.graphql.version>9.1.0-magento242ee</magento.graphql.version> <bnd.version>5.1.2</bnd.version> diff --git a/ui.tests/test-module/specs/venia/productcollection.js b/ui.tests/test-module/specs/venia/productcollection.js index 89e95de1..6bee7767 100644 --- a/ui.tests/test-module/specs/venia/productcollection.js +++ b/ui.tests/test-module/specs/venia/productcollection.js @@ -43,10 +43,10 @@ describe('Product Collection Component', function () { // perform a search browser.url(`${config.aem.author.base_url}/content/venia/us/en/search.html?search_query=dress`); - const categoryFilterList = 'label[for="category_id"] ~ .productcollection__filter-items'; + const categoryFilterList = 'label[for="category_uid"] ~ .productcollection__filter-items'; // check category filter is closed - const categoryFilter = $('label[for="category_id"]'); + const categoryFilter = $('label[for="category_uid"]'); expect(categoryFilter).toBeDisplayed(); expect($(categoryFilterList)).not.toBeDisplayed(); @@ -59,14 +59,14 @@ describe('Product Collection Component', function () { expect($(categoryFilterList)).not.toBeDisplayed(); }); - it('Displays category filters', () => { + it.skip('Displays category filters', () => { // Accessories should have three category filters browser.url( `${config.aem.author.base_url}/content/venia/us/en/products/category-page.html/venia-accessories.html` ); - expect($('label[for="category_id"]')).toBeDisplayed(); + expect($('label[for="category_uid"]')).toBeDisplayed(); const categoryFilterItems = $$( - 'label[for="category_id"] ~ .productcollection__filter-items .productcollection__filter-item' + 'label[for="category_uid"] ~ .productcollection__filter-items .productcollection__filter-item' ); expect(categoryFilterItems.length).toBe(3); @@ -74,6 +74,6 @@ describe('Product Collection Component', function () { browser.url( `${config.aem.author.base_url}/content/venia/us/en/products/category-page.html/venia-accessories/venia-jewelry.html` ); - expect($('label[for="category_id"]')).not.toBeDisplayed(); + expect($('label[for="category_uid"]')).not.toBeDisplayed(); }); }); From b8580437f8e02994b3ba36f2f29209678cf7646b Mon Sep 17 00:00:00 2001 From: levente <levente@qadobe.com> Date: Wed, 8 Nov 2023 17:56:24 +0200 Subject: [PATCH 10/16] @releng - update AEM docker images --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 65fd9cb8..61072945 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -65,13 +65,13 @@ executors: docker: - image: docker-adobe-cif-release.dr-uw2.adobeitc.com/circleci-qp:6.4.6-openjdk11 <<: *docker_auth - - image: docker-adobe-cif-release.dr-uw2.adobeitc.com/circleci-aem-cloudready:9398-openjdk11 + - image: docker-adobe-cif-release.dr-uw2.adobeitc.com/circleci-aem-cloudready:13804-openjdk11` <<: *docker_auth test_executor_655: docker: - image: docker-adobe-cif-release.dr-uw2.adobeitc.com/circleci-qp:6.4.6-openjdk11 <<: *docker_auth - - image: docker-adobe-cif-release.dr-uw2.adobeitc.com/circleci-aem:6.5.11-openjdk11 + - image: docker-adobe-cif-release.dr-uw2.adobeitc.com/circleci-aem:6.5.18.0-openjdk11 <<: *docker_auth jobs: From f72dcfc001c0c9d5e7882ead8a1e4f124f4dbe54 Mon Sep 17 00:00:00 2001 From: levente <levente@qadobe.com> Date: Wed, 8 Nov 2023 18:33:18 +0200 Subject: [PATCH 11/16] @releng - update AEM docker images --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 61072945..c0a75fcc 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -65,7 +65,7 @@ executors: docker: - image: docker-adobe-cif-release.dr-uw2.adobeitc.com/circleci-qp:6.4.6-openjdk11 <<: *docker_auth - - image: docker-adobe-cif-release.dr-uw2.adobeitc.com/circleci-aem-cloudready:13804-openjdk11` + - image: docker-adobe-cif-release.dr-uw2.adobeitc.com/circleci-aem-cloudready:13804-openjdk11 <<: *docker_auth test_executor_655: docker: From 8d35017a52b6b176315309be5c82678d0f5cff5f Mon Sep 17 00:00:00 2001 From: levente <levente@qadobe.com> Date: Wed, 8 Nov 2023 19:34:40 +0200 Subject: [PATCH 12/16] @releng - update AEM docker images --- it.tests/src/main/resources/datalayer/grouped-product.json | 2 +- it.tests/src/main/resources/datalayer/simple-product.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/it.tests/src/main/resources/datalayer/grouped-product.json b/it.tests/src/main/resources/datalayer/grouped-product.json index 2ecaa222..0c3827a6 100644 --- a/it.tests/src/main/resources/datalayer/grouped-product.json +++ b/it.tests/src/main/resources/datalayer/grouped-product.json @@ -27,7 +27,7 @@ } ], "xdm:currencyCode": "USD", - "dc:description": "This trio is designed for versatility. Brighten up a simple look or add another layer of “wow” to an already vibrant ensemble. Go as big and bold, or understated as you're in the mood to be.", + "dc:description": "This trio is designed for versatility. Brighten up a simple look or add another layer of “wow” to an already vibrant ensemble. Go as big and bold, or understated as you're in the mood to be.", "dc:title": "Augusta Trio", "@type": "venia/components/commerce/product" } diff --git a/it.tests/src/main/resources/datalayer/simple-product.json b/it.tests/src/main/resources/datalayer/simple-product.json index f776e951..f7cd1ec6 100644 --- a/it.tests/src/main/resources/datalayer/simple-product.json +++ b/it.tests/src/main/resources/datalayer/simple-product.json @@ -55,7 +55,7 @@ } ], "xdm:currencyCode": "USD", - "dc:description": "<p>The Honora Wide Leg Pants definitely hold their own when it comes to standing out from the crowd. These pants feature a unique design and a varying color palette to make pairing a snap.</p><p>Features:</p><ul><li>Elastic waistband</li><li>Drawstring waist</li><li>Sits just below the waist</li><li>31" inseam</li><li>Machine wash, line dry</li></ul>", + "dc:description": "<p>The Honora Wide Leg Pants definitely hold their own when it comes to standing out from the crowd. These pants feature a unique design and a varying color palette to make pairing a snap.</p><p>Features:</p><ul><li>Elastic waistband</li><li>Drawstring waist</li><li>Sits just below the waist</li><li>31" inseam</li><li>Machine wash, line dry</li></ul>", "dc:title": "Honora Wide Leg Pants", "@type": "venia/components/commerce/product" } From ec875b348b7a2195642f7ebf7ee5bf63d67452f2 Mon Sep 17 00:00:00 2001 From: levente <levente@qadobe.com> Date: Wed, 8 Nov 2023 20:34:14 +0200 Subject: [PATCH 13/16] @releng - fixing test after AEM docker image update --- .circleci/ci/it-tests.js | 3 +- .../com/venia/it/category/IgnoreOn65.java | 16 +++++ .../com/venia/it/category/IgnoreOnCloud.java | 16 +++++ .../com/venia/it/tests/ProductPageIT.java | 27 +++++++- .../datalayer/grouped-product-65.json | 34 ++++++++++ .../datalayer/simple-product-65.json | 62 +++++++++++++++++++ 6 files changed, 155 insertions(+), 3 deletions(-) create mode 100644 it.tests/src/main/java/com/venia/it/category/IgnoreOn65.java create mode 100644 it.tests/src/main/java/com/venia/it/category/IgnoreOnCloud.java create mode 100644 it.tests/src/main/resources/datalayer/grouped-product-65.json create mode 100644 it.tests/src/main/resources/datalayer/simple-product-65.json diff --git a/.circleci/ci/it-tests.js b/.circleci/ci/it-tests.js index e0ae5e2e..5d0a0c3d 100644 --- a/.circleci/ci/it-tests.js +++ b/.circleci/ci/it-tests.js @@ -106,8 +106,9 @@ try { // Run integration tests if (TYPE === 'integration') { + let excludedCategory = classifier === 'classic' ? 'com.venia.it.category.IgnoreOn65' : 'com.venia.it.category.IgnoreOnCloud'; ci.dir('it.tests', () => { - ci.sh(`mvn clean verify -U -B -Plocal`); // The -Plocal profile comes from the AEM archetype + ci.sh(`mvn clean verify -U -B -Plocal -Dexclude.category=${excludedCategory}`); // The -Plocal profile comes from the AEM archetype }); } if (TYPE === 'selenium') { diff --git a/it.tests/src/main/java/com/venia/it/category/IgnoreOn65.java b/it.tests/src/main/java/com/venia/it/category/IgnoreOn65.java new file mode 100644 index 00000000..d9b652f8 --- /dev/null +++ b/it.tests/src/main/java/com/venia/it/category/IgnoreOn65.java @@ -0,0 +1,16 @@ +/******************************************************************************* + * + * Copyright 2023 Adobe. All rights reserved. + * This file is licensed to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. You may obtain a copy + * of the License at http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under + * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS + * OF ANY KIND, either express or implied. See the License for the specific language + * governing permissions and limitations under the License. + * + ******************************************************************************/ +package com.venia.it.category; + +public interface IgnoreOn65 {} diff --git a/it.tests/src/main/java/com/venia/it/category/IgnoreOnCloud.java b/it.tests/src/main/java/com/venia/it/category/IgnoreOnCloud.java new file mode 100644 index 00000000..edf88990 --- /dev/null +++ b/it.tests/src/main/java/com/venia/it/category/IgnoreOnCloud.java @@ -0,0 +1,16 @@ +/******************************************************************************* + * + * Copyright 2023 Adobe. All rights reserved. + * This file is licensed to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. You may obtain a copy + * of the License at http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under + * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS + * OF ANY KIND, either express or implied. See the License for the specific language + * governing permissions and limitations under the License. + * + ******************************************************************************/ +package com.venia.it.category; + +public interface IgnoreOnCloud {} diff --git a/it.tests/src/main/java/com/venia/it/tests/ProductPageIT.java b/it.tests/src/main/java/com/venia/it/tests/ProductPageIT.java index 86f535ad..c684de88 100644 --- a/it.tests/src/main/java/com/venia/it/tests/ProductPageIT.java +++ b/it.tests/src/main/java/com/venia/it/tests/ProductPageIT.java @@ -18,6 +18,8 @@ import java.util.Collections; import java.util.List; +import com.venia.it.category.IgnoreOn65; +import com.venia.it.category.IgnoreOnCloud; import org.apache.commons.lang3.StringUtils; import org.apache.http.NameValuePair; import org.apache.http.message.BasicNameValuePair; @@ -30,6 +32,7 @@ import com.fasterxml.jackson.databind.JsonNode; import com.venia.it.utils.Utils; +import org.junit.experimental.categories.Category; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; @@ -43,6 +46,15 @@ public class ProductPageIT extends CommerceTestBase { @Test public void testProductPageWithSampleData() throws ClientException, IOException { + testProductPageWithSampleData("datalayer/simple-product.json"); + } + + @Test + public void testProductPageWithSampleData65() throws ClientException, IOException { + testProductPageWithSampleData("datalayer/simple-product-65.json"); + } + + public void testProductPageWithSampleData(String jsonFile) throws ClientException, IOException { String pagePath = VENIA_CONTENT_US_EN_PRODUCTS_PRODUCT_PAGE + ".html/honora-wide-leg-pants.html"; SlingHttpResponse response = adminAuthor.doGet(pagePath, 200); Document doc = Jsoup.parse(response.getContent()); @@ -71,12 +83,23 @@ public void testProductPageWithSampleData() throws ClientException, IOException // Verify dataLayer attributes elements = doc.select(PRODUCT_DETAILS_SELECTOR); JsonNode result = Utils.OBJECT_MAPPER.readTree(elements.first().attr("data-cmp-data-layer")); - JsonNode expected = Utils.OBJECT_MAPPER.readTree(Utils.getResource("datalayer/simple-product.json")); + JsonNode expected = Utils.OBJECT_MAPPER.readTree(Utils.getResource(jsonFile)); assertEquals(expected, result); } @Test + @Category({ IgnoreOn65.class }) public void testProductPageWithSampleDataForGroupedProduct() throws ClientException, IOException { + testProductPageWithSampleDataForGroupedProduct("datalayer/grouped-product.json"); + } + + @Test + @Category({ IgnoreOnCloud.class }) + public void testProductPageWithSampleDataForGroupedProduct65() throws ClientException, IOException { + testProductPageWithSampleDataForGroupedProduct("datalayer/grouped-product-65.json"); + } + + public void testProductPageWithSampleDataForGroupedProduct(String jsonFile) throws ClientException, IOException { SlingHttpResponse response = adminAuthor.doGet(VENIA_CONTENT_US_EN_PRODUCTS_PRODUCT_PAGE + ".html/augusta-trio.html", 200); Document doc = Jsoup.parse(response.getContent()); @@ -90,7 +113,7 @@ public void testProductPageWithSampleDataForGroupedProduct() throws ClientExcept // Verify dataLayer attributes elements = doc.select(PRODUCT_DETAILS_SELECTOR); JsonNode result = Utils.OBJECT_MAPPER.readTree(elements.first().attr("data-cmp-data-layer")); - JsonNode expected = Utils.OBJECT_MAPPER.readTree(Utils.getResource("datalayer/grouped-product.json")); + JsonNode expected = Utils.OBJECT_MAPPER.readTree(Utils.getResource(jsonFile)); assertEquals(expected, result); } diff --git a/it.tests/src/main/resources/datalayer/grouped-product-65.json b/it.tests/src/main/resources/datalayer/grouped-product-65.json new file mode 100644 index 00000000..2ecaa222 --- /dev/null +++ b/it.tests/src/main/resources/datalayer/grouped-product-65.json @@ -0,0 +1,34 @@ +{ + "product-3c02043652": { + "xdm:listPrice": 78.0, + "xdm:SKU": "VA23", + "xdm:assets": [ + { + + "repo:path": "https://mystage1-amspro120.amscommerce.cloud/media/catalog/product/cache/8735dd21982cf027014173d1affcf80c/v/a/va23_main.jpg", + "repo:id": "image-3d3553c5dc", + "@type": "image" + } + ], + "xdm:categories": [ + { + "repo:id": "category-8c01c593b9", + "xdm:name": "Accessories", + "xdm:asset": { + "repo:path": "https://mystage1-amspro120.amscommerce.cloud/media/catalog/category/carefree.jpg", + "repo:id": "image-6310f9e8a5", + "@type": "image" + } + }, + { + "repo:id": "category-f5a5c5aea0", + "xdm:name": "Jewelry", + "xdm:asset": null + } + ], + "xdm:currencyCode": "USD", + "dc:description": "This trio is designed for versatility. Brighten up a simple look or add another layer of “wow” to an already vibrant ensemble. Go as big and bold, or understated as you're in the mood to be.", + "dc:title": "Augusta Trio", + "@type": "venia/components/commerce/product" + } +} \ No newline at end of file diff --git a/it.tests/src/main/resources/datalayer/simple-product-65.json b/it.tests/src/main/resources/datalayer/simple-product-65.json new file mode 100644 index 00000000..f776e951 --- /dev/null +++ b/it.tests/src/main/resources/datalayer/simple-product-65.json @@ -0,0 +1,62 @@ +{ + "product-dc59ad50df": { + "xdm:listPrice": 78.0, + "xdm:SKU": "VP05", + "xdm:assets": [ + { + "repo:path": "https://mystage1-amspro120.amscommerce.cloud/media/catalog/product/cache/8735dd21982cf027014173d1affcf80c/v/p/vp05-rn_main_4.jpg", + "repo:id": "image-73439b9cf3", + "@type": "image" + }, + { + "repo:path": "https://mystage1-amspro120.amscommerce.cloud/media/catalog/product/cache/8735dd21982cf027014173d1affcf80c/v/p/vp05-rn_alt_2.jpg", + "repo:id": "image-2e75bb2439", + "@type": "image" + }, + { + "repo:path": "https://mystage1-amspro120.amscommerce.cloud/media/catalog/product/cache/8735dd21982cf027014173d1affcf80c/v/p/vp05-rn_back_2.jpg", + "repo:id": "image-40bcf141f9", + "@type": "image" + }, + { + "repo:path": "https://mystage1-amspro120.amscommerce.cloud/media/catalog/product/cache/8735dd21982cf027014173d1affcf80c/v/p/vp05_look_2.jpg", + "repo:id": "image-e049cce860", + "@type": "image" + } + ], + "xdm:categories": [ + { + "repo:id": "category-cf9d757f29", + "xdm:name": "Bottoms", + "xdm:asset": { + "repo:path": "https://mystage1-amspro120.amscommerce.cloud/media/catalog/category/minimalist.jpg", + "repo:id": "image-74c855fbf3", + "@type": "image" + } + }, + { + "repo:id": "category-6e60cf4797", + "xdm:name": "Pants & Shorts", + "xdm:asset": null + }, + { + "repo:id": "category-b8a3caa888", + "xdm:name": "Shop The Look", + "xdm:asset": { + "repo:path": "https://mystage1-amspro120.amscommerce.cloud/media/catalog/category/beachy.jpg", + "repo:id": "image-8a0806aaab", + "@type": "image" + } + }, + { + "repo:id": "category-df146c27a3", + "xdm:name": "Minimalist Sensibility", + "xdm:asset": null + } + ], + "xdm:currencyCode": "USD", + "dc:description": "<p>The Honora Wide Leg Pants definitely hold their own when it comes to standing out from the crowd. These pants feature a unique design and a varying color palette to make pairing a snap.</p><p>Features:</p><ul><li>Elastic waistband</li><li>Drawstring waist</li><li>Sits just below the waist</li><li>31" inseam</li><li>Machine wash, line dry</li></ul>", + "dc:title": "Honora Wide Leg Pants", + "@type": "venia/components/commerce/product" + } +} \ No newline at end of file From 8f3d0d3bbba704bbf61df12d580866c6ca5eebdb Mon Sep 17 00:00:00 2001 From: levente <levente@qadobe.com> Date: Wed, 8 Nov 2023 20:56:54 +0200 Subject: [PATCH 14/16] @releng - fixing test after AEM docker image update --- .circleci/ci/it-tests.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/ci/it-tests.js b/.circleci/ci/it-tests.js index 5d0a0c3d..dab953e9 100644 --- a/.circleci/ci/it-tests.js +++ b/.circleci/ci/it-tests.js @@ -106,7 +106,7 @@ try { // Run integration tests if (TYPE === 'integration') { - let excludedCategory = classifier === 'classic' ? 'com.venia.it.category.IgnoreOn65' : 'com.venia.it.category.IgnoreOnCloud'; + let excludedCategory = classifier === 'classic' ? 'com.venia.it.category.IgnoreOnCloud' : 'com.venia.it.category.IgnoreOn65'; ci.dir('it.tests', () => { ci.sh(`mvn clean verify -U -B -Plocal -Dexclude.category=${excludedCategory}`); // The -Plocal profile comes from the AEM archetype }); From 1f328d3692c3092bccd58e7dedf5d351a7d3d518 Mon Sep 17 00:00:00 2001 From: levente <levente@qadobe.com> Date: Wed, 8 Nov 2023 21:29:38 +0200 Subject: [PATCH 15/16] @releng - fixing test after AEM docker image update --- it.tests/pom.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/it.tests/pom.xml b/it.tests/pom.xml index 846cb7df..6d694562 100644 --- a/it.tests/pom.xml +++ b/it.tests/pom.xml @@ -32,6 +32,7 @@ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <maven.compiler.source>1.8</maven.compiler.source> <maven.compiler.target>1.8</maven.compiler.target> + <exclude.category></exclude.category> </properties> @@ -150,6 +151,7 @@ <sling.it.instance.adminPassword.2>${it.publish.password} </sling.it.instance.adminPassword.2> </systemPropertyVariables> + <excludedGroups>${exclude.category}</excludedGroups> </configuration> <executions> <execution> From 4067b2afab1b63dd2a65f2708245db3387433064 Mon Sep 17 00:00:00 2001 From: levente <levente@qadobe.com> Date: Wed, 8 Nov 2023 22:09:18 +0200 Subject: [PATCH 16/16] @releng - fixing test after AEM docker image update --- .circleci/ci/it-tests.js | 2 +- .../src/main/java/com/venia/it/tests/ProductPageIT.java | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.circleci/ci/it-tests.js b/.circleci/ci/it-tests.js index dab953e9..5d0a0c3d 100644 --- a/.circleci/ci/it-tests.js +++ b/.circleci/ci/it-tests.js @@ -106,7 +106,7 @@ try { // Run integration tests if (TYPE === 'integration') { - let excludedCategory = classifier === 'classic' ? 'com.venia.it.category.IgnoreOnCloud' : 'com.venia.it.category.IgnoreOn65'; + let excludedCategory = classifier === 'classic' ? 'com.venia.it.category.IgnoreOn65' : 'com.venia.it.category.IgnoreOnCloud'; ci.dir('it.tests', () => { ci.sh(`mvn clean verify -U -B -Plocal -Dexclude.category=${excludedCategory}`); // The -Plocal profile comes from the AEM archetype }); diff --git a/it.tests/src/main/java/com/venia/it/tests/ProductPageIT.java b/it.tests/src/main/java/com/venia/it/tests/ProductPageIT.java index c684de88..7f3edd8f 100644 --- a/it.tests/src/main/java/com/venia/it/tests/ProductPageIT.java +++ b/it.tests/src/main/java/com/venia/it/tests/ProductPageIT.java @@ -45,11 +45,13 @@ public class ProductPageIT extends CommerceTestBase { private static final String GROUPED_PRODUCTS_SELECTOR = PRODUCT_SELECTOR + ".productFullDetail__groupedProducts"; @Test + @Category(IgnoreOn65.class) public void testProductPageWithSampleData() throws ClientException, IOException { testProductPageWithSampleData("datalayer/simple-product.json"); } @Test + @Category(IgnoreOnCloud.class) public void testProductPageWithSampleData65() throws ClientException, IOException { testProductPageWithSampleData("datalayer/simple-product-65.json"); } @@ -88,13 +90,13 @@ public void testProductPageWithSampleData(String jsonFile) throws ClientExceptio } @Test - @Category({ IgnoreOn65.class }) + @Category(IgnoreOn65.class ) public void testProductPageWithSampleDataForGroupedProduct() throws ClientException, IOException { testProductPageWithSampleDataForGroupedProduct("datalayer/grouped-product.json"); } @Test - @Category({ IgnoreOnCloud.class }) + @Category(IgnoreOnCloud.class) public void testProductPageWithSampleDataForGroupedProduct65() throws ClientException, IOException { testProductPageWithSampleDataForGroupedProduct("datalayer/grouped-product-65.json"); }