Skip to content

Commit 88d0716

Browse files
Merge branch 'develop' into feature/synk_lagacy_tests
2 parents a496b9e + 6f1112b commit 88d0716

File tree

7 files changed

+184
-148
lines changed

7 files changed

+184
-148
lines changed

CHANGELOG.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,18 @@ Features:
77
- Add 'Steps' label into Test page -> [View Issue](https://github.com/aquality-automation/aquality-tracking/issues/31)
88
- Add ID column to Suites List -> [View Issue](https://github.com/aquality-automation/aquality-tracking/issues/18)
99
- Add possibility to sync testsuites according to Not Executed results -> [View Issue](https://github.com/aquality-automation/aquality-tracking/issues/32)
10+
- Add Executor and Pass Rate column to Test Run List table -> [View Issue](https://github.com/aquality-automation/aquality-tracking/issues/41)
1011

1112
Bugfixes:
1213
- It should not be possible to delete Customer that assigned to the projects -> [View Issue](https://github.com/aquality-automation/aquality-tracking/issues/9)
1314
- Link "View on Aquality Tracking" in report email is broken -> [View Issue](https://github.com/aquality-automation/aquality-tracking/issues/30)
1415
- Link from the audit email notification is invalid -> [View Issue](https://github.com/aquality-automation/aquality-tracking/issues/13)
1516
- Audits feature is visible when disabled -> [View Issue](https://github.com/aquality-automation/aquality-tracking/issues/24)
16-
- All available test are shown in tests list after updating Suite for some test -> [View Issue](https://github.com/aquality-automation/aquality-tracking/issues/27)
17+
- All available test are shown in tests list after updating Suite for some test -> [View Issue](https://github.com/aquality-automation/aquality-tracking/issues/27)
18+
- There is no scrolling in dashboard configuration -> [View Issue](https://github.com/aquality-automation/aquality-tracking/issues/14)
19+
- Empty line on dashboard if suite have no data -> [View Issue](https://github.com/aquality-automation/aquality-tracking/issues/15)
20+
- Suites Dashboard: Data refresh working wrong with empty cards -> [View Issue](https://github.com/aquality-automation/aquality-tracking/issues/40)
21+
- Suites Dashboard: Data is not updated for empty cards -> [View Issue](https://github.com/aquality-automation/aquality-tracking/issues/39)
1722

1823
## 0.3.3 (2019-11-16)
1924

src/app/pages/project/project-view/project-veiw.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,14 +64,14 @@ export class ProjectViewComponent implements OnInit {
6464
{ name: 'Execution Environment', property: 'execution_environment', type: 'text' },
6565
{ name: 'Start Time', property: 'start_time', type: 'date', class: 'fit' },
6666
{ name: 'Finish Time', property: 'finish_time', type: 'date', class: 'fit' },
67-
{ name: 'Failed Tests, %', property: 'failed', type: 'text', class: 'fit' },
67+
{ name: 'Pass Rate, %', property: 'failed', type: 'text', class: 'fit' },
6868
];
6969
});
7070
}
7171

7272
getNumberOfFails(id: number) {
7373
const stats: TestRunStat = this.testRunStats.filter(x => x.id === id)[0];
74-
return stats ? (stats.failed / stats.total * 100).toFixed(2) : 0;
74+
return this.testrunService.getPassRate(stats);
7575
}
7676

7777
openTestRun(testRunId: number) {

src/app/pages/project/suite-dashboard/suite-dashboard.component.css

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
.card {
2-
min-height: 220px;
32
padding: 5px;
43
background: #fff;
54
margin: 10px;
@@ -13,17 +12,30 @@
1312
box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22);
1413
}
1514

15+
.card-holder {
16+
height: 299px;
17+
}
18+
19+
.card-holder-sm {
20+
height: 223px;
21+
}
22+
1623
.settings-bar {
1724
padding: 60px 21px 0 0;
18-
position: absolute;
25+
position: fixed;
1926
left: 0;
20-
bottom: 0;
2127
top: 0;
28+
height: 100%;
2229
background-color: #101010;
2330
width: 300px;
2431
z-index: 1000;
2532
}
2633

34+
.settings-content{
35+
overflow: auto;
36+
height: inherit;
37+
}
38+
2739
.settings-toggler {
2840
cursor: pointer;
2941
position: absolute;
Lines changed: 52 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,27 @@
1-
<div *ngIf="suite_stats.length > 0" class="holder">
1+
<div *ngIf="suite_stats && suite_stats.length > 0" class="holder">
22
<div *ngFor="let suite of suite_stats" class="no-padding" [ngClass]="{
33
'col-sm-3': suite_stats.length < 13,
44
'col-sm-2': suite_stats.length > 12
55
}">
6-
<div class="card clearfix">
6+
<div class="card clearfix" [ngClass]="{
7+
'card-holder': suite_stats.length < 13,
8+
'card-holder-sm': suite_stats.length > 12
9+
}">
710
<div class="suite_name_holder">
811
<h3 class="suite_name CropLongTexts" [title]="suite.name">{{suite.name}}</h3>
912
<h6 *ngIf="suite.stat" class="CropLongTexts" [title]="suite.stat.build_name">{{suite.stat.build_name}}</h6>
1013
</div>
1114
<div *ngIf="suite.chartData" class="db-chart">
12-
<div class="" style="display: block">
15+
<div style="display: block">
1316
<canvas [id]="suite.name + Chart" baseChart [datasets]="suite.chartData" [labels]="suite.chartLabels"
14-
[chartType]="doughnutChartType" [colors]="chartColors" [options]="chartOptions"></canvas>
17+
[chartType]="doughnutChartType" [colors]="chartColors" [options]="suite.options"></canvas>
1518
</div>
1619
</div>
1720
<div *ngIf="suite.stat" class="db-stat col-sm-12 no-padding">
1821
{{suite.stat.start_time | date: 'dd/MM/yyyy hh:mm a'}} | {{getDuration(suite.stat)}}
1922
</div>
2023
<div *ngIf="!suite.chartData" class="col-sm-6 db-chart">
21-
<p>No data to show :(</p>
24+
<p>Nothing to show</p>
2225
</div>
2326
</div>
2427
</div>
@@ -31,51 +34,51 @@ <h6 *ngIf="suite.stat" class="CropLongTexts" [title]="suite.stat.build_name">{{s
3134
'glyphicon-chevron-right': settingsBar =='out'
3235
}"></span>
3336
</div>
34-
35-
<div *ngIf="settingsBar" class="col-sm-12">
36-
<button id="autoRefresh" class="btn btn-sm autoRefresh" title="Auto Refresh" (click)="autoRefresh()" [ngClass]="{
37-
'btn-success' : refreshStatus,
38-
'btn-default' : !refreshStatus
39-
}">
40-
Auto Refresh
41-
<span class="glyphicon glyphicon-refresh" [ngClass]="{
42-
'glyphicon-refresh-animate' : refreshStatus
43-
}"></span>
44-
</button>
45-
</div>
37+
<div *ngIf="settingsBar" class="settings-content">
38+
<div *ngIf="settingsBar" class="col-sm-12">
39+
<button id="autoRefresh" class="btn btn-sm autoRefresh" title="Auto Refresh" (click)="autoRefresh()" [ngClass]="{
40+
'btn-success' : refreshStatus,
41+
'btn-default' : !refreshStatus
42+
}">
43+
Auto Refresh
44+
<span class="glyphicon glyphicon-refresh" [ngClass]="{
45+
'glyphicon-refresh-animate' : refreshStatus
46+
}"></span>
47+
</button>
48+
</div>
49+
50+
<div *ngIf="settingsBar" class="col-sm-12">
51+
<ui-switch class="pull-left" id="detailed" size="small" [ngModel]="detailed" (change)="generateChartsData($event)">
52+
</ui-switch>
53+
<label class="pull-left ui-switch-sm-label" for="detailed">Detailed</label>
54+
</div>
4655

47-
<div *ngIf="settingsBar" class="col-sm-12">
48-
<ui-switch class="pull-left" id="detailed" size="small" [ngModel]="detailed" (change)="generateChartsData($event)">
49-
</ui-switch>
50-
<label class="pull-left ui-switch-sm-label" for="detailed">Detailed</label>
51-
</div>
52-
53-
<div *ngIf="settingsBar" class="col-sm-12">
54-
<label for="suites">Suites</label>
55-
<lookup-autocomplete-multiselect id="suites" placeholder="Select Suites" [propertiesToShow]="['name']"
56-
[array]="suites" [model]="suitesToShow" (onClosed)="updateSuites($event)"></lookup-autocomplete-multiselect>
57-
</div>
58-
59-
60-
<div *ngIf="settingsBar" class="col-sm-12">
61-
<div class="input-group input-group-sm">
62-
<input type="text" class="form-control" id="name" placeholder="Name" [(ngModel)]="newDashboardName">
63-
<span class="input-group-btn">
64-
<button type="button" class="btn btn-success" (click)="saveDashboard()"
65-
[disabled]="!isDashboardNameValid()">Save</button>
66-
</span>
56+
<div *ngIf="settingsBar" class="col-sm-12">
57+
<label for="suites">Suites</label>
58+
<lookup-autocomplete-multiselect id="suites" placeholder="Select Suites" [propertiesToShow]="['name']"
59+
[array]="suites" [model]="suitesToShow" (onClosed)="updateSuites($event)"></lookup-autocomplete-multiselect>
60+
</div>
61+
62+
63+
<div *ngIf="settingsBar" class="col-sm-12">
64+
<div class="input-group input-group-sm">
65+
<input type="text" class="form-control" id="name" placeholder="Name" [(ngModel)]="newDashboardName">
66+
<span class="input-group-btn">
67+
<button type="button" class="btn btn-success" (click)="saveDashboard()"
68+
[disabled]="!isDashboardNameValid()">Save</button>
69+
</span>
70+
</div>
71+
</div>
72+
73+
<div *ngIf="settingsBar" class="col-sm-12 dashboards-holder">
74+
<label for="suites">Dashboards</label>
75+
<ul class="dashboards-list">
76+
<li class="clearfix" *ngFor="let dashboard of dashboards">
77+
<p class="pull-left no-margin" (click)="selectDashboard(dashboard)">{{dashboard.name}}</p>
78+
<span *ngIf="!dashboard.notDeletable" class="glyphicon glyphicon-remove pull-right"
79+
(click)="removeDashboard(dashboard)"></span>
80+
</li>
81+
</ul>
6782
</div>
6883
</div>
69-
70-
<div *ngIf="settingsBar" class="col-sm-12 dashboards-holder">
71-
<label for="suites">Dashboards</label>
72-
<ul class="dashboards-list">
73-
<li class="clearfix" *ngFor="let dashboard of dashboards">
74-
<p class="pull-left no-margin" (click)="selectDashboard(dashboard)">{{dashboard.name}}</p>
75-
<span *ngIf="!dashboard.notDeletable" class="glyphicon glyphicon-remove pull-right"
76-
(click)="removeDashboard(dashboard)"></span>
77-
</li>
78-
</ul>
79-
</div>
80-
8184
</div>

src/app/pages/project/suite-dashboard/suite-dashboard.component.ts

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,12 +88,20 @@ export class SuiteDashboardComponent implements OnInit, OnDestroy {
8888
? this.generateDetailedData(new_suite_stats)
8989
: this.generateData(new_suite_stats);
9090

91+
const charts = this.charts.toArray();
9192
this.suite_stats.forEach((suite, i) => {
9293
const new_suite = new_suite_stats.find(new_suite_stat => new_suite_stat.id === suite.id);
93-
suite.chartData = new_suite.chartData;
94-
suite.chartLabels = new_suite.chartLabels;
95-
96-
this.charts.toArray()[i].chart.config.data.labels = suite.chartLabels;
94+
const currentChart = charts.find(chart => chart.options.id === new_suite.id);
95+
if (currentChart) {
96+
suite.chartData = new_suite.chartData;
97+
suite.chartLabels = new_suite.chartLabels;
98+
currentChart.chart.config.data.labels = suite.chartLabels;
99+
} else {
100+
if (new_suite.chartData) {
101+
const index = this.suite_stats.findIndex(suiteStat => suiteStat.id === new_suite.id);
102+
this.suite_stats[index] = new_suite;
103+
}
104+
}
97105
});
98106
}
99107

@@ -112,6 +120,9 @@ export class SuiteDashboardComponent implements OnInit, OnDestroy {
112120
`Test Issues | ${suite.stat.warning + suite.stat.not_assigned + suite.stat.other}`,
113121
`Total | ${suite.stat.total}`
114122
];
123+
const options = JSON.parse(JSON.stringify(this.chartOptions));
124+
options.id = suite.id;
125+
suite['options'] = options;
115126
}
116127
}
117128
return suites;

0 commit comments

Comments
 (0)