Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,5 @@ insert_final_newline = true
indent_style = space
indent_size = 2

[*.hbs]
insert_final_newline = false

[*.{diff,md}]
trim_trailing_whitespace = false
13 changes: 13 additions & 0 deletions app/components/build-result-summary-table.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<table class="build-result-summary-table" data-test-results-table>
<thead>
<tr>
<th>Scenario</th>
<th>Result</th>
</tr>
</thead>
<tbody>
{{#each this.scenarios as |scenario|}}
<BuildResultSummaryTable::Row @scenario={{scenario}} />
{{/each}}
</tbody>
</table>
11 changes: 11 additions & 0 deletions app/components/build-result-summary-table.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import classic from 'ember-classic-decorator';
import { tagName } from '@ember-decorators/component';
import { readOnly } from '@ember/object/computed';
import Component from '@ember/component';

@classic
@tagName('')
export default class BuildResultSummaryTable extends Component {
@readOnly('results.scenarios')
scenarios;
}
13 changes: 13 additions & 0 deletions app/components/build-result-summary-table/row.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<tr>
<td>{{@scenario.scenarioName}}</td>
<td class="test-result {{this.testResultClass}}">
{{#if @scenario.passed}}
Passed
{{else}}
Failed
{{#if @scenario.allowedToFail}}
(allowed)
{{/if}}
{{/if}}
</td>
</tr>
13 changes: 13 additions & 0 deletions app/components/build-result-summary-table/row.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import Component from '@glimmer/component';

export default class BuildResultSummaryTableRow extends Component {
get testResultClass() {
if (this.args.scenario.passed) {
return 'passed';
}
if (this.args.scenario.allowedToFail) {
return 'allowed-failure';
}
return 'failed';
}
}
3 changes: 3 additions & 0 deletions app/models/test-result.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ export default class TestResult extends Model {
@attr('string')
semverString;

@attr()
emberTryResults;

@belongsTo('version')
version;

Expand Down
2 changes: 1 addition & 1 deletion app/styles/_canary_test_results.scss
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
background-color: #e61313;
}

&.error {
&.error, &.allowed-failure {
background-color: #9e9e9e;
}
}
Expand Down
1 change: 1 addition & 0 deletions app/styles/app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
@import "addons_index";
@import "addons-list";
@import "components/build-result-output";
@import "components/build-result-summary-table";
@import "components/code-search";
@import "components/dependency-table";
@import "components/large-search";
Expand Down
14 changes: 14 additions & 0 deletions app/styles/components/_build-result-summary-table.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
.build-result-summary-table {
width: auto;

td {
padding: 0.75em;
}

th:first-child {
width: 15em;
}
th:not(:first-child) {
width: 8em;
}
}
5 changes: 5 additions & 0 deletions app/templates/admin/build-results/show.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@
</span>
</div>

{{#if this.buildResult.emberTryResults}}
<h2>Results</h2>
<BuildResultSummaryTable @results={{this.buildResult.emberTryResults}} />
{{/if}}

<h2>Output</h2>
<BuildResultOutput @buildResult={{this.buildResult}} />
</div>
Loading