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

feat/CXSPA-7301: Allow Billing Address + Guest checkout - in Digital Payments #18892

Merged
merged 37 commits into from
Jun 13, 2024

Conversation

anjana-bl
Copy link
Contributor

@anjana-bl anjana-bl commented May 23, 2024

https://jira.tools.sap/browse/CXSPA-7301

The following is a checklist for new epics or features acceptance for Spartacus, based on our Definition of Done document

General

  • Epic has been tested on a production-like server using Spartacus installation script
  • Epic has been tested in all supported browsers and devices (Check list on DoD page)
  • Epic has sufficient end to end (cypress) test coverage
  • Schematics code deprecations have been provided and tested
  • Epic complies with Security best practices
  • Epic complies with Accessibility best practices
  • Epic CSS supports directionality (if required)
  • Epic code scans have been conducted Compliance scans for branches
  • Epic renders successfully in SSR

Audits/reviews

  • Architecture review of the epic
  • Security and threat modeling audit/review from the Security team
  • Accessibility audit/review from the UX team

New Library

If your epic will be introduced or introduces a new library:

  • Library provides schematics to install the library
  • Library modules can be lazy loaded appropriately
  • Library has been tested for a customer using Spartacus installation script

Sample data

If the new feature requires new or updated sample data for a specific Commerce backend version:

  • Sample data has been added to the sampledata repo and merged to the next version to be released
  • New sample data has been loaded and tested on a dev server
  • New sample data has been loaded and tested in our CI server

Documentation

  • Documentation input is provided for it to be published on the doc site.

@anjana-bl anjana-bl requested a review from a team as a code owner May 23, 2024 09:07
@github-actions github-actions bot marked this pull request as draft May 28, 2024 07:22
@anjana-bl anjana-bl changed the title feat: billing address in digital-payments feat/CXSPA-7301: Allow Billing Address + Guest checkout - in Digital Payments May 28, 2024
@RadhepS RadhepS marked this pull request as ready for review June 11, 2024 14:19
Copy link

cypress bot commented Jun 11, 2024

4 flaky tests on run #44014 ↗︎

0 119 2 0 Flakiness 4

Details:

Merge c8b069e into 051406f...
Project: spartacus Commit: bdb8b3a89f ℹ️
Status: Passed Duration: 04:10 💡
Started: Jun 12, 2024 7:06 PM Ended: Jun 12, 2024 7:10 PM
Flakiness  regression/asm/asm.emulation.core-e2e.cy.ts • 1 flaky test • B2C

View Output Video

Test Artifacts
Assisted Service Module > Customer Support Agent - Emulation > should checkout as customer Test Replay Screenshots Video
Flakiness  ssr/pages.core-e2e.cy.ts • 3 flaky tests • SSR

View Output Video

Test Artifacts
SSR > should render homepage Test Replay Screenshots Video
SSR > should render PLP Test Replay Screenshots Video
SSR > should render PDP Test Replay Screenshots Video

Review all test suite changes for PR #18892 ↗︎

@RadhepS
Copy link
Contributor

RadhepS commented Jun 11, 2024

Looks good when looking at the changes related to the core project

@github-actions github-actions bot marked this pull request as draft June 12, 2024 15:21
@RadhepS RadhepS marked this pull request as ready for review June 12, 2024 18:56
const numbers = getAddressNumbers(address, textPhone, textMobile);

return {
textBold: address.firstName + ' ' + address.lastName,
Copy link
Contributor

Choose a reason for hiding this comment

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

Small but better to use template literals:
textBold: ${address.firstName} ${address.lastName}

address.line1,
address.line2,
address.town + ', ' + region + address.country?.isocode,
address.postalCode,
Copy link
Contributor

Choose a reason for hiding this comment

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

Template literal here too:
${address.town}, ${region}${address.country?.isocode}

}

isBillingAddressSameAsDeliveryAddress(): boolean {
if (this.billingAddress === undefined) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Without using if statements, I think we can rewrite this as:
return this.billingAddress !== undefined;

this.launchDialogService.closeDialog(reason);
}

continue() {
Copy link
Contributor

Choose a reason for hiding this comment

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

I would change to something like continueNavigation(). continue is a reserved word in JS

clickAddNewPayment();
cy.wait('@getDigitalPaymentsRequest');
fillBillingAddress(my_user.billingAddress);
cy.get('button.btn.btn-block.btn-secondary')
Copy link
Contributor

Choose a reason for hiding this comment

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

I assume some of these could be moved to a helper class but it's nothing urgent

@@ -0,0 +1,211 @@
<!-- BILLING -->
Copy link
Contributor

Choose a reason for hiding this comment

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

Please make sure to test this feature from a customer perspective:
image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@anjana-bl anjana-bl merged commit 26d10a1 into develop Jun 13, 2024
28 checks passed
@anjana-bl anjana-bl deleted the feature/dp-guest-checkout branch June 13, 2024 05:48
@anjana-bl anjana-bl restored the feature/dp-guest-checkout branch June 13, 2024 06:29
@anjana-bl anjana-bl deleted the feature/dp-guest-checkout branch June 13, 2024 06:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants