Skip to content

Commit 3fbed47

Browse files
TOS-496 When all Test suites are added to a test plan and when clicked on "Add Test suite" ,"Create Test suite" page is not being displayed
1 parent 35f8446 commit 3fbed47

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

ui/src/app/components/webcomponents/test-plan-add-suite-form.component.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export class TestPlanAddSuiteFormComponent implements OnInit {
4444
version: WorkspaceVersion,
4545
execution: TestPlan
4646
},
47-
private dialogRef: MatDialogRef<TestPlanAddSuiteFormComponent>,
47+
public dialogRef: MatDialogRef<TestPlanAddSuiteFormComponent>,
4848
private testSuiteTagService: TestSuiteTagService,
4949
private testSuiteService: TestSuiteService) {
5050
}
@@ -86,6 +86,8 @@ export class TestPlanAddSuiteFormComponent implements OnInit {
8686
}
8787
if (this.filterTagIds.length > 0)
8888
query += ",tagId@" + this.filterTagIds.join("#");
89+
if(this.selectedSuites?.length > 0)
90+
query += ",id;"+this.selectedSuites.map(suite => suite.id).join("#");
8991
this.availableSuites = new InfiniteScrollableDataSource(this.testSuiteService, query, "name", 500);
9092
}
9193

@@ -109,6 +111,7 @@ export class TestPlanAddSuiteFormComponent implements OnInit {
109111
this.selectedSuites = this.selectedSuites.filter(suite => this.checkedSelectedSuites.indexOf(suite) == -1);
110112
this.checkedSelectedSuites = [];
111113
this.filterCheckAllSelectedSuites = [...this.selectedSuites];
114+
this.fetchSuites();
112115
this.checkEmptyAvailable()
113116
}
114117

@@ -150,7 +153,8 @@ export class TestPlanAddSuiteFormComponent implements OnInit {
150153
this.selectedSuites.splice(index, 1);
151154
this.selectedSuites = [...this.selectedSuites];
152155
this.filterCheckAllSelectedSuites = [...this.selectedSuites];
153-
this.checkEmptyAvailable()
156+
this.fetchSuites();
157+
this.checkEmptyAvailable();
154158
}
155159

156160
toggleCheck(suite: TestSuite, array: TestSuite[]) {
@@ -199,6 +203,8 @@ export class TestPlanAddSuiteFormComponent implements OnInit {
199203
this.filterCheckAllSelectedSuites = [...this.selectedSuites];
200204
this.isSearched = false;
201205
}
206+
this.checkedSelectedSuites =[];
207+
this.checkAllSelected = false;
202208
}
203209

204210
testSuitesNotCreated() {

0 commit comments

Comments
 (0)