Skip to content

Commit

Permalink
Merge branch 'develop' into epic/opf
Browse files Browse the repository at this point in the history
  • Loading branch information
Matejk00 authored Jul 2, 2024
2 parents bf4a1c2 + 83ebd99 commit 5bf08cf
Show file tree
Hide file tree
Showing 514 changed files with 7,756 additions and 8,490 deletions.
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
sonar-project.properties
sub-folder/
.pipeline/
tmp/**
3 changes: 2 additions & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"singleQuote": true
"singleQuote": true,
"trailingComma": "es5"
}
24 changes: 17 additions & 7 deletions ci-scripts/publish-sample-data.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,12 @@ TAG_NAME="sampledata"
SAMPLE_DATA_ASSETS_FOLDER="sample-data-assets"
STOREFRONT_FILE_NAME="spartacussampledata"

SAMPLE_DATA_UNRELEASED_BRANCH="release/6.x"
UNRELEASED_SPARTACUS_VERSION_NAME="$STOREFRONT_FILE_NAME-version-6-x"

SAMPLE_DATA_UNRELEASED_BRANCH="release/2211.x"
UNRELEASED_SPARTACUS_VERSION_NAME="$STOREFRONT_FILE_NAME-version-2211-x"

SAMPLE_DATA_UNRELEASED_BRANCH6="release/6.x"
UNRELEASED_SPARTACUS_VERSION_NAME6="$STOREFRONT_FILE_NAME-version-6-x"

SAMPLE_DATA_CURRENT_BRANCH="release/5.x"
CURRENT_SPARTACUS_VERSION_NAME="$STOREFRONT_FILE_NAME-version-5-x"
Expand All @@ -23,12 +27,17 @@ function download_sample_data_from_spartacussample_repo {
}

echo "-----"
echo "Downloading UNRELEASED sample data for 6.x"
echo "Downloading PREVIOUS sample data for 6.x"

download_sample_data_from_spartacussample_repo $SAMPLE_DATA_UNRELEASED_BRANCH $UNRELEASED_SPARTACUS_VERSION_NAME

echo "-----"
echo "Downloading CURRENT sample data for 5.x"
echo "Downloading PREVIOUS sample data for 6.x"

download_sample_data_from_spartacussample_repo $SAMPLE_DATA_UNRELEASED_BRANCH6 $UNRELEASED_SPARTACUS_VERSION_NAME6

echo "-----"
echo "Downloading PREVIOUS sample data for 5.x"

download_sample_data_from_spartacussample_repo $SAMPLE_DATA_CURRENT_BRANCH $CURRENT_SPARTACUS_VERSION_NAME

Expand All @@ -55,7 +64,8 @@ echo "-----"
echo "Create a release with created tag"

gh release create $TAG_NAME ./$SAMPLE_DATA_ASSETS_FOLDER/** --repo "https://$GH_TOKEN@github.com/SAP-samples/cloud-commerce-sample-setup.git" --title "Spartacus Sample Data" --notes "Spartacus sample data releases:
6-x: unreleased
5-x: current release
2211-x: current release
6-x: previous release
5-x: previous release
4-x: previous release
3-x: old release"
3-x: old release"
9 changes: 7 additions & 2 deletions ci-scripts/release-packer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,15 @@
set -e
shopt -s extglob dotglob

# Build all the libraries and generate the dist folders to use when releasing
function build_libs {
npm ci && npm run build:libs
}

# Configure the project to move everything into a sub-folder to keep root clean for publishing
function configure_project {
mkdir sub-folder
mv !(sub-folder) sub-folder
cd sub-folder
npm ci && npm run build:libs
}

# Clear root containing the old package so the next package can be published
Expand Down Expand Up @@ -49,6 +52,8 @@ function pack {

if [[ $1 == 'configure' ]]; then
configure_project
elif [[ $1 == 'build' ]]; then
build_libs
else
clear_root
pack "$1"
Expand Down
10 changes: 5 additions & 5 deletions core-libs/setup/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@spartacus/setup",
"version": "2211.24.1",
"version": "2211.25.0-3",
"description": "Includes features that makes Spartacus and it's setup easier and streamlined.",
"keywords": [
"spartacus",
Expand All @@ -21,10 +21,10 @@
"peerDependencies": {
"@angular/core": "^17.0.5",
"@angular/ssr": "^17.0.5",
"@spartacus/cart": "2211.24.1",
"@spartacus/core": "2211.24.1",
"@spartacus/order": "2211.24.1",
"@spartacus/user": "2211.24.1"
"@spartacus/cart": "2211.25.0-3",
"@spartacus/core": "2211.25.0-3",
"@spartacus/order": "2211.25.0-3",
"@spartacus/user": "2211.25.0-3"
},
"optionalDependencies": {
"@angular/platform-server": "^17.0.5",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,19 +102,13 @@ <h2 class="title modal-title">
<div class="modal-footer">
<button
type="submit"
class="
btn
cx-asm-create-customer-btn cx-asm-create-customer-btn-create
"
class="btn cx-asm-create-customer-btn cx-asm-create-customer-btn-create"
>
{{ 'asm.createCustomerForm.createAccount' | cxTranslate }}
</button>
<button
type="button"
class="
btn
cx-asm-create-customer-btn cx-asm-create-customer-btn-cancel
"
class="btn cx-asm-create-customer-btn cx-asm-create-customer-btn-cancel"
(click)="closeModal('Cancel click')"
>
{{ 'asm.createCustomerForm.cancel' | cxTranslate }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,29 +111,27 @@ describe('AsmCreateCustomerFormComponent', () => {
let launchDialogService: LaunchDialogService;
let asmCreateCustomerFacade: AsmCreateCustomerFacade;

beforeEach(
waitForAsync(() => {
TestBed.configureTestingModule({
imports: [I18nTestingModule],
declarations: [
AsmCreateCustomerFormComponent,
MockCxIconComponent,
MockKeyboadFocusDirective,
],
providers: [
{ provide: LaunchDialogService, useClass: MockLaunchDialogService },
{
provide: AsmCreateCustomerFacade,
useClass: MockAsmCreateCustomerFacade,
},
],
schemas: [CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA],
}).compileComponents();

launchDialogService = TestBed.inject(LaunchDialogService);
asmCreateCustomerFacade = TestBed.inject(AsmCreateCustomerFacade);
})
);
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
imports: [I18nTestingModule],
declarations: [
AsmCreateCustomerFormComponent,
MockCxIconComponent,
MockKeyboadFocusDirective,
],
providers: [
{ provide: LaunchDialogService, useClass: MockLaunchDialogService },
{
provide: AsmCreateCustomerFacade,
useClass: MockAsmCreateCustomerFacade,
},
],
schemas: [CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA],
}).compileComponents();

launchDialogService = TestBed.inject(LaunchDialogService);
asmCreateCustomerFacade = TestBed.inject(AsmCreateCustomerFacade);
}));

beforeEach(() => {
fixture = TestBed.createComponent(AsmCreateCustomerFormComponent);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,32 +179,30 @@ describe('AsmMainUiComponent', () => {
let asmEnablerService: AsmEnablerService;
const testCustomerId: string = '[email protected]';

beforeEach(
waitForAsync(() => {
TestBed.configureTestingModule({
imports: [I18nTestingModule],
declarations: [
AsmMainUiComponent,
MockAsmToggleUiComponent,
MockCSAgentLoginFormComponent,
MockCustomerSelectionComponent,
MockAsmSessionTimerComponent,
MockCustomerEmulationComponent,
MockCxIconComponent,
],
providers: [
{ provide: AuthService, useClass: MockAuthService },
{ provide: CsAgentAuthService, useClass: MockCsAgentAuthService },
{ provide: UserAccountFacade, useClass: MockUserAccountFacade },
{ provide: GlobalMessageService, useClass: MockGlobalMessageService },
{ provide: RoutingService, useClass: MockRoutingService },
{ provide: AsmComponentService, useClass: MockAsmComponentService },
{ provide: AsmService, useClass: MockAsmService },
{ provide: LaunchDialogService, useClass: MockLaunchDialogService },
],
}).compileComponents();
})
);
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
imports: [I18nTestingModule],
declarations: [
AsmMainUiComponent,
MockAsmToggleUiComponent,
MockCSAgentLoginFormComponent,
MockCustomerSelectionComponent,
MockAsmSessionTimerComponent,
MockCustomerEmulationComponent,
MockCxIconComponent,
],
providers: [
{ provide: AuthService, useClass: MockAuthService },
{ provide: CsAgentAuthService, useClass: MockCsAgentAuthService },
{ provide: UserAccountFacade, useClass: MockUserAccountFacade },
{ provide: GlobalMessageService, useClass: MockGlobalMessageService },
{ provide: RoutingService, useClass: MockRoutingService },
{ provide: AsmComponentService, useClass: MockAsmComponentService },
{ provide: AsmService, useClass: MockAsmService },
{ provide: LaunchDialogService, useClass: MockLaunchDialogService },
],
}).compileComponents();
}));

beforeEach(() => {
fixture = TestBed.createComponent(AsmMainUiComponent);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,24 +62,22 @@ describe('AsmSessionTimerComponent', () => {
let routingService: RoutingService;
let userIdService: UserIdService;

beforeEach(
waitForAsync(() => {
TestBed.configureTestingModule({
imports: [I18nTestingModule],
declarations: [AsmSessionTimerComponent, MockFormatTimerPipe],
providers: [
{
provide: ChangeDetectorRef,
useValue: { markForCheck: createSpy('markForCheck') },
},
{ provide: AsmConfig, useValue: MockAsmConfig },
{ provide: AsmComponentService, useClass: MockAsmComponentService },
{ provide: RoutingService, useClass: MockRoutingService },
{ provide: UserIdService, useClass: MockUserIdService },
],
}).compileComponents();
})
);
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
imports: [I18nTestingModule],
declarations: [AsmSessionTimerComponent, MockFormatTimerPipe],
providers: [
{
provide: ChangeDetectorRef,
useValue: { markForCheck: createSpy('markForCheck') },
},
{ provide: AsmConfig, useValue: MockAsmConfig },
{ provide: AsmComponentService, useClass: MockAsmComponentService },
{ provide: RoutingService, useClass: MockRoutingService },
{ provide: UserIdService, useClass: MockUserIdService },
],
}).compileComponents();
}));

beforeEach(() => {
fixture = TestBed.createComponent(AsmSessionTimerComponent);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,13 @@ describe('AsmToggleuUiComponent', () => {
let asmService: AsmService;
let el: DebugElement;

beforeEach(
waitForAsync(() => {
TestBed.configureTestingModule({
imports: [I18nTestingModule],
declarations: [AsmToggleUiComponent],
providers: [{ provide: AsmService, useClass: MockAsmService }],
}).compileComponents();
})
);
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
imports: [I18nTestingModule],
declarations: [AsmToggleUiComponent],
providers: [{ provide: AsmService, useClass: MockAsmService }],
}).compileComponents();
}));

beforeEach(() => {
fixture = TestBed.createComponent(AsmToggleUiComponent);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,21 @@ describe('CSAgentLoginFormComponent', () => {
const validUserId = 'asagent';
const validPassword = 'testPass123!';

beforeEach(
waitForAsync(() => {
TestBed.configureTestingModule({
imports: [
ReactiveFormsModule,
I18nTestingModule,
FormErrorsModule,
PasswordVisibilityToggleModule,
],
declarations: [
CSAgentLoginFormComponent,
DotSpinnerComponent,
MockFeatureDirective,
],
}).compileComponents();
})
);
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
imports: [
ReactiveFormsModule,
I18nTestingModule,
FormErrorsModule,
PasswordVisibilityToggleModule,
],
declarations: [
CSAgentLoginFormComponent,
DotSpinnerComponent,
MockFeatureDirective,
],
}).compileComponents();
}));

beforeEach(() => {
fixture = TestBed.createComponent(CSAgentLoginFormComponent);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,33 +59,31 @@ describe('CustomerEmulationComponent', () => {
let el: DebugElement;
let featureModulesService: FeatureModulesService;

beforeEach(
waitForAsync(() => {
TestBed.configureTestingModule({
imports: [I18nTestingModule],
declarations: [
CustomerEmulationComponent,
MockFeatureLevelDirective,
MockAsmBindCartComponent,
],
providers: [
{
provide: FeatureModulesService,
useClass: mockFeatureModulesService,
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
imports: [I18nTestingModule],
declarations: [
CustomerEmulationComponent,
MockFeatureLevelDirective,
MockAsmBindCartComponent,
],
providers: [
{
provide: FeatureModulesService,
useClass: mockFeatureModulesService,
},
{ provide: UserAccountFacade, useClass: MockUserAccountFacade },
{ provide: AsmComponentService, useClass: MockAsmComponentService },
{ provide: LaunchDialogService, useClass: MockLaunchDialogService },
{
provide: FeaturesConfig,
useValue: {
features: { level: '6.3' },
},
{ provide: UserAccountFacade, useClass: MockUserAccountFacade },
{ provide: AsmComponentService, useClass: MockAsmComponentService },
{ provide: LaunchDialogService, useClass: MockLaunchDialogService },
{
provide: FeaturesConfig,
useValue: {
features: { level: '6.3' },
},
},
],
}).compileComponents();
})
);
},
],
}).compileComponents();
}));

beforeEach(() => {
fixture = TestBed.createComponent(CustomerEmulationComponent);
Expand Down
Loading

0 comments on commit 5bf08cf

Please sign in to comment.