@pega/angular-sdk-overrides 0.26.3 → 0.26.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,37 +1,24 @@
1
- import { ChangeDetectorRef } from '@angular/core';
2
- import { FormBuilder } from '@angular/forms';
1
+ import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
3
2
 
4
3
  import { ModalViewContainerComponent } from './modal-view-container.component';
5
- import { BannerService } from '@pega/angular-sdk-components';
6
4
 
7
5
  describe('ModalViewContainerComponent', () => {
8
6
  let component: ModalViewContainerComponent;
9
- let markForCheckSpy: jasmine.Spy;
10
- let clearBannersSpy: jasmine.Spy;
7
+ let fixture: ComponentFixture<ModalViewContainerComponent>;
11
8
 
12
- beforeEach(() => {
13
- (globalThis as any).PCore = {
14
- getConstants: () => ({ PAGE: 'PAGE' })
15
- };
16
-
17
- markForCheckSpy = jasmine.createSpy('markForCheck');
18
- const cdRef = { markForCheck: markForCheckSpy } as unknown as ChangeDetectorRef;
19
- clearBannersSpy = jasmine.createSpy('clearBanners');
20
- const bannerService = { clearBanners: clearBannersSpy } as unknown as BannerService;
9
+ beforeEach(waitForAsync(() => {
10
+ TestBed.configureTestingModule({
11
+ declarations: [ModalViewContainerComponent]
12
+ }).compileComponents();
13
+ }));
21
14
 
22
- component = new ModalViewContainerComponent({} as any, cdRef, {} as any, new FormBuilder(), bannerService);
23
- component.pConn$ = { getStateProps: () => ({}) } as any;
24
- component.stateProps$ = {};
15
+ beforeEach(() => {
16
+ fixture = TestBed.createComponent(ModalViewContainerComponent);
17
+ component = fixture.componentInstance;
18
+ fixture.detectChanges();
25
19
  });
26
20
 
27
21
  it('should create', () => {
28
22
  expect(component).toBeTruthy();
29
23
  });
30
-
31
- it('clears banners for the closed modal', () => {
32
- component.closeActionsDialog('app/modal_1');
33
-
34
- expect(clearBannersSpy).toHaveBeenCalledWith('app/modal_1');
35
- expect(markForCheckSpy).toHaveBeenCalled();
36
- });
37
24
  });
@@ -3,7 +3,7 @@ import { CommonModule } from '@angular/common';
3
3
  import { FormBuilder, FormGroup } from '@angular/forms';
4
4
  import { AngularPConnectData, AngularPConnectService } from '@pega/angular-sdk-components';
5
5
  import { ProgressSpinnerService } from '@pega/angular-sdk-components';
6
- import { BannerService } from 'packages/angular-sdk-components/src/lib/_services/banner.service';
6
+ import { BannerService } from '@pega/angular-sdk-components';
7
7
  import { ComponentMapperComponent } from '@pega/angular-sdk-components';
8
8
 
9
9
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pega/angular-sdk-overrides",
3
- "version": "0.26.3",
3
+ "version": "0.26.4",
4
4
  "description": "Angular SDK - Code for overriding components",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"