Skip to content

MWPW-174297: CCD mini card variant #4336

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

Open
wants to merge 141 commits into
base: stage
Choose a base branch
from
Open

MWPW-174297: CCD mini card variant #4336

wants to merge 141 commits into from

Conversation

yesil
Copy link
Contributor

@yesil yesil commented Jun 6, 2025

CCD mini variant card.

mas-ff-defaults is enabled by default in MAS, but disabled explicitly in merch.js for Milo.
aem-fragment: moved caching from element scope to module scope
support price-literals override via aem-fragment response.

Resolves:
MWPW-174297
MWPW-174581
https://jira.corp.adobe.com/browse/MWPW-175099

screenshot:

image

docs: mwpw-174297--milo--adobecom.aem.live/libs/features/mas/docs/merch-card.html#properties

Test URLs:


await test.step('2. Verify CCD Mini Card content', async () => {
const cardLocator = miniCard.getCard(data.fragment);
await expect(cardLocator).toBeVisible();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yesil will try adding here await for card locator. Might be that the cards are not loading fast enough.

test.beforeEach(async ({ page, browserName }) => {
miniCard = new MiniCard(page);
if (browserName === 'chromium') {
await page.setExtraHTTPHeaders({ 'sec-ch-ua': '"Chromium";v="123", "Not:A-Brand";v="8"' });
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yesil I have added this http headers here. It is needed for automation in chromium for commerce. Without it, the requests get rejected by the bot.

@@ -10,7 +10,7 @@ import { MODAL_TYPE_3_IN_1 } from './constants.js';
/**
* generate Checkout configuration
*/
export function Checkout({ settings }) {
export function Checkout({ settings, providers }) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hehe i see, providers are back :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually, they were in the code since the very early Milo commerce but we never used them, now we will need them with settings coming at card level.

} = settings;

let options = {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are you sure we need this? i vaguely remember removing it because it wasn't used

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, the providers are ran against the default options.
technically there can be more than 1 provider, although we should strive to be reasonable and keep it as close as to 0 or 1.
when a provider gets the options, it doesn't know whether another provider has already modified the options.
so we need an initial options object.

@aem-code-sync aem-code-sync bot had a problem deploying to mas-v0.5.2 July 10, 2025 08:45 Failure
@aem-code-sync aem-code-sync bot had a problem deploying to mas-js-v0.5.2 July 10, 2025 10:10 Failure
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants