Skip to content

Commit 8daf0a5

Browse files
Merge pull request #91 from aquality-automation/feature/milestone_due_date
Feature/milestone due date
2 parents e067a98 + 2f1637e commit 8daf0a5

File tree

45 files changed

+436
-175
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+436
-175
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@
55
Features:
66
- Improve Test Run and Test List page performance -> [View Issue](https://github.com/aquality-automation/aquality-tracking/issues/71)
77
- Exclude Debug results from last results column -> [View Issue](https://github.com/aquality-automation/aquality-tracking/issues/70)
8+
- Milestone: Add selected Suites to milestone -> [View Issue](https://github.com/aquality-automation/aquality-tracking/issues/63)
9+
- Milestone: Add not executed suites -> [View Issue](https://github.com/aquality-automation/aquality-tracking/issues/64)
10+
- Milestone: Add Due Date to Milestone. -> [View Issue](https://github.com/aquality-automation/aquality-tracking/issues/61)
11+
- Milestone: Add possibility to Close Milestone. -> [View Issue](https://github.com/aquality-automation/aquality-tracking/issues/62)
12+
- Test Runs List: Add possibility to Add milestone from Test Runs List. -> [View Issue](https://github.com/aquality-automation/aquality-tracking/issues/59)
813

914
Bugfixes:
1015

e2e/api/editor.api.ts

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import { Milestone } from '../../src/app/shared/models/milestone';
66
import { sendPost, sendGet, sendDelete } from '../utils/aqualityTrackingAPI.util';
77
import { TestResult } from '../../src/app/shared/models/test-result';
88
import { Project } from '../../src/app/shared/models/project';
9-
import { ResultResolution } from '../../src/app/shared/models/result_resolution';
109

1110
enum Endpoints {
1211
suite = '/suite',
@@ -68,6 +67,7 @@ export class EditorAPI {
6867
}
6968

7069
public async getSuites(testSuite: TestSuite): Promise<TestSuite[]> {
70+
testSuite.project_id = this.project.id;
7171
return sendGet(Endpoints.suite, testSuite, this.token, this.project.id);
7272
}
7373

@@ -83,7 +83,23 @@ export class EditorAPI {
8383
return sendGet(Endpoints.testrun, testrun, this.token, this.project.id);
8484
}
8585

86+
public async getMilestones(milestone: Milestone): Promise<Milestone[]> {
87+
milestone.project_id = this.project.id;
88+
return sendGet(Endpoints.milestone, milestone, this.token, this.project.id);
89+
}
90+
8691
public async removeTestRun(testRunId: number) {
87-
return sendDelete(Endpoints.testrun, { id: testRunId, project_id: this.project.id}, null, this.token, this.project.id);
92+
return sendDelete(Endpoints.testrun, { id: testRunId, project_id: this.project.id }, null, this.token, this.project.id);
93+
}
94+
95+
public async addSuiteToMilestone(milestoneName: string, suiteName: string) {
96+
const milestone: Milestone = (await this.getMilestones({ name: milestoneName }))[0];
97+
const suite: TestSuite = (await this.getSuites({ name: suiteName }))[0];
98+
if (milestone.suites) {
99+
milestone.suites.push(suite);
100+
} else {
101+
milestone.suites = [suite];
102+
}
103+
return this.createMilestone(milestone);
88104
}
89105
}
Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1 @@
1-
Test,Test Suite,Result,Resolution,Comment,Finished
2-
"Login: should be able to login as admin","Login","Not Executed",,,"Invalid Date"
3-
"Login: should not be able to login with wrong username","Login","Not Executed",,,"Invalid Date"
4-
"Login: should not be able to login with wrong password","Login","Not Executed",,,"Invalid Date"
1+
Test,Test Suite,Test Run,Result,Resolution,Comment,Finished

e2e/elements/notification.element.ts

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,19 @@
1-
import { by, element } from 'protractor';
1+
import { by, element, browser } from 'protractor';
22
import { BaseElement } from './base.element';
33

44
export class Notification extends BaseElement {
55
private pageName: string;
6+
private clickSectionScript = `
7+
(function mouseEnter(el, etype) {
8+
if (el.fireEvent) {
9+
el.fireEvent('on' + etype);
10+
} else {
11+
var evObj = document.createEvent('Events');
12+
evObj.initEvent(etype, true, false);
13+
el.dispatchEvent(evObj);
14+
}
15+
})(arguments[0], 'mouseenter')
16+
`;
617

718
constructor(pageName: string) {
819
super(by.tagName('simple-notification'));
@@ -51,7 +62,14 @@ export class Notification extends BaseElement {
5162
return this.assert('warn', message, header);
5263
}
5364

65+
private mouseOver() {
66+
return browser.executeScript(this.clickSectionScript, this.getContainer());
67+
}
68+
5469
private async assert(type: string, message?: string, header?: string) {
70+
if (await this.isVisible()) {
71+
this.mouseOver();
72+
}
5573
await expect(type === 'error' ? this.isError() : type === 'success' ? this.isSuccess() : type === 'warn' ? this.isWarning() : false)
5674
.toBe(true, `${this.pageName}: No Success notification message!`);
5775
if (message) {

e2e/elements/smartTable.element/manageCollumns.element.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,4 +59,13 @@ export class ManageColumns extends BaseElement {
5959
await this.hideColumn(columnName);
6060
return this.apply();
6161
}
62+
63+
async removeColumns(columnNames: string[]) {
64+
await this.openManageColumns();
65+
for (let i = 0; i < columnNames.length; i++) {
66+
const columnName = columnNames[i];
67+
await this.hideColumn(columnName);
68+
}
69+
return this.apply();
70+
}
6271
}

e2e/pages/milestone/view.po/constants.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,6 @@ export const columns = {
2222
test: 'Test',
2323
finished: 'Finished',
2424
result: 'Result',
25-
resolution: 'Resolution'
25+
resolution: 'Resolution',
26+
testrun: 'Test Run'
2627
};

e2e/pages/milestone/view.po/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ class MilestoneView extends BasePage {
1414
return elements.milestonesTable.checkIfTableEqualToCSv(path);
1515
}
1616

17-
removeFinishedColumn() {
18-
return elements.milestonesTable.manageColumns.removeColumn(columns.finished);
17+
removeGenericColumn() {
18+
return elements.milestonesTable.manageColumns.removeColumns([columns.finished, columns.testrun]);
1919
}
2020

2121
setDistinctTest(state: boolean) {

e2e/pages/testrun/list.po/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class TestRunList extends BasePage {
1616
}
1717

1818
openTestRun(buildName: string) {
19-
return elements.testRunsTable.clickRow(buildName, columns.build);
19+
return elements.testRunsTable.clickCell(columns.build, buildName, columns.build);
2020
}
2121

2222
getTestRunsCount() {

e2e/pages/testrun/view.po/constants.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,6 @@ export const elements = {
3838
debug: new Checkbox(by.id('debug'))
3939
};
4040

41-
export const regexps = {
42-
// tslint:disable-next-line: max-line-length
43-
startDateRegexp: '(?<day>(\\d{2}))\\/(?<month>(\\d{2}))\\/(?<year>(\\d{2}))\\s(?<hours>(\\d{2})):(?<minutes>(\\d{2})):(?<seconds>(\\d{2}))\\s(?<period>(\\w{2}))'
44-
};
45-
4641
export const columns = {
4742
testName: 'Test Name',
4843
failReason: 'Fail Reason',

e2e/pages/testrun/view.po/helpers.ts

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

0 commit comments

Comments
 (0)