Skip to content

Commit 664cce5

Browse files
Merge pull request #75 from aquality-automation/feature/manually_finish_test_run
Feature/manually finish test run
2 parents 09182a4 + 9801c5c commit 664cce5

35 files changed

+696
-405
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ Features:
77
- Import: Mark import as debug -> [View Issue](https://github.com/aquality-automation/aquality-tracking/issues/47)
88
- Milestone View: Add functionality that displays the latest results of the tests from the test runs -> [View Issue](https://github.com/aquality-automation/aquality-tracking/issues/11)
99
- List of predefined Resolutions -> [View Issue](https://github.com/aquality-automation/aquality-tracking/issues/26)
10+
- Add posibility to Finish Test Run Manually -> [View Issue](https://github.com/aquality-automation/aquality-tracking/issues/21)
11+
12+
Bugfixes:
13+
- Cannot remove milestone from TestRun -> [View Issue](https://github.com/aquality-automation/aquality-tracking/issues/50)
1014

1115
## 0.3.4 (2019-12-10)
1216

e2e/api/importer.api.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,16 @@ export class Importer {
3131
this.editorAPI = new EditorAPI(this.project, this.token);
3232
}
3333

34-
public async executeImport(importParameters: ImportParams, files: string[], fileNames: string[]) {
34+
public async executeImport(importParameters: ImportParams, files: string[], fileNames: string[]): Promise<TestRun[]> {
3535
importParameters.projectId = this.project.id;
3636
const buildNames = fileNames.map(fileName => fileName.split('.').slice(0, -1).join('.'));
3737
const result = await this.doImport(importParameters, files, fileNames);
3838
if (!result) {
3939
throw Error('Import Failed!');
4040
}
4141

42-
return new Promise(async (resolve) => {
43-
let imported = await this.isAllBuildsAreImported(buildNames);
42+
return new Promise<TestRun[]>(async (resolve) => {
43+
let imported: TestRun[] = await this.isAllBuildsAreImported(buildNames);
4444
if (imported.length > 0) {
4545
logger.info(`Import was finished Successfully`);
4646
resolve(imported);
@@ -62,7 +62,7 @@ export class Importer {
6262
});
6363
}
6464

65-
public async executeCucumberImport(suiteName: string, files: object[], fileNames: string[]): Promise<any> {
65+
public async executeCucumberImport(suiteName: string, files: object[], fileNames: string[]): Promise<TestRun[]> {
6666
const filesAsStringArray = files.map(file => JSON.stringify(file));
6767
return this.executeImport({
6868
projectId: this.project.id,

e2e/data/milestones.json

Lines changed: 0 additions & 5 deletions
This file was deleted.

e2e/data/suites.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
{
2-
"testRunCreation": {
3-
"name": "For Test Run Creation"
4-
},
52
"suiteCreation": {
63
"name": "For Suite Creation"
74
},

e2e/elements/autocomplete.element.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,20 @@ export class Autocomplete extends BaseElement implements WithSearch {
2828
return this.element.element(by.xpath(`.//*[contains(@class, "selector-suggestions")]//li[@title="${value}"]`));
2929
}
3030

31-
public getValue() {
32-
return this.input.getValue();
31+
public async getValue() {
32+
if (await this.input.isPresent()) {
33+
return this.input.getValue();
34+
}
35+
36+
return this.disabledElement.getText();
3337
}
3438

3539
public async createAndSelect(value) {
3640
await this.input.typeText(value);
3741
await this.findOption('Add').click();
3842
}
3943

40-
async isEditable() {
44+
async isEnabled() {
4145
return !(await this.disabledElement.isPresent());
4246
}
4347
}

e2e/elements/base.element.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ export class BaseElement {
2323
return this.element.isPresent();
2424
}
2525

26+
async isEnabled(): Promise<boolean> {
27+
return this.element.isEnabled();
28+
}
29+
2630
async dragAndDrop(moveTo: BaseElement) {
2731
return browser.actions()
2832
.mouseDown(this.element)

e2e/elements/charts/pieBase.element.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export class PieChartBase extends BaseElement {
2020
super(locator);
2121
}
2222

23-
protected async clickChartSection(section: PieChartSection) {
23+
protected async clickChartSection(section: PieChartSection): Promise<string> {
2424
await browser.executeScript(this.clickSectionScript, this.element, section.index);
2525
logger.info(`${section.name} section of Pie Chart was clicked.`);
2626
return section.name;

e2e/elements/charts/resolution.Pie.element.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ export class ResolutionPieChart extends PieChartBase {
99
super(locator);
1010
}
1111

12-
public clickNotAssigned() {
12+
public clickNotAssigned(): Promise<string> {
1313
return this.clickChartSection(lookupOptions.notAssigned);
1414
}
1515

16-
public clickTestIssue() {
16+
public clickTestIssue(): Promise<string> {
1717
return this.clickChartSection(lookupOptions.testIssue);
1818
}
1919
}

e2e/elements/charts/resultPie.element.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export class ResultPieChart extends PieChartBase {
99
super(locator);
1010
}
1111

12-
public clickPassed() {
12+
public clickPassed(): Promise<string> {
1313
return this.clickChartSection(results.passed);
1414
}
1515
}

e2e/elements/inlineEditor.element.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@ export class InlineEditor extends BaseElement {
3131
}
3232
}
3333

34+
public async isEnabled(): Promise<boolean> {
35+
await this.element.click();
36+
return this.inlineForm.isDisplayed();
37+
}
38+
3439
public async changeAndSetValue(value: string) {
3540
await this.openEditor();
3641
await this.typeText(value);

0 commit comments

Comments
 (0)