diff --git a/core-libs/setup/package.json b/core-libs/setup/package.json index 84a5eeffcdf..4ae815b9507 100644 --- a/core-libs/setup/package.json +++ b/core-libs/setup/package.json @@ -1,6 +1,6 @@ { "name": "@spartacus/setup", - "version": "2211.29.1", + "version": "2211.30.0", "description": "Includes features that makes Spartacus and it's setup easier and streamlined.", "keywords": [ "spartacus", @@ -21,10 +21,10 @@ "peerDependencies": { "@angular/core": "^17.0.5", "@angular/ssr": "^17.0.5", - "@spartacus/cart": "2211.29.1", - "@spartacus/core": "2211.29.1", - "@spartacus/order": "2211.29.1", - "@spartacus/user": "2211.29.1" + "@spartacus/cart": "2211.30.0", + "@spartacus/core": "2211.30.0", + "@spartacus/order": "2211.30.0", + "@spartacus/user": "2211.30.0" }, "optionalDependencies": { "@angular/platform-server": "^17.0.5", diff --git a/feature-libs/asm/package.json b/feature-libs/asm/package.json index 9574a9aa1e4..4c4baa7b85a 100644 --- a/feature-libs/asm/package.json +++ b/feature-libs/asm/package.json @@ -1,6 +1,6 @@ { "name": "@spartacus/asm", - "version": "2211.29.1", + "version": "2211.30.0", "description": "ASM feature library for Spartacus", "keywords": [ "spartacus", @@ -32,14 +32,14 @@ "@ng-select/ng-select": "^12.0.4", "@ngrx/effects": "^17.0.1", "@ngrx/store": "^17.0.1", - "@spartacus/cart": "2211.29.1", - "@spartacus/core": "2211.29.1", - "@spartacus/order": "2211.29.1", - "@spartacus/schematics": "2211.29.1", - "@spartacus/storefinder": "2211.29.1", - "@spartacus/storefront": "2211.29.1", - "@spartacus/styles": "2211.29.1", - "@spartacus/user": "2211.29.1", + "@spartacus/cart": "2211.30.0", + "@spartacus/core": "2211.30.0", + "@spartacus/order": "2211.30.0", + "@spartacus/schematics": "2211.30.0", + "@spartacus/storefinder": "2211.30.0", + "@spartacus/storefront": "2211.30.0", + "@spartacus/styles": "2211.30.0", + "@spartacus/user": "2211.30.0", "rxjs": "^7.8.0" }, "publishConfig": { diff --git a/feature-libs/asm/styles/components/_asm-main-ui.component.scss b/feature-libs/asm/styles/components/_asm-main-ui.component.scss index 0a7904be848..665cf0b3922 100644 --- a/feature-libs/asm/styles/components/_asm-main-ui.component.scss +++ b/feature-libs/asm/styles/components/_asm-main-ui.component.scss @@ -89,8 +89,6 @@ // Top Bar .asm-bar { - color: #fff; - background-color: #354a5f; height: 48px; display: flex; padding: 0 2rem; diff --git a/feature-libs/asm/styles/components/_customer-selection.component.scss b/feature-libs/asm/styles/components/_customer-selection.component.scss index 32c3a4ce8fc..13736b488c1 100644 --- a/feature-libs/asm/styles/components/_customer-selection.component.scss +++ b/feature-libs/asm/styles/components/_customer-selection.component.scss @@ -41,7 +41,6 @@ @media (min-width: 575px) { margin-inline-end: 15px; - min-width: 20rem; margin-bottom: 0; min-width: 25rem; } diff --git a/feature-libs/cart/base/styles/components/_item-counter.scss b/feature-libs/cart/base/styles/components/_item-counter.scss index f6cf1219c9c..bb6057d907a 100644 --- a/feature-libs/cart/base/styles/components/_item-counter.scss +++ b/feature-libs/cart/base/styles/components/_item-counter.scss @@ -13,6 +13,7 @@ -moz-appearance: textfield; } } + &.readonly { button { display: none; @@ -77,8 +78,17 @@ font-weight: var(--cx-font-weight-bold); } + // TODO: The styles for ":disabled" selector should be deleted when "a11yItemCounterFocus" feature flag has been removed &:disabled { color: var(--cx-color-light); + cursor: not-allowed; + } + + @include forFeature('a11yItemCounterFocus') { + &[aria-disabled='true'] { + color: var(--cx-color-light); + cursor: not-allowed; + } } @include forFeature('a11yImproveContrast') { @@ -90,9 +100,15 @@ &:focus { box-shadow: 0 0 0 0; } + // TODO: The styles for ":disabled" selector should be deleted when "a11yItemCounterFocus" feature flag has been removed &:disabled { color: var(--cx-color-dark); } + @include forFeature('a11yItemCounterFocus') { + &[aria-disabled='true'] { + color: var(--cx-color-dark); + } + } } } diff --git a/feature-libs/cart/package.json b/feature-libs/cart/package.json index 7412f1aa97d..ded55aa678a 100644 --- a/feature-libs/cart/package.json +++ b/feature-libs/cart/package.json @@ -1,6 +1,6 @@ { "name": "@spartacus/cart", - "version": "2211.29.1", + "version": "2211.30.0", "description": "", "keywords": [ "spartacus", @@ -37,11 +37,11 @@ "@ng-select/ng-select": "^12.0.4", "@ngrx/effects": "^17.0.1", "@ngrx/store": "^17.0.1", - "@spartacus/core": "2211.29.1", - "@spartacus/schematics": "2211.29.1", - "@spartacus/storefront": "2211.29.1", - "@spartacus/styles": "2211.29.1", - "@spartacus/user": "2211.29.1", + "@spartacus/core": "2211.30.0", + "@spartacus/schematics": "2211.30.0", + "@spartacus/storefront": "2211.30.0", + "@spartacus/styles": "2211.30.0", + "@spartacus/user": "2211.30.0", "bootstrap": "^4.6.2", "rxjs": "^7.8.0" }, diff --git a/feature-libs/checkout/package.json b/feature-libs/checkout/package.json index 9daf3db9284..4635d3d663f 100644 --- a/feature-libs/checkout/package.json +++ b/feature-libs/checkout/package.json @@ -1,6 +1,6 @@ { "name": "@spartacus/checkout", - "version": "2211.29.1", + "version": "2211.30.0", "description": "Checkout feature library for Spartacus", "keywords": [ "spartacus", @@ -32,13 +32,13 @@ "@angular/router": "^17.0.5", "@ng-select/ng-select": "^12.0.4", "@ngrx/store": "^17.0.1", - "@spartacus/cart": "2211.29.1", - "@spartacus/core": "2211.29.1", - "@spartacus/order": "2211.29.1", - "@spartacus/schematics": "2211.29.1", - "@spartacus/storefront": "2211.29.1", - "@spartacus/styles": "2211.29.1", - "@spartacus/user": "2211.29.1", + "@spartacus/cart": "2211.30.0", + "@spartacus/core": "2211.30.0", + "@spartacus/order": "2211.30.0", + "@spartacus/schematics": "2211.30.0", + "@spartacus/storefront": "2211.30.0", + "@spartacus/styles": "2211.30.0", + "@spartacus/user": "2211.30.0", "bootstrap": "^4.6.2", "rxjs": "^7.8.0" }, diff --git a/feature-libs/checkout/schematics/add-checkout/__snapshots__/index_spec.ts.snap b/feature-libs/checkout/schematics/add-checkout/__snapshots__/index_spec.ts.snap index 961a71778f7..0229a6cd409 100644 --- a/feature-libs/checkout/schematics/add-checkout/__snapshots__/index_spec.ts.snap +++ b/feature-libs/checkout/schematics/add-checkout/__snapshots__/index_spec.ts.snap @@ -63,7 +63,7 @@ import { defaultCmsContentProviders, layoutConfig, mediaConfig } from "@spartacu }, }), provideConfig({ features: { - level: '2211.29' + level: '2211.30' } }), provideConfig(defaultB2bOccConfig)] }) @@ -514,7 +514,7 @@ import { defaultCmsContentProviders, layoutConfig, mediaConfig } from "@spartacu }, }), provideConfig({ features: { - level: '2211.29' + level: '2211.30' } }), provideConfig(defaultB2bOccConfig)] }) diff --git a/feature-libs/customer-ticketing/package.json b/feature-libs/customer-ticketing/package.json index 33e486a7fb7..d81d93ac357 100644 --- a/feature-libs/customer-ticketing/package.json +++ b/feature-libs/customer-ticketing/package.json @@ -1,6 +1,6 @@ { "name": "@spartacus/customer-ticketing", - "version": "2211.29.1", + "version": "2211.30.0", "description": "Customer-Ticketing library for Spartacus", "keywords": [ "spartacus", @@ -30,11 +30,11 @@ "@angular/core": "^17.0.5", "@angular/forms": "^17.0.5", "@angular/router": "^17.0.5", - "@spartacus/cart": "2211.29.1", - "@spartacus/core": "2211.29.1", - "@spartacus/schematics": "2211.29.1", - "@spartacus/storefront": "2211.29.1", - "@spartacus/styles": "2211.29.1", + "@spartacus/cart": "2211.30.0", + "@spartacus/core": "2211.30.0", + "@spartacus/schematics": "2211.30.0", + "@spartacus/storefront": "2211.30.0", + "@spartacus/styles": "2211.30.0", "rxjs": "^7.8.0" }, "publishConfig": { diff --git a/feature-libs/estimated-delivery-date/package.json b/feature-libs/estimated-delivery-date/package.json index e18895481f0..371912a56b9 100644 --- a/feature-libs/estimated-delivery-date/package.json +++ b/feature-libs/estimated-delivery-date/package.json @@ -1,6 +1,6 @@ { "name": "@spartacus/estimated-delivery-date", - "version": "2211.29.1", + "version": "2211.30.0", "description": "Estimated Delivery Date library for Spartacus", "keywords": [ "spartacus", @@ -28,12 +28,12 @@ "@angular-devkit/schematics": "^17.0.5", "@angular/common": "^17.0.5", "@angular/core": "^17.0.5", - "@spartacus/cart": "2211.29.1", - "@spartacus/core": "2211.29.1", - "@spartacus/order": "2211.29.1", - "@spartacus/schematics": "2211.29.1", - "@spartacus/storefront": "2211.29.1", - "@spartacus/styles": "2211.29.1", + "@spartacus/cart": "2211.30.0", + "@spartacus/core": "2211.30.0", + "@spartacus/order": "2211.30.0", + "@spartacus/schematics": "2211.30.0", + "@spartacus/storefront": "2211.30.0", + "@spartacus/styles": "2211.30.0", "rxjs": "^7.8.0" }, "publishConfig": { diff --git a/feature-libs/order/package.json b/feature-libs/order/package.json index 8798cb04477..d182eeb9661 100644 --- a/feature-libs/order/package.json +++ b/feature-libs/order/package.json @@ -1,6 +1,6 @@ { "name": "@spartacus/order", - "version": "2211.29.1", + "version": "2211.30.0", "description": "Order feature library for Spartacus", "keywords": [ "spartacus", @@ -33,13 +33,13 @@ "@ng-select/ng-select": "^12.0.4", "@ngrx/effects": "^17.0.1", "@ngrx/store": "^17.0.1", - "@spartacus/cart": "2211.29.1", - "@spartacus/core": "2211.29.1", - "@spartacus/pdf-invoices": "2211.29.1", - "@spartacus/schematics": "2211.29.1", - "@spartacus/storefront": "2211.29.1", - "@spartacus/styles": "2211.29.1", - "@spartacus/user": "2211.29.1", + "@spartacus/cart": "2211.30.0", + "@spartacus/core": "2211.30.0", + "@spartacus/pdf-invoices": "2211.30.0", + "@spartacus/schematics": "2211.30.0", + "@spartacus/storefront": "2211.30.0", + "@spartacus/styles": "2211.30.0", + "@spartacus/user": "2211.30.0", "rxjs": "^7.8.0" }, "publishConfig": { diff --git a/feature-libs/organization/package.json b/feature-libs/organization/package.json index 7387a6f25f7..01977428897 100644 --- a/feature-libs/organization/package.json +++ b/feature-libs/organization/package.json @@ -1,6 +1,6 @@ { "name": "@spartacus/organization", - "version": "2211.29.1", + "version": "2211.30.0", "description": "Organization library for Spartacus", "keywords": [ "spartacus", @@ -33,13 +33,13 @@ "@ng-select/ng-select": "^12.0.4", "@ngrx/effects": "^17.0.1", "@ngrx/store": "^17.0.1", - "@spartacus/cart": "2211.29.1", - "@spartacus/core": "2211.29.1", - "@spartacus/order": "2211.29.1", - "@spartacus/schematics": "2211.29.1", - "@spartacus/storefront": "2211.29.1", - "@spartacus/styles": "2211.29.1", - "@spartacus/user": "2211.29.1", + "@spartacus/cart": "2211.30.0", + "@spartacus/core": "2211.30.0", + "@spartacus/order": "2211.30.0", + "@spartacus/schematics": "2211.30.0", + "@spartacus/storefront": "2211.30.0", + "@spartacus/styles": "2211.30.0", + "@spartacus/user": "2211.30.0", "bootstrap": "^4.6.2", "rxjs": "^7.8.0" }, diff --git a/feature-libs/organization/schematics/add-organization/__snapshots__/index_spec.ts.snap b/feature-libs/organization/schematics/add-organization/__snapshots__/index_spec.ts.snap index b8925bd05a0..8b4cfc1d92d 100644 --- a/feature-libs/organization/schematics/add-organization/__snapshots__/index_spec.ts.snap +++ b/feature-libs/organization/schematics/add-organization/__snapshots__/index_spec.ts.snap @@ -51,7 +51,7 @@ import { defaultCmsContentProviders, layoutConfig, mediaConfig } from "@spartacu }, }), provideConfig({ features: { - level: '2211.29' + level: '2211.30' } }), provideConfig(defaultB2bOccConfig)] }) @@ -270,7 +270,7 @@ import { defaultCmsContentProviders, layoutConfig, mediaConfig } from "@spartacu }, }), provideConfig({ features: { - level: '2211.29' + level: '2211.30' } }), provideConfig(defaultB2bOccConfig)] }) @@ -489,7 +489,7 @@ import { defaultCmsContentProviders, layoutConfig, mediaConfig } from "@spartacu }, }), provideConfig({ features: { - level: '2211.29' + level: '2211.30' } }), provideConfig(defaultB2bOccConfig)] }) @@ -708,7 +708,7 @@ import { defaultCmsContentProviders, layoutConfig, mediaConfig } from "@spartacu }, }), provideConfig({ features: { - level: '2211.29' + level: '2211.30' } }), provideConfig(defaultB2bOccConfig)] }) @@ -927,7 +927,7 @@ import { defaultCmsContentProviders, layoutConfig, mediaConfig } from "@spartacu }, }), provideConfig({ features: { - level: '2211.29' + level: '2211.30' } }), provideConfig(defaultB2bOccConfig)] }) diff --git a/feature-libs/pdf-invoices/package.json b/feature-libs/pdf-invoices/package.json index c944f8991a0..ea58c701722 100644 --- a/feature-libs/pdf-invoices/package.json +++ b/feature-libs/pdf-invoices/package.json @@ -1,6 +1,6 @@ { "name": "@spartacus/pdf-invoices", - "version": "2211.29.1", + "version": "2211.30.0", "description": "Invoices library for Spartacus", "keywords": [ "spartacus", @@ -29,10 +29,10 @@ "@angular/common": "^17.0.5", "@angular/core": "^17.0.5", "@angular/forms": "^17.0.5", - "@spartacus/core": "2211.29.1", - "@spartacus/schematics": "2211.29.1", - "@spartacus/storefront": "2211.29.1", - "@spartacus/styles": "2211.29.1", + "@spartacus/core": "2211.30.0", + "@spartacus/schematics": "2211.30.0", + "@spartacus/storefront": "2211.30.0", + "@spartacus/styles": "2211.30.0", "rxjs": "^7.8.0" }, "publishConfig": { diff --git a/feature-libs/pickup-in-store/package.json b/feature-libs/pickup-in-store/package.json index 38d9a4f5de3..4d72dc25bc7 100644 --- a/feature-libs/pickup-in-store/package.json +++ b/feature-libs/pickup-in-store/package.json @@ -1,6 +1,6 @@ { "name": "@spartacus/pickup-in-store", - "version": "2211.29.1", + "version": "2211.30.0", "description": "", "keywords": [ "spartacus", @@ -32,14 +32,14 @@ "@angular/router": "^17.0.5", "@ngrx/effects": "^17.0.1", "@ngrx/store": "^17.0.1", - "@spartacus/cart": "2211.29.1", - "@spartacus/core": "2211.29.1", - "@spartacus/order": "2211.29.1", - "@spartacus/schematics": "2211.29.1", - "@spartacus/storefinder": "2211.29.1", - "@spartacus/storefront": "2211.29.1", - "@spartacus/styles": "2211.29.1", - "@spartacus/user": "2211.29.1", + "@spartacus/cart": "2211.30.0", + "@spartacus/core": "2211.30.0", + "@spartacus/order": "2211.30.0", + "@spartacus/schematics": "2211.30.0", + "@spartacus/storefinder": "2211.30.0", + "@spartacus/storefront": "2211.30.0", + "@spartacus/styles": "2211.30.0", + "@spartacus/user": "2211.30.0", "bootstrap": "^4.6.2", "rxjs": "^7.8.0" }, diff --git a/feature-libs/product-configurator/package.json b/feature-libs/product-configurator/package.json index 08be7486e2b..87b3717aded 100644 --- a/feature-libs/product-configurator/package.json +++ b/feature-libs/product-configurator/package.json @@ -1,6 +1,6 @@ { "name": "@spartacus/product-configurator", - "version": "2211.29.1", + "version": "2211.30.0", "description": "Product configurator feature library for Spartacus", "keywords": [ "spartacus", @@ -33,13 +33,13 @@ "@ng-select/ng-select": "^12.0.4", "@ngrx/effects": "^17.0.1", "@ngrx/store": "^17.0.1", - "@spartacus/cart": "2211.29.1", - "@spartacus/checkout": "2211.29.1", - "@spartacus/core": "2211.29.1", - "@spartacus/order": "2211.29.1", - "@spartacus/schematics": "2211.29.1", - "@spartacus/storefront": "2211.29.1", - "@spartacus/styles": "2211.29.1", + "@spartacus/cart": "2211.30.0", + "@spartacus/checkout": "2211.30.0", + "@spartacus/core": "2211.30.0", + "@spartacus/order": "2211.30.0", + "@spartacus/schematics": "2211.30.0", + "@spartacus/storefront": "2211.30.0", + "@spartacus/styles": "2211.30.0", "rxjs": "^7.8.0" }, "publishConfig": { diff --git a/feature-libs/product-configurator/rulebased/components/attribute/types/multi-selection-image/configurator-attribute-multi-selection-image.component.spec.ts b/feature-libs/product-configurator/rulebased/components/attribute/types/multi-selection-image/configurator-attribute-multi-selection-image.component.spec.ts index ec6728bd71d..11512ee1324 100644 --- a/feature-libs/product-configurator/rulebased/components/attribute/types/multi-selection-image/configurator-attribute-multi-selection-image.component.spec.ts +++ b/feature-libs/product-configurator/rulebased/components/attribute/types/multi-selection-image/configurator-attribute-multi-selection-image.component.spec.ts @@ -241,6 +241,7 @@ describe('ConfiguratorAttributeMultiSelectionImageComponent', () => { expect(description.nativeElement.innerText).toBe( (component.attribute.values ?? [{ description: '' }])[1]?.description ); + infoButton.click(); // hide popover after test again }); it('should mark two values as selected', () => { diff --git a/feature-libs/product-configurator/rulebased/components/attribute/types/single-selection-image/configurator-attribute-single-selection-image.component.spec.ts b/feature-libs/product-configurator/rulebased/components/attribute/types/single-selection-image/configurator-attribute-single-selection-image.component.spec.ts index 47746608851..fb1a21c26d0 100644 --- a/feature-libs/product-configurator/rulebased/components/attribute/types/single-selection-image/configurator-attribute-single-selection-image.component.spec.ts +++ b/feature-libs/product-configurator/rulebased/components/attribute/types/single-selection-image/configurator-attribute-single-selection-image.component.spec.ts @@ -222,6 +222,7 @@ describe('ConfiguratorAttributeSingleSelectionImageComponent', () => { expect(description.nativeElement.innerText).toBe( (component.attribute.values ?? [{}])[1].description ); + infoButton.click(); // hide popover after test again }); it('should init with val3', () => { diff --git a/feature-libs/product-configurator/rulebased/components/form/configurator-form.component.spec.ts b/feature-libs/product-configurator/rulebased/components/form/configurator-form.component.spec.ts index d1bb77eaa51..37efa156106 100644 --- a/feature-libs/product-configurator/rulebased/components/form/configurator-form.component.spec.ts +++ b/feature-libs/product-configurator/rulebased/components/form/configurator-form.component.spec.ts @@ -31,6 +31,7 @@ import { productConfiguration } from '../../testing/configurator-test-data'; import { ConfiguratorTestUtils } from '../../testing/configurator-test-utils'; import { ConfiguratorAttributeHeaderComponent } from '../attribute/header/configurator-attribute-header.component'; import { ConfiguratorFormComponent } from './configurator-form.component'; +import { KeyboardFocusService } from '@spartacus/storefront'; @Component({ selector: 'cx-configurator-group', @@ -258,6 +259,7 @@ let component: ConfiguratorFormComponent; let htmlElem: HTMLElement; let configExpertModeService: ConfiguratorExpertModeService; let hasConfigurationConflictsObservable: Observable = EMPTY; +let keyboardFocusService: KeyboardFocusService; describe('ConfigurationFormComponent', () => { beforeEach(waitForAsync(() => { @@ -347,6 +349,10 @@ describe('ConfigurationFormComponent', () => { LaunchDialogService as Type ); spyOn(launchDialogService, 'openDialogAndSubscribe').and.callThrough(); + keyboardFocusService = TestBed.inject( + KeyboardFocusService as Type + ); + spyOn(keyboardFocusService, 'clear').and.callThrough(); }); describe('resolve issues navigation', () => { @@ -421,6 +427,14 @@ describe('ConfigurationFormComponent', () => { }); }); + it('should reset persisted focus when UI is opened without resolve issue mode', () => { + routerStateObservable = mockRouterStateWithQueryParams({ + resolveIssues: 'false', + }); + createComponentWithData(); + expect(keyboardFocusService.clear).toHaveBeenCalledTimes(1); + }); + describe('Rendering', () => { it('should render ghost view if no data is present', () => { createComponentWithoutData(); diff --git a/feature-libs/product-configurator/rulebased/components/form/configurator-form.component.ts b/feature-libs/product-configurator/rulebased/components/form/configurator-form.component.ts index 580b92349af..fbc0a2a2ee6 100644 --- a/feature-libs/product-configurator/rulebased/components/form/configurator-form.component.ts +++ b/feature-libs/product-configurator/rulebased/components/form/configurator-form.component.ts @@ -9,13 +9,18 @@ import { Component, OnDestroy, OnInit, + inject, } from '@angular/core'; import { GlobalMessageService, GlobalMessageType } from '@spartacus/core'; import { ConfiguratorRouter, ConfiguratorRouterExtractorService, } from '@spartacus/product-configurator/common'; -import { LAUNCH_CALLER, LaunchDialogService } from '@spartacus/storefront'; +import { + LAUNCH_CALLER, + LaunchDialogService, + KeyboardFocusService, +} from '@spartacus/storefront'; import { Observable, Subscription } from 'rxjs'; import { delay, @@ -38,6 +43,7 @@ import { ConfiguratorExpertModeService } from '../../core/services/configurator- export class ConfiguratorFormComponent implements OnInit, OnDestroy { protected subscription = new Subscription(); + protected keyboardFocusService = inject(KeyboardFocusService); routerData$: Observable = this.configRouterExtractorService.extractRouterData(); @@ -157,6 +163,9 @@ export class ConfiguratorFormComponent implements OnInit, OnDestroy { ); } }); + } else { + // Clear persisted focus before entering the configurator UI + this.keyboardFocusService.clear(); } if (routingData.expMode) { diff --git a/feature-libs/product-configurator/rulebased/components/overview-menu/configurator-overview-menu.component.spec.ts b/feature-libs/product-configurator/rulebased/components/overview-menu/configurator-overview-menu.component.spec.ts index 704f18c8073..f9f4ef3483a 100644 --- a/feature-libs/product-configurator/rulebased/components/overview-menu/configurator-overview-menu.component.spec.ts +++ b/feature-libs/product-configurator/rulebased/components/overview-menu/configurator-overview-menu.component.spec.ts @@ -124,10 +124,6 @@ describe('ConfigurationOverviewMenuComponent', () => { }).compileComponents(); })); - afterEach(() => { - document.body.removeChild(htmlElem); - }); - it('should create component', () => { initialize(); expect(component).toBeDefined(); @@ -417,12 +413,6 @@ describe('ConfigurationOverviewMenuComponent', () => { initialize(); }); - afterEach(() => { - groups?.forEach((group: any) => { - ConfiguratorTestUtils.remove(group); - }); - }); - it('should not get menu item to highlight because getElements method return undefined', () => { spyOn(configuratorStorefrontUtilsService, 'getElements').and.returnValue( undefined @@ -435,10 +425,7 @@ describe('ConfigurationOverviewMenuComponent', () => { it('should not get menu item to highlight because getScrollY method return undefined', () => { groups = createElements('div'); - document.querySelectorAll = jasmine - .createSpy('div.cx-group') - .and.returnValue(groups); - + spyOn(document, 'querySelectorAll').and.returnValue(groups); spyOn(configuratorStorefrontUtilsService, 'getElements').and.returnValue( groups ); @@ -456,10 +443,7 @@ describe('ConfigurationOverviewMenuComponent', () => { it('should get menu item to highlight', () => { groups = createElements('div'); - document.querySelectorAll = jasmine - .createSpy('div.cx-group') - .and.returnValue(groups); - + spyOn(document, 'querySelectorAll').and.returnValue(groups); spyOn(configuratorStorefrontUtilsService, 'getElements').and.returnValue( groups ); diff --git a/feature-libs/product-configurator/rulebased/components/service/configurator-storefront-utils.service.spec.ts b/feature-libs/product-configurator/rulebased/components/service/configurator-storefront-utils.service.spec.ts index c70316bcab7..2afd3a44e70 100644 --- a/feature-libs/product-configurator/rulebased/components/service/configurator-storefront-utils.service.spec.ts +++ b/feature-libs/product-configurator/rulebased/components/service/configurator-storefront-utils.service.spec.ts @@ -21,6 +21,23 @@ import { Configurator } from '../../core/model/configurator.model'; import { ConfiguratorTestUtils } from '../../testing/configurator-test-utils'; import { ConfiguratorStorefrontUtilsService } from './configurator-storefront-utils.service'; +let mockedWindow: { + innerWidth?: number; + innerHeight?: number; + scrollY?: number; + scroll(): void; +} = { + innerWidth: 1000, + innerHeight: 1000, + scrollY: 1000, + scroll() {}, +}; +class MockedWindowRef extends WindowRef { + get nativeWindow(): Window | undefined { + return this.isBrowser() ? mockedWindow : undefined; + } +} + let isGroupVisited: Observable = of(false); const testSelector = 'test-configurator-overview-menu'; @@ -119,7 +136,6 @@ describe('ConfiguratorStorefrontUtilsService', () => { ); let windowRef: WindowRef; let keyboardFocusService: KeyboardFocusService; - let querySelectorOriginal: any; beforeEach(() => { mockRouterState.state.params.displayOnly = false; @@ -148,22 +164,26 @@ describe('ConfiguratorStorefrontUtilsService', () => { provide: ProductConnector, useValue: MockProductConnector, }, + { provide: WindowRef, useClass: MockedWindowRef }, ], schemas: [CUSTOM_ELEMENTS_SCHEMA], }); classUnderTest = TestBed.inject(ConfiguratorStorefrontUtilsService); fixture = TestBed.createComponent(MockComponent); htmlElem = fixture.nativeElement; - windowRef = TestBed.inject(WindowRef as Type); + windowRef = TestBed.inject(WindowRef); + mockedWindow.innerHeight = 1000; + mockedWindow.innerWidth = 1000; + mockedWindow.scrollY = 1000; keyboardFocusService = TestBed.inject( KeyboardFocusService as Type ); - querySelectorOriginal = document.querySelector; }); afterEach(() => { - document.querySelector = querySelectorOriginal; - document.body.removeChild(htmlElem); + if (htmlElem) { + document.body.removeChild(htmlElem); + } }); it('should be created', () => { @@ -181,9 +201,7 @@ describe('ConfiguratorStorefrontUtilsService', () => { it('should scroll to element', () => { const theElement = document.createElement('div'); - document.querySelector = jasmine - .createSpy('HTML Element') - .and.returnValue(theElement); + spyOn(windowRef.document, 'querySelector').and.returnValue(theElement); spyOn(theElement, 'getBoundingClientRect').and.returnValue( new DOMRect(100, 2000, 100, 100) ); @@ -315,9 +333,9 @@ describe('ConfiguratorStorefrontUtilsService', () => { it('should delegate to keyboard focus service', () => { spyOn(windowRef, 'isBrowser').and.returnValue(true); const focusedElements = createFocusedElements('ATTR', 2, 3); - document.querySelector = jasmine - .createSpy('HTML Element') - .and.returnValue(focusedElements); + spyOn(windowRef.document, 'querySelector').and.returnValue( + focusedElements[0] + ); spyOn(keyboardFocusService, 'findFocusable').and.returnValue( focusedElements ); @@ -327,9 +345,7 @@ describe('ConfiguratorStorefrontUtilsService', () => { it('should not delegate to keyboard focus service because form is undefined', () => { spyOn(windowRef, 'isBrowser').and.returnValue(true); - document.querySelector = jasmine - .createSpy('HTML Element') - .and.returnValue(undefined); + spyOn(windowRef.document, 'querySelector').and.returnValue(undefined); spyOn(keyboardFocusService, 'findFocusable').and.returnValue([]); classUnderTest.focusFirstActiveElement('elementSelector'); expect(keyboardFocusService.findFocusable).toHaveBeenCalledTimes(0); @@ -345,9 +361,9 @@ describe('ConfiguratorStorefrontUtilsService', () => { it('should not delegate to keyboard focus service because keyboard focus service returns no focusable elements', () => { spyOn(windowRef, 'isBrowser').and.returnValue(true); const focusedElements = createFocusedElements('ATTR', 2, 3); - document.querySelector = jasmine - .createSpy('HTML Element') - .and.returnValue(focusedElements); + spyOn(windowRef.document, 'querySelector').and.returnValue( + focusedElements[0] + ); spyOn(keyboardFocusService, 'findFocusable').and.returnValue([]); classUnderTest.focusFirstActiveElement('elementSelector'); expect(keyboardFocusService.findFocusable).toHaveBeenCalledTimes(1); @@ -401,9 +417,9 @@ describe('ConfiguratorStorefrontUtilsService', () => { .queryAll(By.css('label')) .map((el) => el.nativeNode); - document.querySelector = jasmine - .createSpy('HTML Element') - .and.returnValue(focusedElements); + spyOn(windowRef.document, 'querySelector').and.returnValue( + focusedElements + ); }); it('should not set focus because attribute does not contain any values', () => { @@ -465,9 +481,7 @@ describe('ConfiguratorStorefrontUtilsService', () => { spyOn(keyboardFocusService, 'findFocusable').and.returnValue( focusedElements ); - document.querySelector = jasmine - .createSpy('HTML Element') - .and.returnValue(undefined); + asSpy(windowRef.document.querySelector).and.returnValue(undefined); verify(focusedElements); }); @@ -533,9 +547,7 @@ describe('ConfiguratorStorefrontUtilsService', () => { it('should get HTML element based on query selector', () => { spyOn(windowRef, 'isBrowser').and.returnValue(true); const theElement = document.createElement('elementMock'); - document.querySelector = jasmine - .createSpy('HTML Element') - .and.returnValue(theElement); + spyOn(windowRef.document, 'querySelector').and.returnValue(theElement); expect(classUnderTest.getElement('elementMock')).toEqual(theElement); }); @@ -544,9 +556,7 @@ describe('ConfiguratorStorefrontUtilsService', () => { describe('changeStyling', () => { it('should change styling of HTML element', () => { const theElement = document.createElement('elementMock'); - document.querySelector = jasmine - .createSpy('HTML Element') - .and.returnValue(undefined); + spyOn(windowRef.document, 'querySelector').and.returnValue(undefined); classUnderTest.changeStyling('elementMock', 'position', 'sticky'); expect(theElement.style.position).not.toEqual('sticky'); @@ -554,9 +564,7 @@ describe('ConfiguratorStorefrontUtilsService', () => { it('should change styling of HTML element', () => { const theElement = document.createElement('elementMock'); - document.querySelector = jasmine - .createSpy('HTML Element') - .and.returnValue(theElement); + spyOn(windowRef.document, 'querySelector').and.returnValue(theElement); classUnderTest.changeStyling('elementMock', 'position', 'sticky'); expect(theElement.style.position).toEqual('sticky'); @@ -568,9 +576,7 @@ describe('ConfiguratorStorefrontUtilsService', () => { spyOn(windowRef, 'isBrowser').and.returnValue(true); const theElement = document.createElement('elementMock'); theElement.style.position = 'sticky'; - document.querySelector = jasmine - .createSpy('HTML Element') - .and.returnValue(undefined); + spyOn(windowRef.document, 'querySelector').and.returnValue(undefined); classUnderTest.removeStyling('elementMock', 'position'); expect(theElement.style.position).toEqual('sticky'); @@ -580,9 +586,7 @@ describe('ConfiguratorStorefrontUtilsService', () => { spyOn(windowRef, 'isBrowser').and.returnValue(true); const theElement = document.createElement('elementMock'); theElement.style.position = 'sticky'; - document.querySelector = jasmine - .createSpy('HTML Element') - .and.returnValue(theElement); + spyOn(windowRef.document, 'querySelector').and.returnValue(theElement); classUnderTest.removeStyling('elementMock', 'position'); expect(theElement.style.position).toBe(''); @@ -612,9 +616,7 @@ describe('ConfiguratorStorefrontUtilsService', () => { spyOn(windowRef, 'isBrowser').and.returnValue(true); const elements: Array = createElements('section', 10); - document.querySelectorAll = jasmine - .createSpy('section') - .and.returnValue(elements); + spyOn(document, 'querySelectorAll').and.returnValue(elements); const htmlElements = classUnderTest.getElements('section'); @@ -634,7 +636,7 @@ describe('ConfiguratorStorefrontUtilsService', () => { it('should return number of pixels that the document is currently scrolled vertically', () => { spyOn(windowRef, 'isBrowser').and.returnValue(true); - spyOnProperty(window, 'scrollY').and.returnValue(250); + mockedWindow.scrollY = 250; const nativeWindow = windowRef.nativeWindow; if (nativeWindow) { expect(classUnderTest.getVerticallyScrolledPixels()).toBe(250); @@ -644,9 +646,7 @@ describe('ConfiguratorStorefrontUtilsService', () => { describe('hasScrollbar', () => { it('should return false because element is undefined', () => { - document.querySelector = jasmine - .createSpy('HTML Element') - .and.returnValue(undefined); + spyOn(windowRef.document, 'querySelector').and.returnValue(undefined); expect(classUnderTest.hasScrollbar('elementMock')).toBe(false); }); @@ -718,27 +718,25 @@ describe('ConfiguratorStorefrontUtilsService', () => { label.style.height = '10px'; }); - spyOnProperty(window, 'innerWidth').and.returnValue(100); + mockedWindow.innerWidth = 100; expect(classUnderTest['isInViewport'](form)).toBe(false); }); - // TODO: CXSPA-8270 - fix failing tests on Azure & GiHub - xit("should return true because window's innerWith is known", () => { + it("should return true because window's innerWith is known", () => { form.style.display = 'flex'; form.style.flexDirection = 'column'; - spyOnProperty(window, 'innerWidth').and.returnValue(1000); + mockedWindow.innerWidth = 1000; expect(classUnderTest['isInViewport'](form)).toBe(true); }); - // TODO: CXSPA-8270 - fix failing tests on Azure & GiHub - xit('should return true because clientWidth of element is known and its right is less than its width', () => { + it('should return true because clientWidth of element is known and its right is less than its width', () => { form.style.display = 'flex'; form.style.flexDirection = 'column'; - spyOnProperty(window, 'innerWidth').and.returnValue(undefined); + mockedWindow.innerWidth = undefined; expect(classUnderTest['isInViewport'](form)).toBe(true); }); @@ -748,7 +746,7 @@ describe('ConfiguratorStorefrontUtilsService', () => { form.style.flexDirection = 'column'; form.style.height = '1000px'; - spyOnProperty(window, 'innerHeight').and.returnValue(undefined); + mockedWindow.innerHeight = undefined; expect(classUnderTest['isInViewport'](form)).toBe(true); }); @@ -772,15 +770,14 @@ describe('ConfiguratorStorefrontUtilsService', () => { expect(classUnderTest['getHeight']('unknown-query')).toBe(0); }); - it('should return zero because form is not im viewport', () => { - spyOnProperty(window, 'innerWidth').and.returnValue(100); + it('should return zero because form is not in viewport', () => { + mockedWindow.innerWidth = 100; expect(classUnderTest['getHeight']('cx-configurator-form')).toBe(0); }); - // TODO: CXSPA-8270 - fix failing tests on Azure & GiHub - xit('should return offsetHeight of the element because form is not im viewport', () => { - spyOnProperty(window, 'innerWidth').and.returnValue(1000); + it('should return offsetHeight of the element because form is not in viewport', () => { + mockedWindow.innerWidth = 1000; expect( classUnderTest['getHeight']('cx-configurator-form') @@ -811,7 +808,7 @@ describe('ConfiguratorStorefrontUtilsService', () => { addToCart = document.createElement('cx-configurator-add-to-cart-button'); document.body.append(addToCart); - spyOnProperty(window, 'innerWidth').and.returnValue(1000); + mockedWindow.innerWidth = 1000; } it('should return zero because isBrowser is undefined', () => { @@ -884,9 +881,7 @@ describe('ConfiguratorStorefrontUtilsService', () => { it('should not ensure visibility of the element', () => { spyOn(windowRef, 'isBrowser').and.returnValue(false); ovMenu = document.createElement('cx-configurator-overview-menu'); - document.querySelector = jasmine - .createSpy('HTML Element') - .and.returnValue(ovMenu); + spyOn(windowRef.document, 'querySelector').and.returnValue(ovMenu); classUnderTest.ensureElementVisible( 'cx-configurator-overview-menu', undefined @@ -995,4 +990,8 @@ describe('ConfiguratorStorefrontUtilsService', () => { expect(classUnderTest.isLastSelected('name', 'code')).toBe(false); }); }); + + function asSpy(f: any) { + return f; + } }); diff --git a/feature-libs/product-configurator/rulebased/styles/_configurator-conflict-suggestion.scss b/feature-libs/product-configurator/rulebased/styles/_configurator-conflict-suggestion.scss index 47e7ac84bc7..2437661eab5 100644 --- a/feature-libs/product-configurator/rulebased/styles/_configurator-conflict-suggestion.scss +++ b/feature-libs/product-configurator/rulebased/styles/_configurator-conflict-suggestion.scss @@ -28,7 +28,6 @@ .cx-title { font-weight: bold; - padding-inline-start: 5px; padding-inline-end: 5px; padding-inline-start: 0px; } diff --git a/feature-libs/product-configurator/rulebased/styles/_configurator-group-menu.scss b/feature-libs/product-configurator/rulebased/styles/_configurator-group-menu.scss index 4871da8de53..1f7d30e7ae5 100644 --- a/feature-libs/product-configurator/rulebased/styles/_configurator-group-menu.scss +++ b/feature-libs/product-configurator/rulebased/styles/_configurator-group-menu.scss @@ -151,7 +151,6 @@ text-decoration: none; color: var(--cx-color-text); border: none; - background-color: transparent; outline-offset: 0px; width: 100%; diff --git a/feature-libs/product-configurator/schematics/add-product-configurator/__snapshots__/index_spec.ts.snap b/feature-libs/product-configurator/schematics/add-product-configurator/__snapshots__/index_spec.ts.snap index ab5c5789869..e5c6ebe52f0 100644 --- a/feature-libs/product-configurator/schematics/add-product-configurator/__snapshots__/index_spec.ts.snap +++ b/feature-libs/product-configurator/schematics/add-product-configurator/__snapshots__/index_spec.ts.snap @@ -58,7 +58,7 @@ import { defaultCmsContentProviders, layoutConfig, mediaConfig } from "@spartacu }, }), provideConfig({ features: { - level: '2211.29' + level: '2211.30' } }), provideConfig(defaultB2bOccConfig)] }) @@ -307,7 +307,7 @@ import { defaultCmsContentProviders, layoutConfig, mediaConfig } from "@spartacu }, }), provideConfig({ features: { - level: '2211.29' + level: '2211.30' } }), provideConfig(defaultB2bOccConfig)] }) @@ -542,7 +542,7 @@ import { defaultCmsContentProviders, layoutConfig, mediaConfig } from "@spartacu }, }), provideConfig({ features: { - level: '2211.29' + level: '2211.30' } })] }) diff --git a/feature-libs/product-multi-dimensional/package.json b/feature-libs/product-multi-dimensional/package.json index 5dc40ed7785..7681f1c4d0d 100644 --- a/feature-libs/product-multi-dimensional/package.json +++ b/feature-libs/product-multi-dimensional/package.json @@ -1,6 +1,6 @@ { "name": "@spartacus/product-multi-dimensional", - "version": "2211.29.1", + "version": "2211.30.0", "description": "Product Multi-Dimensional library for Spartacus", "keywords": [ "spartacus", @@ -31,10 +31,10 @@ "@angular/forms": "^17.0.5", "@angular/router": "^17.0.5", "@ng-select/ng-select": "^12.0.4", - "@spartacus/core": "2211.29.1", - "@spartacus/schematics": "2211.29.1", - "@spartacus/storefront": "2211.29.1", - "@spartacus/styles": "2211.29.1", + "@spartacus/core": "2211.30.0", + "@spartacus/schematics": "2211.30.0", + "@spartacus/storefront": "2211.30.0", + "@spartacus/styles": "2211.30.0", "bootstrap": "^4.6.2", "rxjs": "^7.8.0" }, diff --git a/feature-libs/product/package.json b/feature-libs/product/package.json index 70305724696..5ce0f22e7da 100644 --- a/feature-libs/product/package.json +++ b/feature-libs/product/package.json @@ -1,6 +1,6 @@ { "name": "@spartacus/product", - "version": "2211.29.1", + "version": "2211.30.0", "description": "Product library for Spartacus", "keywords": [ "spartacus", @@ -29,10 +29,10 @@ "@angular/common": "^17.0.5", "@angular/core": "^17.0.5", "@angular/router": "^17.0.5", - "@spartacus/core": "2211.29.1", - "@spartacus/schematics": "2211.29.1", - "@spartacus/storefront": "2211.29.1", - "@spartacus/styles": "2211.29.1", + "@spartacus/core": "2211.30.0", + "@spartacus/schematics": "2211.30.0", + "@spartacus/storefront": "2211.30.0", + "@spartacus/styles": "2211.30.0", "bootstrap": "^4.6.2", "rxjs": "^7.8.0" }, diff --git a/feature-libs/product/schematics/add-product/__snapshots__/index_spec.ts.snap b/feature-libs/product/schematics/add-product/__snapshots__/index_spec.ts.snap index 955ea4a76a1..cf9c46834c9 100644 --- a/feature-libs/product/schematics/add-product/__snapshots__/index_spec.ts.snap +++ b/feature-libs/product/schematics/add-product/__snapshots__/index_spec.ts.snap @@ -51,7 +51,7 @@ import { defaultCmsContentProviders, layoutConfig, mediaConfig } from "@spartacu }, }), provideConfig({ features: { - level: '2211.29' + level: '2211.30' } }), provideConfig(defaultB2bOccConfig)] }) @@ -270,7 +270,7 @@ import { defaultCmsContentProviders, layoutConfig, mediaConfig } from "@spartacu }, }), provideConfig({ features: { - level: '2211.29' + level: '2211.30' } }), provideConfig(defaultB2bOccConfig)] }) diff --git a/feature-libs/qualtrics/package.json b/feature-libs/qualtrics/package.json index a90c743abd5..7d2f045fd0f 100644 --- a/feature-libs/qualtrics/package.json +++ b/feature-libs/qualtrics/package.json @@ -1,6 +1,6 @@ { "name": "@spartacus/qualtrics", - "version": "2211.29.1", + "version": "2211.30.0", "description": "Qualtrics library for Spartacus", "keywords": [ "spartacus", @@ -30,9 +30,9 @@ "@angular-devkit/schematics": "^17.0.5", "@angular/common": "^17.0.5", "@angular/core": "^17.0.5", - "@spartacus/core": "2211.29.1", - "@spartacus/schematics": "2211.29.1", - "@spartacus/styles": "2211.29.1", + "@spartacus/core": "2211.30.0", + "@spartacus/schematics": "2211.30.0", + "@spartacus/styles": "2211.30.0", "bootstrap": "^4.6.2", "rxjs": "^7.8.0" }, diff --git a/feature-libs/quote/core/services/quote-storefront-utils.service.spec.ts b/feature-libs/quote/core/services/quote-storefront-utils.service.spec.ts index f58273d61e7..dbeb4c399ba 100644 --- a/feature-libs/quote/core/services/quote-storefront-utils.service.spec.ts +++ b/feature-libs/quote/core/services/quote-storefront-utils.service.spec.ts @@ -1,8 +1,20 @@ import { Component, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; -import { WindowRef } from '@spartacus/core'; import { ComponentFixture, TestBed } from '@angular/core/testing'; +import { WindowRef } from '@spartacus/core'; import { QuoteStorefrontUtilsService } from './quote-storefront-utils.service'; +const mockedWindowTemplate: { innerWidth?: number; innerHeight?: number } = { + innerWidth: 1000, + innerHeight: 1000, +}; + +let mockedWindow = mockedWindowTemplate; +class MockedWindowRef extends WindowRef { + get nativeWindow(): Window | undefined { + return this.isBrowser() ? mockedWindow : undefined; + } +} + @Component({ selector: 'cx-quote', template: ` @@ -20,24 +32,23 @@ describe('QuoteStorefrontUtilsService', () => { let fixture: ComponentFixture; let htmlElem: HTMLElement; let windowRef: WindowRef; - let querySelectorOriginal: any; beforeEach(() => { TestBed.configureTestingModule({ declarations: [MockQuoteComponent], schemas: [CUSTOM_ELEMENTS_SCHEMA], + providers: [{ provide: WindowRef, useClass: MockedWindowRef }], }).compileComponents(); classUnderTest = TestBed.inject(QuoteStorefrontUtilsService); fixture = TestBed.createComponent(MockQuoteComponent); htmlElem = fixture.nativeElement; windowRef = TestBed.inject(WindowRef); + mockedWindow = structuredClone(mockedWindowTemplate); fixture.detectChanges(); - querySelectorOriginal = document.querySelector; }); afterEach(() => { - document.querySelector = querySelectorOriginal; if (htmlElem) { document.body.removeChild(htmlElem); } @@ -52,17 +63,13 @@ describe('QuoteStorefrontUtilsService', () => { it('should get HTML element based on query selector when running in browser and element exists', () => { spyOn(windowRef, 'isBrowser').and.returnValue(true); const theElement = document.createElement('elementMock'); - document.querySelector = jasmine - .createSpy('HTML Element') - .and.returnValue(theElement); + spyOn(windowRef.document, 'querySelector').and.returnValue(theElement); expect(classUnderTest.getElement('elementMock')).toEqual(theElement); }); it('should get null if element does not exist', () => { spyOn(windowRef, 'isBrowser').and.returnValue(true); - document.querySelector = jasmine - .createSpy('HTML Element') - .and.returnValue(null); + spyOn(windowRef.document, 'querySelector').and.returnValue(null); expect(classUnderTest.getElement('unknownElement')).toEqual(null); }); }); @@ -71,9 +78,7 @@ describe('QuoteStorefrontUtilsService', () => { it('should not change styling of HTML element if element does not exist', () => { spyOn(windowRef, 'isBrowser').and.returnValue(true); const element = document.createElement('notExistingElement'); - document.querySelector = jasmine - .createSpy('HTML Element') - .and.returnValue(undefined); + spyOn(windowRef.document, 'querySelector').and.returnValue(undefined); classUnderTest.changeStyling('notExistingElement', 'position', 'sticky'); expect(element.style.position).not.toEqual('sticky'); @@ -82,9 +87,7 @@ describe('QuoteStorefrontUtilsService', () => { it('should change styling of HTML element', () => { spyOn(windowRef, 'isBrowser').and.returnValue(true); const theElement = document.createElement('elementMock'); - document.querySelector = jasmine - .createSpy('HTML Element') - .and.returnValue(theElement); + spyOn(windowRef.document, 'querySelector').and.returnValue(theElement); classUnderTest.changeStyling('elementMock', 'position', 'sticky'); expect(theElement.style.position).toEqual('sticky'); }); @@ -121,27 +124,25 @@ describe('QuoteStorefrontUtilsService', () => { label.style.height = '10px'; }); - spyOnProperty(window, 'innerWidth').and.returnValue(100); + mockedWindow.innerWidth = 100; expect(classUnderTest['isInViewport'](list)).toBe(false); }); - // TODO: CXSPA-8270 - fix failing tests on Azure & GiHub - xit("should return 'true' because window's innerWith is known", () => { + it("should return 'true' because window's innerWith is known", () => { list.style.display = 'flex'; list.style.flexDirection = 'column'; - spyOnProperty(window, 'innerWidth').and.returnValue(1000); + mockedWindow.innerWidth = 1000; expect(classUnderTest['isInViewport'](list)).toBe(true); }); - // TODO: CXSPA-8270 - fix failing tests on Azure & GiHub - xit("should return 'true' because clientWidth of element is known and its right is less than its width", () => { + it("should return 'true' because clientWidth of element is known and its right is less than its width", () => { list.style.display = 'flex'; list.style.flexDirection = 'column'; - spyOnProperty(window, 'innerWidth').and.returnValue(undefined); + mockedWindow.innerWidth = undefined; expect(classUnderTest['isInViewport'](list)).toBe(true); }); @@ -151,7 +152,7 @@ describe('QuoteStorefrontUtilsService', () => { list.style.flexDirection = 'column'; list.style.height = '1000px'; - spyOnProperty(window, 'innerHeight').and.returnValue(undefined); + mockedWindow.innerHeight = undefined; expect(classUnderTest['isInViewport'](list)).toBe(true); }); @@ -176,14 +177,13 @@ describe('QuoteStorefrontUtilsService', () => { }); it('should return zero because component is not in viewport', () => { - spyOnProperty(window, 'innerWidth').and.returnValue(100); + mockedWindow.innerWidth = 100; expect(classUnderTest['getHeight']('cx-quote-list')).toBe(0); }); - // TODO: CXSPA-8270 - fix failing tests on Azure & GiHub - xit('should return offsetHeight of the element because component is not in viewport', () => { - spyOnProperty(window, 'innerWidth').and.returnValue(1000); + it('should return offsetHeight of the element because component is in viewport', () => { + mockedWindow.innerWidth = 1000; expect(classUnderTest['getHeight']('cx-quote-list')).toBeGreaterThan(0); }); diff --git a/feature-libs/quote/package.json b/feature-libs/quote/package.json index 5725d7cbc0c..1fa7ce52107 100644 --- a/feature-libs/quote/package.json +++ b/feature-libs/quote/package.json @@ -1,6 +1,6 @@ { "name": "@spartacus/quote", - "version": "2211.29.1", + "version": "2211.30.0", "description": "", "keywords": [ "spartacus", @@ -32,11 +32,11 @@ "@angular/core": "^17.0.5", "@angular/forms": "^17.0.5", "@angular/router": "^17.0.5", - "@spartacus/cart": "2211.29.1", - "@spartacus/core": "2211.29.1", - "@spartacus/schematics": "2211.29.1", - "@spartacus/storefront": "2211.29.1", - "@spartacus/styles": "2211.29.1", + "@spartacus/cart": "2211.30.0", + "@spartacus/core": "2211.30.0", + "@spartacus/schematics": "2211.30.0", + "@spartacus/storefront": "2211.30.0", + "@spartacus/styles": "2211.30.0", "bootstrap": "^4.6.2", "rxjs": "^7.8.0" }, diff --git a/feature-libs/quote/schematics/add-quote/__snapshots__/index_spec.ts.snap b/feature-libs/quote/schematics/add-quote/__snapshots__/index_spec.ts.snap index e3935a70ee6..4ee71ab70f4 100644 --- a/feature-libs/quote/schematics/add-quote/__snapshots__/index_spec.ts.snap +++ b/feature-libs/quote/schematics/add-quote/__snapshots__/index_spec.ts.snap @@ -55,7 +55,7 @@ import { defaultCmsContentProviders, layoutConfig, mediaConfig } from "@spartacu }, }), provideConfig({ features: { - level: '2211.29' + level: '2211.30' } }), provideConfig(defaultB2bOccConfig)] }) diff --git a/feature-libs/requested-delivery-date/package.json b/feature-libs/requested-delivery-date/package.json index 3e2fd60c675..8871c736c54 100644 --- a/feature-libs/requested-delivery-date/package.json +++ b/feature-libs/requested-delivery-date/package.json @@ -1,6 +1,6 @@ { "name": "@spartacus/requested-delivery-date", - "version": "2211.29.1", + "version": "2211.30.0", "description": "Requested Delivery Date library for Spartacus", "keywords": [ "spartacus", @@ -29,13 +29,13 @@ "@angular/common": "^17.0.5", "@angular/core": "^17.0.5", "@angular/forms": "^17.0.5", - "@spartacus/cart": "2211.29.1", - "@spartacus/checkout": "2211.29.1", - "@spartacus/core": "2211.29.1", - "@spartacus/order": "2211.29.1", - "@spartacus/schematics": "2211.29.1", - "@spartacus/storefront": "2211.29.1", - "@spartacus/styles": "2211.29.1", + "@spartacus/cart": "2211.30.0", + "@spartacus/checkout": "2211.30.0", + "@spartacus/core": "2211.30.0", + "@spartacus/order": "2211.30.0", + "@spartacus/schematics": "2211.30.0", + "@spartacus/storefront": "2211.30.0", + "@spartacus/styles": "2211.30.0", "rxjs": "^7.8.0" }, "publishConfig": { diff --git a/feature-libs/smartedit/package.json b/feature-libs/smartedit/package.json index 700b3d7e530..d0e8fcedee6 100644 --- a/feature-libs/smartedit/package.json +++ b/feature-libs/smartedit/package.json @@ -1,6 +1,6 @@ { "name": "@spartacus/smartedit", - "version": "2211.29.1", + "version": "2211.30.0", "description": "Smart Edit feature library for Spartacus", "keywords": [ "spartacus", @@ -23,8 +23,8 @@ "@angular-devkit/schematics": "^17.0.5", "@angular/common": "^17.0.5", "@angular/core": "^17.0.5", - "@spartacus/core": "2211.29.1", - "@spartacus/schematics": "2211.29.1", + "@spartacus/core": "2211.30.0", + "@spartacus/schematics": "2211.30.0", "rxjs": "^7.8.0" }, "publishConfig": { diff --git a/feature-libs/storefinder/package.json b/feature-libs/storefinder/package.json index 5bdb1a11614..031e149b287 100644 --- a/feature-libs/storefinder/package.json +++ b/feature-libs/storefinder/package.json @@ -1,6 +1,6 @@ { "name": "@spartacus/storefinder", - "version": "2211.29.1", + "version": "2211.30.0", "description": "Store finder feature library for Spartacus", "keywords": [ "spartacus", @@ -32,10 +32,10 @@ "@angular/router": "^17.0.5", "@ngrx/effects": "^17.0.1", "@ngrx/store": "^17.0.1", - "@spartacus/core": "2211.29.1", - "@spartacus/schematics": "2211.29.1", - "@spartacus/storefront": "2211.29.1", - "@spartacus/styles": "2211.29.1", + "@spartacus/core": "2211.30.0", + "@spartacus/schematics": "2211.30.0", + "@spartacus/storefront": "2211.30.0", + "@spartacus/styles": "2211.30.0", "bootstrap": "^4.6.2", "rxjs": "^7.8.0" }, diff --git a/feature-libs/tracking/package.json b/feature-libs/tracking/package.json index 49ce9e3e51b..088ee471dc0 100644 --- a/feature-libs/tracking/package.json +++ b/feature-libs/tracking/package.json @@ -1,6 +1,6 @@ { "name": "@spartacus/tracking", - "version": "2211.29.1", + "version": "2211.30.0", "description": "Spartacus tracking and personalization library", "keywords": [ "spartacus", @@ -27,8 +27,8 @@ "@angular-devkit/schematics": "^17.0.5", "@angular/common": "^17.0.5", "@angular/core": "^17.0.5", - "@spartacus/core": "2211.29.1", - "@spartacus/schematics": "2211.29.1", + "@spartacus/core": "2211.30.0", + "@spartacus/schematics": "2211.30.0", "rxjs": "^7.8.0" }, "publishConfig": { diff --git a/feature-libs/user/account/components/login/login.component.html b/feature-libs/user/account/components/login/login.component.html index 8bbdd9a1bfa..4a56e93ac62 100644 --- a/feature-libs/user/account/components/login/login.component.html +++ b/feature-libs/user/account/components/login/login.component.html @@ -1,5 +1,5 @@ -