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: Quick order #11872

Merged
merged 107 commits into from
Aug 26, 2021
Merged

feat: Quick order #11872

merged 107 commits into from
Aug 26, 2021

Conversation

dydome
Copy link
Contributor

@dydome dydome commented Apr 8, 2021

closes #11817

Master ticket: #11817

@dydome dydome self-assigned this Apr 8, 2021
@dydome dydome added this to the 3.x milestone Apr 8, 2021
@dydome dydome marked this pull request as draft April 8, 2021 07:45
@dydome dydome mentioned this pull request Apr 8, 2021
22 tasks
@cypress
Copy link

cypress bot commented Apr 8, 2021



Test summary

573 4 11 0Flakiness 8


Run details

Project spartacus
Status Failed
Commit 9fe8b2c
Started Aug 26, 2021 6:14 AM
Ended Aug 26, 2021 6:32 AM
Duration 18:01 💡
OS Linux Ubuntu - 18.04
Browser Electron 89

View run in Cypress Dashboard ➡️


Failures

Run group: B2B (Linux, Electron )
b2b/regression/quick-order/b2b-quick-order.e2e-spec.ts Failed
1 ... > should limit the list and block form for adding more products
b2b/regression/saved-cart/b2b-saved-cart.e2e-spec.ts Failed
1 ... > Cart page > should conform to tabbing order
2 ... > Cart page > should conform to tabbing order
Run group: DIGITAL-PAYMENTS (Linux, Electron )
vendor/digital-payments/digital-payments.e2e-spec.ts Failed
1 checkout using digital-payments > checkout using digital-payments

Flakiness

ssr/pages.e2e-spec.ts Flakiness
1 SSR > should render homepage
2 SSR > should render PLP
3 SSR > should render PDP
regression/site-context/language/language-my-account-pages.e2e-spec.ts Flakiness
1 Language switch - my-account pages > address book page > should change language in the edit page
2 Language switch - my-account pages > personal details page > should change language in the page
This comment includes only the first 5 flaky tests. See all 8 flaky tests in the 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

@cypress
Copy link

cypress bot commented Apr 8, 2021



Test summary

577 0 11 0Flakiness 9


Run details

Project spartacus
Status Passed
Commit 310682f ℹ️
Started Aug 26, 2021 9:28 AM
Ended Aug 26, 2021 9:41 AM
Duration 12:27 💡
OS Linux Ubuntu - 18.04
Browser Electron 89

View run in Cypress Dashboard ➡️


Flakiness

vendor/digital-payments/digital-payments.e2e-spec.ts Flakiness
1 checkout using digital-payments > checkout using digital-payments
ssr/pages.e2e-spec.ts Flakiness
1 SSR > should render homepage
2 SSR > should render PLP
3 SSR > should render PDP
b2b/regression/quick-order/b2b-quick-order.e2e-spec.ts Flakiness
1 ... > should add 2 different products to the list
This comment includes only the first 5 flaky tests. See all 9 flaky tests in the 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

