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

Percy demo #123

Closed
wants to merge 84 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
84 commits
Select commit Hold shift + click to select a range
a030a6a
Initial Drop-Ins integration (#1)
sirugh Feb 2, 2024
ea54d91
Merge branch 'main' into main
sirugh Feb 5, 2024
cbb6c11
fix for configurable products
fnhipster Feb 5, 2024
4613970
temp fix for configurable products (#2)
fnhipster Feb 5, 2024
c1d4a97
fixes optionsUID variable name for pdp drop-in
sirugh Feb 6, 2024
c5e845a
Update checkout dropin version alpha15 (#4)
loginesta Feb 7, 2024
4e67c01
cart update
fnhipster Feb 7, 2024
8b810a5
Merge branch 'main' of https://github.com/hlxsites/boilerplate-commer…
fnhipster Feb 7, 2024
966cbe1
checkout link
fnhipster Feb 7, 2024
fe3ad9a
changed to sessionStorage
fnhipster Feb 7, 2024
cfa37b7
Merge pull request #5 from hlxsites/cart-bump
fnhipster Feb 7, 2024
38a4336
fix for selector specificy/cascade of tokens
sirugh Feb 7, 2024
fccded2
carousel
fnhipster Feb 8, 2024
ad3f101
Merge pull request #6 from hlxsites/pdp-carousel
fnhipster Feb 8, 2024
25342f3
Update checkout drop-in to v0.1.0-alpha17
OscarMerino Feb 14, 2024
148f006
Update order confirmation drop-in to v0.1.0-alpha9
OscarMerino Feb 14, 2024
0004a51
Add routes to the boilerplate provider
OscarMerino Feb 14, 2024
88d97a3
Merge pull request #8 from hlxsites/checkout-alpha17
OscarMerino Feb 14, 2024
d89f9e8
Fix conflict
OscarMerino Feb 14, 2024
2b42adb
Fix vulnerabilities
OscarMerino Feb 14, 2024
e0661c5
Merge pull request #9 from hlxsites/USF-952
OscarMerino Feb 14, 2024
63980ed
bumped checkout drop-in version to 0.1.0-alpha18
keoko Feb 16, 2024
2450ecd
moved cartId prop to the Checkout container
keoko Feb 16, 2024
2c7d1f5
set empty string if there is no cart_id in session storage
keoko Feb 16, 2024
271646d
Merge pull request #10 from hlxsites/checkout-alpha18
keoko Feb 19, 2024
e779f30
Upgrade checkout and order confirmation drop-ins
OscarMerino Feb 19, 2024
6e5b4f1
Add order confirmation routing
OscarMerino Feb 19, 2024
560822b
Merge pull request #11 from hlxsites/USF-957
OscarMerino Feb 19, 2024
bdd36a6
Mini Cart (#12)
fnhipster Feb 21, 2024
853349a
styling fixes
fnhipster Feb 22, 2024
c998249
bump pdp
fnhipster Feb 22, 2024
4b1b89a
fixed visibility issue
fnhipster Feb 23, 2024
f15bda0
Bump checkout drop-in version to 0.1.0-alpha20 and order confirmation…
OscarMerino Feb 23, 2024
d95ddd6
body layout
fnhipster Feb 23, 2024
6dd817d
Merge branch 'main' of https://github.com/hlxsites/boilerplate-commer…
fnhipster Feb 23, 2024
889162e
Bump checkout drop-in version to 0.1.0-alpha21 (#15)
OscarMerino Feb 27, 2024
c3aadcb
fixed effects (#16)
fnhipster Feb 27, 2024
b34ec72
@dropins/elsie -> @dropins/tools, and bumps all dropins to versions w…
OscarMerino Mar 1, 2024
3e98922
Merge branch 'main' of github.com:hlxsites/aem-boilerplate-commerce
herzog31 Mar 4, 2024
9a7c2ab
excluding mini cart button in paths (#19)
fnhipster Mar 5, 2024
91c9ac3
Hide cart checkout (#20)
fnhipster Mar 6, 2024
a46a997
bump (#21)
fnhipster Mar 8, 2024
ce9ea7b
Merge remote-tracking branch 'upstream/main'
sirugh Apr 3, 2024
531c855
reverting d95ddd6e9a0800c15a2a076dd01de5c1deb2a606 to fix mobile views
sirugh Apr 3, 2024
0dec895
add template-columns to ensure footer is pushed to bottom, but keeps …
sirugh Apr 3, 2024
fa0c0c2
[Bugfix] Console error in checkout and order confirmation page (#24)
jcalcaben Apr 4, 2024
41d4899
bumped checkout dropin to 0.1.0-alpha26 and order-confirmation to 0.1…
keoko Apr 4, 2024
3a6b8ee
await init (#25)
sirugh Apr 9, 2024
23c13a8
upgrades (#27)
fnhipster Apr 15, 2024
a1238c5
Revert "upgrades (#27)" (#30)
keoko Apr 18, 2024
2b32312
dropins updates (#33)
fnhipster Apr 19, 2024
949651d
Bump checkout dropin to 0.1.0-alpha30 and order-confirmation to 0.1.0…
OscarMerino Apr 23, 2024
1c087a5
update to cart 0.1.1-beta3 (#37)
anthoula Apr 23, 2024
3e4b2fe
Fix button styles inside of a drop-in overwritten by boilerplate (#38)
OscarMerino Apr 24, 2024
690ab0f
update to cart 0.1.1 (#39)
anthoula Apr 24, 2024
3fe2981
add postinstall check for artifactory references (#40)
sirugh Apr 25, 2024
edaa8ba
[chore] merge upstream (#46)
sirugh May 3, 2024
af18b40
Merge branch 'main' of github.com:hlxsites/aem-boilerplate-commerce
herzog31 May 3, 2024
48f8ccf
Update checkout and order confirmation drop-ins to latest version (#47)
OscarMerino May 8, 2024
093159e
Merge branch 'main' of github.com:hlxsites/aem-boilerplate-commerce
sirugh May 9, 2024
eb37fe3
Update fork from upstream (#51)
herzog31 May 30, 2024
63c494f
Merge branch 'main' of github.com:hlxsites/aem-boilerplate-commerce
herzog31 May 30, 2024
7ea8477
integration: auth dropin (#54)
sirugh Jun 3, 2024
a5c18fe
Merge branch 'main' of github.com:hlxsites/aem-boilerplate-commerce
sirugh Jun 6, 2024
d932de1
logged-in checkout, auth feedback fixes
sirugh Jun 19, 2024
74df01d
User can create an account when placing an order as guest (#61)
emipallares Jun 25, 2024
d8ed6b0
Merge latest aem-boilerplate-commerce
alandana Jun 28, 2024
94ad90b
update cart (#63)
dpatil-magento Jul 11, 2024
9413f8b
Cypress tests (#66)
dpatil-magento Jul 15, 2024
4226afe
update cart (#68)
dpatil-magento Jul 19, 2024
2645c48
Integrate ReCaptcha module in boilerplate (#67)
KostiantynFandeliuk Jul 23, 2024
d55b821
Fixed dropin mount on prerendered documents (#75)
fnhipster Jul 25, 2024
4e819da
update cart 0.4.0 (#81)
dpatil-magento Aug 1, 2024
262ed53
Updates from Demo (#101)
fnhipster Aug 21, 2024
b2dfe3b
Update auth dropin version to alpha18 (#103)
Ferri0 Aug 22, 2024
f54eb2a
Update cart 0.5.0 (#104)
cctina516 Aug 23, 2024
db692a6
USF 1412 - Update error messages (#106)
cctina516 Sep 3, 2024
70e1a52
fix incorrect env value setting in eventing config (#110)
sirugh Sep 3, 2024
4f41bf3
add percy integration
dpatil-magento Sep 10, 2024
da00892
update
dpatil-magento Sep 10, 2024
18cc356
update
dpatil-magento Sep 10, 2024
51869d1
update
dpatil-magento Sep 10, 2024
c7ea043
update config
dpatil-magento Sep 10, 2024
e75d15d
revert
dpatil-magento Sep 10, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ scripts/commerce-events-collector.js
scripts/commerce-events-sdk.js
scripts/widgets
plugins/
cypress/
7 changes: 7 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,12 @@ module.exports = {
'import/extensions': ['error', { js: 'always' }], // require js file extensions in imports
'linebreak-style': ['error', 'unix'], // enforce unix linebreaks
'no-param-reassign': [2, { props: false }], // allow modifying properties of param
'no-use-before-define': [2, { functions: false }],
'no-console': [
'error',
{
allow: ['warn', 'error', 'info', 'debug'],
},
],
},
};
29 changes: 29 additions & 0 deletions .github/workflows/run-e2e-tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Cypress E2E Tests
on: push
jobs:
cypress-run:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install root dependencies
run: npm ci
- name: Start server in the background
run: npm start &

- name: Install Cypress and run tests
uses: cypress-io/github-action@v6
with:
working-directory: cypress
browser: chrome
wait-on: 'http://localhost:3000'
config: baseUrl=http://localhost:3000
command: npm run cypress:percy
env:
# pass the Percy Token
PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }}
- uses: actions/upload-artifact@v4
if: failure()
with:
name: cypress-screenshots
path: cypress/screenshots
if-no-files-found: ignore
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ helix-importer-ui
*.bak
.idea
# Ignore .map files in scripts/__dropins__/ directory and all its subdirectories
scripts/__dropins__/**/*.map
scripts/__dropins__/**/*.map
1 change: 1 addition & 0 deletions .hlxignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ package-lock.json
test/*
postinstall.js
tools/picker/src/*
cypress/
2 changes: 2 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
; force @adobe namespaced packages to be installed from npmjs.org
@adobe:registry=https://registry.npmjs.org
15 changes: 14 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,22 @@ This project boilerplate is for Edge Delivery Services projects that integrate w
https://experienceleague.adobe.com/developer/commerce/storefront/

## Environments

- Preview: https://main--{repo}--{owner}.hlx.page/
- Live: https://main--{repo}--{owner}.hlx.live/

## Pre-requisites

Out of the box, this project template uses a pre-configured Adobe Commerce environment. If you want to use your own Adobe Commerce environment, you'll need to update the `configs.xlsx` file in your content repository to have values that match your environment.

Additionally, you need to have the following modules and customizations installed on your environment:

1. magento/magento-extra-graphql: Commerce module required for Cart and Checkout Drop-Ins.
1. magento/module-data-services-graphql: Commerce module with functionality necessary for adding context to events.
1. magento/module-page-builder-product-recommendations: Commerce module required for PRex Widget
1. magento/module-visual-product-recommendations: Commerce module required for PRex Widget
<!-- 1. TODO: Add further prereqs. -->

## Installation

```sh
Expand All @@ -33,4 +46,4 @@ npm run lint

Major changes are described and documented as part of pull requests and tracked via the `changelog` tag. To keep your project up to date, please follow this list:

https://github.com/hlxsites/aem-boilerplate-commerce/issues?q=label%3Achangelog+is%3Aclosed
https://github.com/hlxsites/aem-boilerplate-commerce/issues?q=label%3Achangelog+is%3Aclosed
141 changes: 141 additions & 0 deletions blocks/commerce-account/api/getCustomer.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
import { getConfigValue, getCookie } from '../../../scripts/configs.js';

const getCustomer = async () => {
const query = `
{
customer {
firstname
lastname
email
is_subscribed
wishlist {
id
items_count
sharing_code
updated_at
items {
id
qty
description
added_at
product {
id
sku
name
url_key
price {
regularPrice {
amount {
currency
value
}
}
}
image {
url
label
}
}
}
}
addresses {
firstname
lastname
city
company
country_code
region{
region
region_code
region_id
}
region_id
telephone
id
vat_id
postcode
street
default_shipping
default_billing
}
orders {
page_info {
current_page
page_size
total_pages
}
items {
id
status
order_date
number
shipping_method
payment_methods {
type
name
}
billing_address {
firstname
lastname
city
country_code
region
telephone
postcode
telephone
street
}
shipping_address {
region
firstname
lastname
city
country_code
region_id
telephone
postcode
street
}
items {
product_name
product_type
product_url_key
id
quantity_invoiced
quantity_canceled
quantity_ordered
quantity_refunded
quantity_returned
quantity_shipped
status
product_sku
product_sale_price {
currency
value
}
}
}
}
}
}
`;

const token = getCookie('auth_dropin_user_token');

try {
const response = await fetch(await getConfigValue('commerce-core-endpoint'), {
method: 'POST',
headers: {
Authorization: `Bearer ${token}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({ query }),
});

return await response.json();
} catch (error) {
return null;
}
};

export default getCustomer;
68 changes: 67 additions & 1 deletion blocks/commerce-account/commerce-account.css
Original file line number Diff line number Diff line change
@@ -1 +1,67 @@
/* stylelint-disable no-empty-source */
* {
box-sizing: border-box;
}

.admin-panel {
display: flex;
align-items: flex-start;
}

.admin-panel .sidebar {
width: 300px;
background-color: #e0e0e06b;
padding: 10px;
}

.admin-panel .logo {
padding: 10px;
text-align: center;
}

.admin-panel .menu ul {
list-style: none;
padding: 0;
margin: 0;
padding-bottom: 10px;
border-bottom: 1px solid lightgray;
}

.admin-panel .menu ul:last-child {
border: none;
}

.admin-panel .menu a {
display: block;
padding: 10px;
text-decoration: none;
}

.admin-panel .content {
padding: 20px;
flex-grow: 1;
border-left: 1px solid #e0e0e06b;
}

.admin-panel h2 {
margin-top: 0;
}

.admin-panel h4 {
padding-bottom: 0.5em;
border-bottom: 1px solid lightgray;
}

.admin-panel address {
margin-bottom: 1em;
}

.orders-list {
list-style: none;
padding: 0;
}

.orders-list li {
display: flex;
gap: 0 10px;
margin: 10px;
}
Loading
Loading