Skip to content

Commit 758392c

Browse files
Change expected error message
1 parent 611fadc commit 758392c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

e2e/specs/api/api.constants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@ class ApiResponseErrors {
2323
public missedTestId = `You should specify 'test_id'`;
2424
public missedTestRunId = `You should specify 'test_run_id'`;
2525
public missedFinalResultId = `You should specify 'final_result_id' - Failed: 1, Passed: 2, Not Executed: 3, Pending: 5.`;
26-
public entityWithIdDoesNotExist = `Entity with specified id does not exist!`;
2726
// tslint:disable-next-line: quotemark
2827
public missedSuites = "You should specify 'suites' array with single suite like `[{id: test_suite_id}]`";
2928
public anonymousNotAllowedToViewTestSuites = this.anonymousNotAllowedToView('Test Suites');
3029
public anonymousNotAllowedToViewTests = this.anonymousNotAllowedToView('Tests');
3130
public anonymousNotAllowedToViewTestResults = this.anonymousNotAllowedToView('Test Results');
3231
public anonymousNotAllowedToCreateTestRun = this.anonymousNotAllowedToCreate('Test Run');
32+
public entityWithIdDoesNotExist = (id: number) => `Entity with specified '${id}' id does not exist!`;
3333

3434
private anonymousNotAllowedToView(entity: string) {
3535
return `[Permissions anonymous]: Account is not allowed to view ${entity}`;

e2e/specs/api/public.api.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ describe('Public API', () => {
9898
}
9999

100100
expect(atError).toBeDefined(ApiAssertMessages.errorNotRaised);
101-
expect(atError.message).toBe(apiResponseErrors.entityWithIdDoesNotExist, ApiAssertMessages.errorIsWrong);
101+
expect(atError.message).toBe(apiResponseErrors.entityWithIdDoesNotExist(unaccessibleId), ApiAssertMessages.errorIsWrong);
102102
});
103103

104104
it('Can update Suite via public API with id', async () => {

0 commit comments

Comments
 (0)