Skip to content

Commit 1e03df9

Browse files
committed
fix syncsuite tests
1 parent 5ec2de0 commit 1e03df9

File tree

4 files changed

+7
-5
lines changed

4 files changed

+7
-5
lines changed

e2e/api/editor.api.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,6 @@ export class EditorAPI {
8282
}
8383

8484
public async removeTestRun(testRunId: number) {
85-
return sendDelete(Endpoints.testrun, { id: testRunId, projectId: this.project.id}, null, this.token, this.project.id);
85+
return sendDelete(Endpoints.testrun, { id: testRunId, project_id: this.project.id}, null, this.token, this.project.id);
8686
}
8787
}

src/app/services/import.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export class ImportService extends SimpleRequester {
1212
}
1313

1414
importResults(projectId: number) {
15-
return this.doGet(`/import/results?projectId=${projectId}`)
15+
return this.doGet(`/import/results?project_id=${projectId}`)
1616
.map(res => res.json());
1717
}
1818
}

src/app/services/testRun.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export class TestRunService extends SimpleRequester {
3232
}
3333

3434
removeTestRun(testRun: TestRun): Promise<void> {
35-
return this.doDelete(`/testrun`, { id: testRun.id, projectId: testRun.project_id })
35+
return this.doDelete(`/testrun`, { id: testRun.id, project_id: testRun.project_id })
3636
.map(() => this.handleSuccess(`Test run '${testRun.build_name}/${testRun.start_time}' was deleted.`)).toPromise();
3737
}
3838

src/app/services/testSuite.service.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,12 @@ export class TestSuiteService extends SimpleRequester {
5555
}
5656

5757
syncSuite(tests: Test[], suiteId: number, removeNotExecutedResults: boolean) {
58-
return this.doPost(`/suite/sync`, tests, { suiteId, removeNotExecutedResults }, true).map(res => res).toPromise();
58+
const project_id = this.route.snapshot.params['projectId'];
59+
return this.doPost(`/suite/sync`, tests, { project_id, suiteId, removeNotExecutedResults }, true).map(res => res).toPromise();
5960
}
6061

6162
findTestToSync(notExecutedFor: number, suiteId: number): Promise<Test[]> {
62-
return this.doGet('/suite/sync', { notExecutedFor, suiteId }, true).map(res => res.json()).toPromise();
63+
const project_id = this.route.snapshot.params['projectId'];
64+
return this.doGet('/suite/sync', { project_id, notExecutedFor, suiteId }, true).map(res => res.json()).toPromise();
6365
}
6466
}

0 commit comments

Comments
 (0)