Refactor Manage Trigger to Single Workflow (#2577)

* Refactor Manage Trigger to Single Workflow
This commit is contained in:
Alec Merdler 2017-05-22 13:59:12 -07:00 committed by GitHub
parent d122743129
commit 97256841bd
26 changed files with 1262 additions and 1077 deletions

View file

@ -35,6 +35,11 @@ describe("LinearWorkflowSectionComponent", () => {
previousValue: false,
isFirstChange: () => false,
},
skipSection: {
currentValue: true,
previousValue: false,
isFirstChange: () => false,
},
};
});
@ -56,6 +61,15 @@ describe("LinearWorkflowSectionComponent", () => {
expect(onSectionInvalidSpy.calls.argsFor(0)[0]).toEqual(component.sectionId);
});
it("calls parent method to go to next section if 'skipSection' input is true and is current section", () => {
delete changesObj['sectionValid'];
const onNextSectionSpy: Spy = spyOn(parentMock, 'onNextSection').and.returnValue(null);
component.isCurrentSection = true;
component.ngOnChanges(changesObj);
expect(onNextSectionSpy).toHaveBeenCalled();
});
});
describe("onSubmitSection", () => {