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

Feature/gh 12987 handle new cart entry api format #13066

Merged

Conversation

Stofftiger
Copy link
Contributor

@Stofftiger Stofftiger commented Jul 12, 2021

Enable handling of the enhanced content for the ConfigurationInfo structure of the OrderEntry.
Closes #12987

@CLAassistant
Copy link

CLAassistant commented Jul 12, 2021

CLA assistant check
All committers have signed the CLA.

@cypress
Copy link

cypress bot commented Jul 12, 2021



Test summary

2 0 0 0Flakiness 0


Run details

Project spartacus
Status Passed
Commit b6bb18b ℹ️
Started Jul 15, 2021 7:25 AM
Ended Jul 15, 2021 7:26 AM
Duration 01:06 💡
OS Linux Ubuntu - 18.04
Browser Electron 89

View run in Cypress Dashboard ➡️


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

@@ -124,4 +233,240 @@ describe('ConfiguratorCartEntryBundleInfoService', () => {
expect(lineItems[2]).toEqual(expectedLineItem3);
expect(lineItems[3]).toEqual(expectedLineItem4);
});

describe('for enhanced OCC API format: ', () => {
it('should retrieve an existing lineitem for requested lineitemNumber from lineitemMap', () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

'line item' instead of 'lineitem'. Also in other test descriptions

Copy link
Contributor

Choose a reason for hiding this comment

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

done

AlexanderKuschner and others added 7 commits July 12, 2021 16:05
…or-cart-entry-bundle-info/configurator-cart-entry-bundle-info.service.spec.ts

Co-authored-by: Christoph Hinssen <33626130+ChristophHi@users.noreply.github.com>
…or-cart-entry-bundle-info/configurator-cart-entry-bundle-info.service.spec.ts

Co-authored-by: Christoph Hinssen <33626130+ChristophHi@users.noreply.github.com>
…or-cart-entry-bundle-info/configurator-cart-entry-bundle-info.service.ts

Co-authored-by: Christoph Hinssen <33626130+ChristophHi@users.noreply.github.com>
…figurator.model.ts

Co-authored-by: Christoph Hinssen <33626130+ChristophHi@users.noreply.github.com>
…figurator.model.ts

Co-authored-by: Christoph Hinssen <33626130+ChristophHi@users.noreply.github.com>
@github-actions
Copy link
Contributor

Public API changes

⚠️ @spartacus/product-configurator/common

 }
 
 // @public
+export enum ConfigurationInfoFields {
+    // (undocumented)
+    FORMATTED_PRICE = "FORMATTED_PRICE",
+    // (undocumented)
+    KEY = "KEY",
+    // (undocumented)
+    NAME = "NAME",
+    // (undocumented)
+    PRICE_VALUE = "PRICE_VALUE",
+    // (undocumented)
+    QTY = "QTY"
+}
+
+// @public
+export enum ConfigurationInfoSpecialFields {
+    // (undocumented)
+    CURRENCY = "CI#@#CURRENCY",
+    // (undocumented)
+    LINE_ITEM = "LI",
+    // (undocumented)
+    LINE_ITEM_DELIMITER = "#",
+    // (undocumented)
+    VERSION = "CI#@#VERSION"
+}
+
+// @public
 export class ConfiguratorCartEntryBundleInfoComponent {
     constructor(commonConfigUtilsService: CommonConfiguratorUtilsService, configCartEntryBundleInfoService: ConfiguratorCartEntryBundleInfoService, breakpointService: BreakpointService, cartItemContext?: CartItemContext | undefined);
     // (undocumented)
@@
 // @public
 export class ConfiguratorCartEntryBundleInfoService {
     // (undocumented)
+    protected addLineItemData(lineItemMap: Map<number, LineItem>, configurationInfoSplit: string[], configurationInfoValue: string): void;
+    // (undocumented)
+    protected getOrCreateLineItem(lineItemMap: Map<number, LineItem>, lineItemNumber: number): LineItem;
+    // (undocumented)
+    protected logWarning(text: string): void;
+    // (undocumented)
     protected prepareLineItem(configurationInfo: ConfigurationInfo): LineItem;
     // (undocumented)
+    protected processConfigurationInfoEntry(lineItemMap: Map<number, LineItem>, configurationInfo: ConfigurationInfo): void;
+    // (undocumented)
+    protected processConfigurationInfos(configurationInfos: ConfigurationInfo[]): LineItem[];
+    // (undocumented)
     protected removeDelimiter(label: string): string;
     retrieveLineItems(entry: OrderEntry): LineItem[];
     // (undocumented)

⚠️ Some entry points are currently impossible to analyze.

Read more

💰 How to debug problems?

Read more

@AlexanderKuschner AlexanderKuschner merged commit 6c2f6e8 into develop Jul 15, 2021
@AlexanderKuschner AlexanderKuschner deleted the feature/GH-12987_Handle_new_cart_entry_API_format branch July 15, 2021 08:43
@AlexanderKuschner AlexanderKuschner temporarily deployed to dev July 15, 2021 08:43 Inactive
Stofftiger added a commit that referenced this pull request Jul 16, 2021
…of the order entry (#13066)

Each configuration info line contains data for one item parameter like name, price or quantity. 

Closes #12987
Stofftiger added a commit that referenced this pull request Jul 16, 2021
…of the order entry (#13066) (#13139)

Each configuration info line contains data for one item parameter like name, price or quantity. 

Closes #12987
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.

Make configurator-cart-entry-bundle-info.service.ts handle new API format in addition
4 participants