@dydome dydome added MVP Mandatory label: Used to define the MVP scope of the feature team/obelix labels Apr 9, 2021
@dydome dydome temporarily deployed to dev April 13, 2021 06:29 Inactive
@dydome dydome temporarily deployed to dev April 13, 2021 08:38 Inactive
@dydome dydome temporarily deployed to dev April 14, 2021 11:25 Inactive
@dydome dydome temporarily deployed to dev June 8, 2021 09:46 Inactive
@dydome dydome temporarily deployed to dev June 17, 2021 06:51 Inactive
feat: Add quick order cart form (#12696, #12697)
@dydome dydome temporarily deployed to dev June 18, 2021 12:07 Inactive
add: Added quick order form and list page (#11821)
@dydome dydome temporarily deployed to dev June 22, 2021 06:37 Inactive
@mszczepaniak mszczepaniak temporarily deployed to dev August 25, 2021 10:28 Inactive
@marlass marlass temporarily deployed to dev August 25, 2021 11:09 Inactive
@marlass marlass temporarily deployed to dev August 25, 2021 11:30 Inactive
@marlass marlass temporarily deployed to dev August 25, 2021 12:10 Inactive
@marlass marlass temporarily deployed to dev August 26, 2021 07:27 Inactive
@marlass marlass temporarily deployed to dev August 26, 2021 08:05 Inactive
@mszczepaniak mszczepaniak temporarily deployed to dev August 26, 2021 09:18 Inactive
@marlass marlass merged commit 9ed6216 into develop Aug 26, 2021
@marlass marlass deleted the epic/quick-order branch August 26, 2021 09:42
@marlass marlass temporarily deployed to dev August 26, 2021 09:42 Inactive
@github-actions
Copy link
Contributor

Public API changes

⚠️ @spartacus/cart/quick-order/assets

New entry point. Initial public api:

import { TranslationChunksConfig } from '@spartacus/core';
import { TranslationResources } from '@spartacus/core';

// @public (undocumented)
export const quickOrderTranslationChunksConfig: TranslationChunksConfig;

// @public (undocumented)
export const quickOrderTranslations: TranslationResources;

// (No @packageDocumentation comment for this package)

⚠️ @spartacus/cart/quick-order/components

New entry point. Initial public api:

import { ActiveCartService } from '@spartacus/core';
import { Cart } from '@spartacus/core';
import { CartAddEntrySuccessEvent } from '@spartacus/core';
import { ChangeDetectorRef } from '@angular/core';
import { CmsComponentData } from '@spartacus/storefront';
import { CmsQuickOrderComponent } from '@spartacus/cart/quick-order/core';
import { EventService } from '@spartacus/core';
import { FormBuilder } from '@angular/forms';
import { FormControl } from '@angular/forms';
import { FormGroup } from '@angular/forms';
import { GlobalMessageService } from '@spartacus/core';
import { GlobalMessageType } from '@spartacus/core';
import * as i0 from '@angular/core';
import * as i1_2 from '@angular/router';
import * as i2 from '@angular/common';
import * as i3 from '@angular/forms';
import * as i4 from '@spartacus/core';
import * as i5 from '@spartacus/storefront';
import { ICON_TYPE } from '@spartacus/storefront';
import { Observable } from 'rxjs';
import { OnDestroy } from '@angular/core';
import { OnInit } from '@angular/core';
import { OrderEntry } from '@spartacus/core';
import { QuickOrderFacade } from '@spartacus/cart/quick-order/root';
import { QuickOrderStatePersistenceService } from '@spartacus/cart/quick-order/core';
import { Subscription } from 'rxjs';

// @public (undocumented)
export class CartQuickOrderFormComponent implements OnInit, OnDestroy {
    constructor(activeCartService: ActiveCartService, eventService: EventService, formBuilder: FormBuilder, globalMessageService: GlobalMessageService);
    // (undocumented)
    protected activeCartService: ActiveCartService;
    // (undocumented)
    applyQuickOrder(): void;
    // (undocumented)
    protected buildForm(): void;
    // (undocumented)
    cart$: Observable<Cart>;
    // (undocumented)
    cartIsLoading$: Observable<boolean>;
    // (undocumented)
    protected eventService: EventService;
    // (undocumented)
    protected formBuilder: FormBuilder;
    // (undocumented)
    protected globalMessageService: GlobalMessageService;
    // (undocumented)
    min: number;
    // (undocumented)
    ngOnDestroy(): void;
    // (undocumented)
    ngOnInit(): void;
    // (undocumented)
    quickOrderForm: FormGroup;
    // (undocumented)
    protected resetForm(): void;
    // (undocumented)
    protected watchAddEntryFailEvent(): void;
    // (undocumented)
    protected watchAddEntrySuccessEvent(): void;
    // (undocumented)
    protected watchQuantityChange(): void;
    // (undocumented)
    static ɵcmp: i0.ɵɵComponentDeclaration<CartQuickOrderFormComponent, "cx-cart-quick-order-form", never, {}, {}, never, never>;
    // (undocumented)
    static ɵfac: i0.ɵɵFactoryDeclaration<CartQuickOrderFormComponent, never>;
}

// @public (undocumented)
export class CartQuickOrderFormModule {
    // (undocumented)
    static ɵfac: i0.ɵɵFactoryDeclaration<CartQuickOrderFormModule, never>;
    // (undocumented)
    static ɵinj: i0.ɵɵInjectorDeclaration<CartQuickOrderFormModule>;
    // Warning: (ae-forgotten-export) The symbol "i1" needs to be exported by the entry point public_api.d.ts
    //
    // (undocumented)
    static ɵmod: i0.ɵɵNgModuleDeclaration<CartQuickOrderFormModule, [typeof i1.CartQuickOrderFormComponent], [typeof i2.CommonModule, typeof i3.ReactiveFormsModule, typeof i4.I18nModule, typeof i5.FormErrorsModule], [typeof i1.CartQuickOrderFormComponent]>;
}

// @public (undocumented)
export class QuickOrderComponent implements OnInit, OnDestroy {
    constructor(activeCartService: ActiveCartService, component: CmsComponentData<CmsQuickOrderComponent>, globalMessageService: GlobalMessageService, quickOrderService: QuickOrderFacade, quickOrderStatePersistenceService: QuickOrderStatePersistenceService);
    // (undocumented)
    protected activeCartService: ActiveCartService;
    // (undocumented)
    addToCart(): void;
    // (undocumented)
    cartId$: Observable<string>;
    // (undocumented)
    clear(): void;
    // (undocumented)
    clearErrors(): void;
    // (undocumented)
    protected component: CmsComponentData<CmsQuickOrderComponent>;
    // (undocumented)
    entries$: Observable<OrderEntry[]>;
    // (undocumented)
    get errors$(): Observable<CartAddEntrySuccessEvent[]>;
    // (undocumented)
    protected globalMessageService: GlobalMessageService;
    // (undocumented)
    globalMessageType: typeof GlobalMessageType;
    // (undocumented)
    isCartStable$: Observable<boolean>;
    // (undocumented)
    ngOnDestroy(): void;
    // (undocumented)
    ngOnInit(): void;
    // (undocumented)
    quickOrderListLimit$: Observable<number | undefined>;
    // (undocumented)
    protected quickOrderService: QuickOrderFacade;
    // (undocumented)
    protected quickOrderStatePersistenceService: QuickOrderStatePersistenceService;
    // (undocumented)
    protected setErrors(errors: CartAddEntrySuccessEvent[]): void;
    // (undocumented)
    protected showAddedToCartSuccessMessage(): void;
    // (undocumented)
    static ɵcmp: i0.ɵɵComponentDeclaration<QuickOrderComponent, "cx-quick-order", never, {}, {}, never, never>;
    // (undocumented)
    static ɵfac: i0.ɵɵFactoryDeclaration<QuickOrderComponent, never>;
}

// @public (undocumented)
export class QuickOrderComponentsModule {
    // (undocumented)
    static ɵfac: i0.ɵɵFactoryDeclaration<QuickOrderComponentsModule, never>;
    // (undocumented)
    static ɵinj: i0.ɵɵInjectorDeclaration<QuickOrderComponentsModule>;
    // Warning: (ae-forgotten-export) The symbol "i2" needs to be exported by the entry point public_api.d.ts
    // Warning: (ae-forgotten-export) The symbol "i3" needs to be exported by the entry point public_api.d.ts
    //
    // (undocumented)
    static ɵmod: i0.ɵɵNgModuleDeclaration<QuickOrderComponentsModule, never, [typeof i1_2.RouterModule, typeof i2_2.QuickOrderListModule, typeof i3_3.CartQuickOrderFormModule], never>;
}

// @public (undocumented)
export class QuickOrderFormComponent implements OnInit, OnDestroy {
    constructor(globalMessageService: GlobalMessageService, quickOrderService: QuickOrderFacade);
    // (undocumented)
    protected buildForm(): void;
    // (undocumented)
    clear(event?: Event): void;
    // (undocumented)
    protected _disabled: boolean;
    // (undocumented)
    form: FormGroup;
    // (undocumented)
    protected globalMessageService: GlobalMessageService;
    // (undocumented)
    iconTypes: typeof ICON_TYPE;
    // (undocumented)
    get isDisabled(): boolean;
    set isDisabled(value: boolean);
    // (undocumented)
    get isLoading(): boolean;
    set isLoading(value: boolean);
    // (undocumented)
    isSearching: boolean;
    // (undocumented)
    protected _loading: boolean;
    // (undocumented)
    ngOnDestroy(): void;
    // (undocumented)
    ngOnInit(): void;
    // (undocumented)
    protected quickOrderService: QuickOrderFacade;
    // (undocumented)
    search(event?: Event): void;
    // (undocumented)
    protected searchProduct(productCode: string): Subscription;
    // (undocumented)
    protected subscription: Subscription;
    // (undocumented)
    protected validateProductControl(isDisabled: boolean): void;
    // (undocumented)
    protected watchProductAdd(): Subscription;
    // (undocumented)
    static ɵcmp: i0.ɵɵComponentDeclaration<QuickOrderFormComponent, "cx-quick-order-form", never, { "isDisabled": "isDisabled"; "isLoading": "isLoading"; }, {}, never, never>;
    // (undocumented)
    static ɵfac: i0.ɵɵFactoryDeclaration<QuickOrderFormComponent, never>;
}

// @public (undocumented)
export class QuickOrderItemComponent implements OnInit, OnDestroy {
    constructor(cd: ChangeDetectorRef, quickOrderService: QuickOrderFacade);
    // (undocumented)
    protected cd: ChangeDetectorRef;
    // (undocumented)
    get entry(): OrderEntry;
    set entry(value: OrderEntry);
    // (undocumented)
    protected _entry: OrderEntry;
    // (undocumented)
    index: number;
    // (undocumented)
    loading: boolean;
    // (undocumented)
    ngOnDestroy(): void;
    // (undocumented)
    ngOnInit(): void;
    // (undocumented)
    quantityControl: FormControl;
    // (undocumented)
    protected quickOrderService: QuickOrderFacade;
    // (undocumented)
    removeEntry(): void;
    // (undocumented)
    protected watchProductAdd(): Subscription;
    // (undocumented)
    static ɵcmp: i0.ɵɵComponentDeclaration<QuickOrderItemComponent, "cx-quick-order-item", never, { "entry": "entry"; "index": "index"; "loading": "loading"; }, {}, never, never>;
    // (undocumented)
    static ɵfac: i0.ɵɵFactoryDeclaration<QuickOrderItemComponent, never>;
}

// @public (undocumented)
export class QuickOrderListModule {
    // (undocumented)
    static ɵfac: i0.ɵɵFactoryDeclaration<QuickOrderListModule, never>;
    // (undocumented)
    static ɵinj: i0.ɵɵInjectorDeclaration<QuickOrderListModule>;
    // Warning: (ae-forgotten-export) The symbol "i1" needs to be exported by the entry point public_api.d.ts
    // Warning: (ae-forgotten-export) The symbol "i2" needs to be exported by the entry point public_api.d.ts
    // Warning: (ae-forgotten-export) The symbol "i3" needs to be exported by the entry point public_api.d.ts
    // Warning: (ae-forgotten-export) The symbol "i4" needs to be exported by the entry point public_api.d.ts
    //
    // (undocumented)
    static ɵmod: i0.ɵɵNgModuleDeclaration<QuickOrderListModule, [typeof i1_3.QuickOrderComponent, typeof i2_3.QuickOrderFormComponent, typeof i3_2.QuickOrderItemComponent, typeof i4_2.QuickOrderTableComponent], [typeof i2.CommonModule, typeof i3.ReactiveFormsModule, typeof i1_2.RouterModule, typeof i5.FormErrorsModule, typeof i4.I18nModule, typeof i5.IconModule, typeof i5.ItemCounterModule, typeof i5.MediaModule, typeof i4.UrlModule, typeof i5.ProgressButtonModule, typeof i5.MessageComponentModule], [typeof i1_3.QuickOrderComponent, typeof i2_3.QuickOrderFormComponent, typeof i3_2.QuickOrderItemComponent, typeof i4_2.QuickOrderTableComponent]>;
}

// @public (undocumented)
export class QuickOrderTableComponent {
    // (undocumented)
    entries: OrderEntry[];
    // (undocumented)
    loading: boolean;
    // (undocumented)
    static ɵcmp: i0.ɵɵComponentDeclaration<QuickOrderTableComponent, "cx-quick-order-table", never, { "entries": "entries"; "loading": "loading"; }, {}, never, never>;
    // (undocumented)
    static ɵfac: i0.ɵɵFactoryDeclaration<QuickOrderTableComponent, never>;
}

// (No @packageDocumentation comment for this package)

⚠️ @spartacus/cart/quick-order/core

New entry point. Initial public api:

import { ActiveCartService } from '@spartacus/core';
import { BehaviorSubject } from 'rxjs';
import { CartAddEntrySuccessEvent } from '@spartacus/core';
import { CmsComponent } from '@spartacus/core';
import { EventService } from '@spartacus/core';
import * as i0 from '@angular/core';
import { ModuleWithProviders } from '@angular/core';
import { Observable } from 'rxjs';
import { OnDestroy } from '@angular/core';
import { OrderEntry } from '@spartacus/core';
import { Product } from '@spartacus/core';
import { ProductAdapter } from '@spartacus/core';
import { QuickOrderFacade } from '@spartacus/cart/quick-order/root';
import { SiteContextParamsService } from '@spartacus/core';
import { StatePersistenceService } from '@spartacus/core';
import { Subject } from 'rxjs';
import { Subscription } from 'rxjs';

// @public (undocumented)
export interface CmsQuickOrderComponent extends CmsComponent {
    // (undocumented)
    quickOrderListLimit?: number;
}

// @public (undocumented)
export class QuickOrderCoreModule {
    // (undocumented)
    static forRoot(): ModuleWithProviders<QuickOrderCoreModule>;
    // (undocumented)
    static ɵfac: i0.ɵɵFactoryDeclaration<QuickOrderCoreModule, never>;
    // (undocumented)
    static ɵinj: i0.ɵɵInjectorDeclaration<QuickOrderCoreModule>;
    // (undocumented)
    static ɵmod: i0.ɵɵNgModuleDeclaration<QuickOrderCoreModule, never, never, never>;
}

// @public (undocumented)
export class QuickOrderService {
    constructor(activeCartService: ActiveCartService, productAdapter: ProductAdapter, eventService: EventService);
    // (undocumented)
    protected activeCartService: ActiveCartService;
    protected addEntry(entry: OrderEntry): void;
    addProduct(product: Product): void;
    addToCart(): Observable<[number, CartAddEntrySuccessEvent[]]>;
    clearList(): void;
    // (undocumented)
    protected entries$: BehaviorSubject<OrderEntry[]>;
    // (undocumented)
    protected eventService: EventService;
    protected generateOrderEntry(product: Product): OrderEntry;
    getEntries(): BehaviorSubject<OrderEntry[]>;
    getProductAdded(): Subject<string>;
    protected isProductOnTheList(productCode: string): boolean;
    loadEntries(entries?: OrderEntry[]): void;
    // (undocumented)
    protected productAdapter: ProductAdapter;
    // (undocumented)
    protected productAdded$: Subject<string>;
    removeEntry(index: number): void;
    search(productCode: string): Observable<Product>;
    setProductAdded(productCode: string): void;
    updateEntryQuantity(entryIndex: number, quantity: number): void;
    // (undocumented)
    static ɵfac: i0.ɵɵFactoryDeclaration<QuickOrderService, never>;
    // (undocumented)
    static ɵprov: i0.ɵɵInjectableDeclaration<QuickOrderService>;
}

// @public (undocumented)
export class QuickOrderStatePersistenceService implements OnDestroy {
    constructor(quickOrderService: QuickOrderFacade, siteContextParamsService: SiteContextParamsService, statePersistenceService: StatePersistenceService);
    initSync(): void;
    protected key: string;
    // (undocumented)
    ngOnDestroy(): void;
    protected onRead(state: OrderEntry[] | undefined): void;
    // (undocumented)
    protected quickOrderService: QuickOrderFacade;
    // (undocumented)
    protected siteContextParamsService: SiteContextParamsService;
    // (undocumented)
    protected statePersistenceService: StatePersistenceService;
    // (undocumented)
    protected subscription: Subscription;
    // (undocumented)
    static ɵfac: i0.ɵɵFactoryDeclaration<QuickOrderStatePersistenceService, never>;
    // (undocumented)
    static ɵprov: i0.ɵɵInjectableDeclaration<QuickOrderStatePersistenceService>;
}

// (No @packageDocumentation comment for this package)

⚠️ @spartacus/cart/quick-order

New entry point. Initial public api:

import * as i0 from '@angular/core';
import * as i1 from '@spartacus/cart/quick-order/core';
import * as i2 from '@spartacus/cart/quick-order/components';

// @public (undocumented)
export class QuickOrderModule {
    // (undocumented)
    static ɵfac: i0.ɵɵFactoryDeclaration<QuickOrderModule, never>;
    // (undocumented)
    static ɵinj: i0.ɵɵInjectorDeclaration<QuickOrderModule>;
    // (undocumented)
    static ɵmod: i0.ɵɵNgModuleDeclaration<QuickOrderModule, never, [typeof i1.QuickOrderCoreModule, typeof i2.QuickOrderComponentsModule], never>;
}

// (No @packageDocumentation comment for this package)

⚠️ @spartacus/cart/quick-order/root

New entry point. Initial public api:

import { BehaviorSubject } from 'rxjs';
import { CartAddEntrySuccessEvent } from '@spartacus/core';
import * as i0 from '@angular/core';
import { Observable } from 'rxjs';
import { OrderEntry } from '@spartacus/core';
import { Product } from '@spartacus/core';
import { RoutingConfig } from '@spartacus/core';
import { Subject } from 'rxjs';

// @public (undocumented)
export const CART_QUICK_ORDER_CORE_FEATURE = "cartQuickOrderCore";

// @public (undocumented)
export const CART_QUICK_ORDER_FEATURE = "cartQuickOrder";

// @public (undocumented)
export function defaultQuickOrderComponentsConfig(): {
    featureModules: {
        cartQuickOrder: {
            cmsComponents: string[];
        };
        cartQuickOrderCore: string;
    };
};

// @public (undocumented)
export const defaultQuickOrderRoutingConfig: RoutingConfig;

// @public (undocumented)
export abstract class QuickOrderFacade {
    abstract addProduct(product: Product): void;
    abstract addToCart(): Observable<[number, CartAddEntrySuccessEvent[]]>;
    abstract clearList(): void;
    abstract getEntries(): BehaviorSubject<OrderEntry[]>;
    abstract getProductAdded(): Subject<string>;
    abstract loadEntries(entries: OrderEntry[]): void;
    abstract removeEntry(index: number): void;
    abstract search(productCode: string): Observable<Product>;
    abstract setProductAdded(productCode: string): void;
    abstract updateEntryQuantity(entryIndex: number, quantity: number): void;
    // (undocumented)
    static ɵfac: i0.ɵɵFactoryDeclaration<QuickOrderFacade, never>;
    // (undocumented)
    static ɵprov: i0.ɵɵInjectableDeclaration<QuickOrderFacade>;
}

// @public (undocumented)
export function quickOrderFacadeFactory(): QuickOrderFacade;

// @public (undocumented)
export class QuickOrderRootModule {
    // (undocumented)
    static ɵfac: i0.ɵɵFactoryDeclaration<QuickOrderRootModule, never>;
    // (undocumented)
    static ɵinj: i0.ɵɵInjectorDeclaration<QuickOrderRootModule>;
    // (undocumented)
    static ɵmod: i0.ɵɵNgModuleDeclaration<QuickOrderRootModule, never, never, never>;
}

// (No @packageDocumentation comment for this package)

⚠️ Some entry points are currently impossible to analyze.

Read more

💰 How to debug problems?

Read more

Problem with import * as ___

Api-extractor doesn't support this namespace syntax.
Check if you really need to use namespace in the library. Try to avoid namespaces when possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
MVP Mandatory label: Used to define the MVP scope of the feature quick-order team/obelix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[MASTER] Quick Order
5 participants