From d63d6488386a869a1a947c8a54f7c0ff5209b13b Mon Sep 17 00:00:00 2001 From: alicia pritchett Date: Wed, 13 Oct 2021 11:17:45 -0400 Subject: [PATCH] fixes tests. some style choices --- .../delete-workflow-spec-category-dialog.component.html | 2 +- .../workflow-spec-dialog.component.html | 6 +++++- .../workflow-spec-list/workflow-spec-list.component.html | 3 +-- .../workflow-spec-list/workflow-spec-list.component.spec.ts | 4 ++++ src/app/workflow-spec-list/workflow-spec-list.component.ts | 2 +- 5 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/app/_dialogs/delete-workflow-spec-category-dialog/delete-workflow-spec-category-dialog.component.html b/src/app/_dialogs/delete-workflow-spec-category-dialog/delete-workflow-spec-category-dialog.component.html index 51b5861..8cf0c98 100644 --- a/src/app/_dialogs/delete-workflow-spec-category-dialog/delete-workflow-spec-category-dialog.component.html +++ b/src/app/_dialogs/delete-workflow-spec-category-dialog/delete-workflow-spec-category-dialog.component.html @@ -1,5 +1,5 @@
- Delete category {{data.category.id}}? + Delete category {{data.category.display_name}}?
diff --git a/src/app/_dialogs/workflow-spec-dialog/workflow-spec-dialog.component.html b/src/app/_dialogs/workflow-spec-dialog/workflow-spec-dialog.component.html index bbca394..ed9e68e 100644 --- a/src/app/_dialogs/workflow-spec-dialog/workflow-spec-dialog.component.html +++ b/src/app/_dialogs/workflow-spec-dialog/workflow-spec-dialog.component.html @@ -1,7 +1,11 @@ -
+

Workflow Specification

+
+

Library Specification

+
+
diff --git a/src/app/workflow-spec-list/workflow-spec-list.component.html b/src/app/workflow-spec-list/workflow-spec-list.component.html index 0ea74a8..8caeffc 100644 --- a/src/app/workflow-spec-list/workflow-spec-list.component.html +++ b/src/app/workflow-spec-list/workflow-spec-list.component.html @@ -4,7 +4,7 @@

Workflow Specifications

- +
@@ -27,7 +27,6 @@

Library Specs

diff --git a/src/app/workflow-spec-list/workflow-spec-list.component.spec.ts b/src/app/workflow-spec-list/workflow-spec-list.component.spec.ts index dd37cfc..1499642 100644 --- a/src/app/workflow-spec-list/workflow-spec-list.component.spec.ts +++ b/src/app/workflow-spec-list/workflow-spec-list.component.spec.ts @@ -199,6 +199,7 @@ describe('WorkflowSpecListComponent', () => { it('should add a workflow spec', () => { const _loadWorkflowSpecsSpy = spyOn((component as any), '_loadWorkflowSpecs').and.stub(); + const _loadWorkflowLibrariesSpy = spyOn((component as any), '_loadWorkflowLibraries').and.stub(); const _displayMessageSpy = spyOn((component as any), '_displayMessage').and.stub(); (component as any)._addWorkflowSpec(mockWorkflowSpec0); const wfsReq = httpMock.expectOne(`apiRoot/workflow-specification`); @@ -206,6 +207,7 @@ describe('WorkflowSpecListComponent', () => { wfsReq.flush(mockWorkflowSpec0); expect(_loadWorkflowSpecsSpy).toHaveBeenCalled(); + expect(_loadWorkflowLibrariesSpy).toHaveBeenCalled(); expect(_displayMessageSpy).toHaveBeenCalled(); }); @@ -248,12 +250,14 @@ describe('WorkflowSpecListComponent', () => { it('should delete a workflow spec', () => { const loadWorkflowSpecsSpy = spyOn((component as any), '_loadWorkflowSpecs').and.stub(); + const _loadWorkflowLibrariesSpy = spyOn((component as any), '_loadWorkflowLibraries').and.stub(); (component as any)._deleteWorkflowSpec(mockWorkflowSpec0); const wfsReq = httpMock.expectOne(`apiRoot/workflow-specification/${mockWorkflowSpec0.id}`); expect(wfsReq.request.method).toEqual('DELETE'); wfsReq.flush(null); expect(loadWorkflowSpecsSpy).toHaveBeenCalled(); + expect(_loadWorkflowLibrariesSpy).toHaveBeenCalled(); }); it('should show a metadata dialog when editing a workflow spec category', () => { diff --git a/src/app/workflow-spec-list/workflow-spec-list.component.ts b/src/app/workflow-spec-list/workflow-spec-list.component.ts index 1b678f5..45c2e27 100644 --- a/src/app/workflow-spec-list/workflow-spec-list.component.ts +++ b/src/app/workflow-spec-list/workflow-spec-list.component.ts @@ -392,7 +392,7 @@ export class WorkflowSpecListComponent implements OnInit { private _deleteWorkflowSpecCategory(workflowSpecCategory: WorkflowSpecCategory) { this.api.deleteWorkflowSpecCategory(workflowSpecCategory.id).subscribe(() => { this._loadWorkflowSpecCategories(); - this._displayMessage(`Deleted workflow spec category ${workflowSpecCategory.id}.`); + this._displayMessage(`Deleted workflow spec category ${workflowSpecCategory.display_name}.`); }); }