Arthur Bogaart pushed to branch feature/CC-CHANNELMGR-1563 at cms-community / 
hippo-addon-channel-manager


Commits:
e3bd21cc by Ran ShemTov at 2017-11-14T13:53:59+01:00
CHANNELMGR-1510 Fix a bug where right side panel could not be opened after 
closing step2

- - - - -
7bf27db7 by Ran ShemTov at 2017-11-14T14:02:11+01:00
Merge branch 'feature/CC-CHANNELMGR-1510' into feature/create-content

- - - - -
7a42f1bf by Arthur Bogaart at 2017-11-14T14:16:03+01:00
CHANNELMGR-1563 Merge feature/create-content changes

- - - - -


2 changed files:

- 
frontend-ng/src/app/channel/sidePanels/rightSidePanel/create-content/step-2/step-2.component.spec.ts
- 
frontend-ng/src/app/channel/sidePanels/rightSidePanel/create-content/step-2/step-2.component.ts


Changes:

=====================================
frontend-ng/src/app/channel/sidePanels/rightSidePanel/create-content/step-2/step-2.component.spec.ts
=====================================
--- 
a/frontend-ng/src/app/channel/sidePanels/rightSidePanel/create-content/step-2/step-2.component.spec.ts
+++ 
b/frontend-ng/src/app/channel/sidePanels/rightSidePanel/create-content/step-2/step-2.component.spec.ts
@@ -190,12 +190,17 @@ describe('Create content step 2 component', () => {
     });
 
     it('discards the document when "discard" is selected', () => {
+      component.onBeforeStateChange.emit = arg => arg();
+      spyOn(component.onBeforeStateChange, 'emit').and.callThrough();
+      spyOn(Promise, 'resolve').and.callThrough();
       component.close().then(() => {
         expect(component.documentId).not.toBeDefined();
         expect(component.doc).not.toBeDefined();
         expect(component.docType).not.toBeDefined();
         expect(component.feedback).not.toBeDefined();
         expect(component.title).toEqual('Create new content');
+        expect(component.onBeforeStateChange.emit).toHaveBeenCalled();
+        expect(Promise.resolve).toHaveBeenCalled();
         expect(component.onClose.emit).toHaveBeenCalled();
       });
     });


=====================================
frontend-ng/src/app/channel/sidePanels/rightSidePanel/create-content/step-2/step-2.component.ts
=====================================
--- 
a/frontend-ng/src/app/channel/sidePanels/rightSidePanel/create-content/step-2/step-2.component.ts
+++ 
b/frontend-ng/src/app/channel/sidePanels/rightSidePanel/create-content/step-2/step-2.component.ts
@@ -165,6 +165,7 @@ export class CreateContentStep2Component implements OnInit {
     delete this.docType;
     delete this.feedback;
     this.title = this.defaultTitle;
+    this.onBeforeStateChange.emit(() => Promise.resolve());
   }
 
   private resetBeforeStateChange() {



View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-addon-channel-manager/compare/89b659b1e1006b3c9b6e169dc5a912b3168ee6d6...7a42f1bfbf5c54fa2c8fd01b475d8c4afa3bf066

---
View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-addon-channel-manager/compare/89b659b1e1006b3c9b6e169dc5a912b3168ee6d6...7a42f1bfbf5c54fa2c8fd01b475d8c4afa3bf066
You're receiving this email because of your account on code.onehippo.org.
_______________________________________________
Hippocms-svn mailing list
Hippocms-svn@lists.onehippo.org
https://lists.onehippo.org/mailman/listinfo/hippocms-svn

Reply via email to