Skip to content

Commit 691d7b5

Browse files
Fix tests
1 parent 505a873 commit 691d7b5

File tree

3 files changed

+13
-4
lines changed

3 files changed

+13
-4
lines changed

e2e/data/import/oneTestCucumber.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
},
2727
"result": {
2828
"status": "passed",
29-
"duration": 7033
29+
"duration": 1684328900
3030
}
3131
},
3232
{
@@ -39,7 +39,7 @@
3939
},
4040
"result": {
4141
"status": "passed",
42-
"duration": 86
42+
"duration": 1684328900
4343
}
4444
}
4545
]

e2e/specs/suite/syncSuite.spec.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ import using from 'jasmine-data-provider';
99
import cucumberImport from '../../data/import/cucumber.json';
1010
import syncImport from '../../data/import/oneTestCucumber.json';
1111
import users from '../../data/users.json';
12+
import { TestRun } from '../../../src/app/shared/models/testRun';
13+
import { EditorAPI } from '../../api/editor.api';
1214

1315
const editorExamples = {
1416
localAdmin: users.localAdmin,
@@ -30,6 +32,12 @@ const isTestRunCorrect = (testResults: TestResult[], includedTests: string[], re
3032
return included && removed;
3133
};
3234

35+
const updateTestRunDates = (api: EditorAPI, testRun: TestRun, started: Date, finished: Date) =>{
36+
testRun.start_time = started;
37+
testRun.finish_time = finished;
38+
return api.createTestRun(testRun);
39+
};
40+
3341
const testSuite = 'Sync Test Suite';
3442
const defaultNumberOfTestRuns = '5';
3543
const numberOfTestRunsForSync = '2';
@@ -80,6 +88,9 @@ describe('Sync Test Suite', () => {
8088
notSyncTestRun = await projectHelper.importer.executeCucumberImport(testSuite, [cucumberImport], [builds.filenames[0]]);
8189
syncTestRuns = await projectHelper.importer.executeCucumberImport(
8290
testSuite, [syncImport, syncImport], [builds.filenames[1], builds.filenames[2]]);
91+
await updateTestRunDates(projectHelper.editorAPI, notSyncTestRun[0], new Date('03/09/2020'), new Date('03/10/2020'));
92+
await updateTestRunDates(projectHelper.editorAPI, syncTestRuns[0], new Date('03/10/2020'), new Date('03/11/2020'));
93+
await updateTestRunDates(projectHelper.editorAPI, syncTestRuns[1], new Date('03/11/2020'), new Date('03/12/2020'));
8394
await logIn.logInAs(user.user_name, user.password);
8495
return projectHelper.openProject();
8596
});

e2e/specs/testrun/result_searcher.testrun.spec.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ describe('Test Run Result Searcher', () => {
2020
[`${builds.build_1}.json`,
2121
`${builds.build_2}.json`]);
2222
await projectView.menuBar.testRuns();
23-
const isTestRunAppear = await testRunList.waitForTestRun(builds.build_2);
24-
expect(isTestRunAppear).toBe(true, 'Import was not finished!');
2523
await testRunList.openTestRun(builds.build_1);
2624
});
2725

0 commit comments

Comments
 (0)