spartacus icon indicating copy to clipboard operation
spartacus copied to clipboard

CXSPA-574: Customer ID Http Header for ASM emulation

Open justinlee01 opened this issue 3 years ago • 1 comments

Closes https://jira.tools.sap/browse/CXSPA-574 , https://jira.tools.sap/browse/CXSPA-149 , https://jira.tools.sap/browse/CXSPA-151

  • Creating UserIdInterceptor, used to append a "sap-commerce-cloud-user-id" header to certain HTTP requests that provide a HttpContext. This is so that there is no ambiguity as to who (the agent or the emulated user) is fetching certain resources.
  • Covering GET /costcenters and GET /product/search
  • Changing some E2E utils to be more stable (ex. use in-house interceptGet rather than cy.get with an incorrect BASE_SITE)
  • Changing some E2E utils to support the B2B case

justinlee01 avatar Aug 18 '22 18:08 justinlee01



Test summary

407 0 1 0Flakiness 5


Run details

Project spartacus
Status Passed
Commit d575ddd970 ℹ️
Started Oct 11, 2022 7:41 PM
Ended Oct 11, 2022 7:51 PM
Duration 09:48 💡
OS Linux Ubuntu - 20.04
Browser Electron 91

View run in Cypress Dashboard ➡️


Flakiness

ssr/pages.core-e2e-spec.ts Flakiness
1 SSR > should render homepage
2 SSR > should render PLP
3 SSR > should render PDP
regression/variants/apparel-cart-import-export.core-e2e-spec.ts Flakiness
1 ... > should import to saved cart
accessibility/product-configurator-tabbing.core-e2e-spec.ts Flakiness
1 Product Configuration > Product Config Tabbing > should allow to navigate with tab key

This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard

cypress[bot] avatar Aug 18 '22 18:08 cypress[bot]

@armanozak @plabadie As the feature requires a corresponding change to Commerce Cloud, I have hidden it behind a feature flag, implemented in "UserIdHttpHeaderInterceptor". I have also skipped the written e2e tests for the same reason. Let me know your thoughts.

justinlee01 avatar Sep 15 '22 20:09 justinlee01

As a note, I have created a ticket for updating the backend: https://jira.tools.sap/browse/CXSPA-1355 I myself am not sure how this is done - through updating spartacussampledata or other.

justinlee01 avatar Sep 20 '22 13:09 justinlee01