--- /dev/null
+/* Copyright (c) 2019 AT&T Intellectual Property. #\r
+# #\r
+# Licensed under the Apache License, Version 2.0 (the "License"); #\r
+# you may not use this file except in compliance with the License. #\r
+# You may obtain a copy of the License at #\r
+# #\r
+# http://www.apache.org/licenses/LICENSE-2.0 #\r
+# #\r
+# Unless required by applicable law or agreed to in writing, software #\r
+# distributed under the License is distributed on an "AS IS" BASIS, #\r
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #\r
+# See the License for the specific language governing permissions and #\r
+# limitations under the License. #\r
+##############################################################################*/\r
+\r
+\r
+import { Component, OnInit, Output } from '@angular/core';\r
+import { routerLeftTransition } from '../../../router.animations';\r
+import { ListService } from '../../../shared/services/list.service';\r
+import { HttpClient } from '@angular/common/http';\r
+import { AppGlobals } from '../../../app.global';\r
+import { Router, NavigationExtras } from '@angular/router';\r
+import { TestDefinitionService } from '../../../shared/services/test-definition.service';\r
+\r
+\r
+@Component({\r
+ selector: 'app-create-test',\r
+ templateUrl: './create-test.component.pug',\r
+ styleUrls: ['./create-test.component.scss', '../onboarding.component.scss'],\r
+ providers: [AppGlobals],\r
+ animations: [routerLeftTransition()]\r
+})\r
+export class CreateTestComponent implements OnInit {\r
+\r
+ public test_list = [];\r
+ public search;\r
+\r
+ @Output() public listKey;\r
+\r
+ constructor(private router: Router, private testDefinition: TestDefinitionService, private list: ListService, private http: HttpClient, private _global: AppGlobals) {\r
+\r
+ }\r
+\r
+ back() {\r
+ this.router.navigateByUrl('/onboarding/test-head');\r
+ }\r
+\r
+ next() {\r
+ let navigationExtras: NavigationExtras = {\r
+ queryParams: {\r
+ "testDefinition": JSON.stringify(this.test_list[this.test_list.length - 1])\r
+ }\r
+ };\r
+ this.router.navigate(['/onboarding/test-instances'], navigationExtras);\r
+ }\r
+\r
+ ngOnInit() {\r
+\r
+ this.search = {};\r
+ this.search.testName = "";\r
+\r
+ this.listKey = 'td';\r
+\r
+ //Create List with list service\r
+ this.list.createList(this.listKey);\r
+\r
+ //Subscribe to list service\r
+ this.list.listMap[this.listKey].currentList.subscribe((list) =>{\r
+ this.test_list = list;\r
+ });\r
+ }\r
+\r
+}\r