[results feed] Show skips in yellow
Change-Id: I8f1925d11008c7776df76f540a2c4807ad88551e
Reviewed-on: https://dart-review.googlesource.com/c/dart_ci/+/160322
Reviewed-by: Alexander Thomas <athom@google.com>
diff --git a/results_feed/lib/src/components/results.css b/results_feed/lib/src/components/results.css
index bacfa5a..e7abb68 100644
--- a/results_feed/lib/src/components/results.css
+++ b/results_feed/lib/src/components/results.css
@@ -7,6 +7,7 @@
.failure { background-color:lightCoral; }
.success { background-color:lightGreen; }
.flaky { background-color:gold; }
+.skipped { background-color:gold; }
.indent { margin-left: 16px; }
span.nowrap { white-space: nowrap; }
diff --git a/results_feed/lib/src/model/commit.dart b/results_feed/lib/src/model/commit.dart
index a3ab22b..ceffc6c 100644
--- a/results_feed/lib/src/model/commit.dart
+++ b/results_feed/lib/src/model/commit.dart
@@ -213,7 +213,7 @@
// Field is only present when true.
document.get('active') ?? false,
);
- static const skipped = 'skipped';
+ static const skippedResult = 'skipped';
static const oldFlakyResult = 'flaky';
static const flakyResult = 'Flaky';
@@ -237,9 +237,12 @@
@override
int compareTo(Object other) => name.compareTo((other as Change).name);
- bool get failed => result != expected && result != skipped;
bool get flaky => result == oldFlakyResult || result == flakyResult;
- String get resultStyle => failed ? flaky ? 'flaky' : 'failure' : 'success';
+ bool get skipped => result == skippedResult;
+ bool get success => result == expected;
+ bool get failed => !flaky && !skipped && !success;
+ String get resultStyle =>
+ flaky ? 'flaky' : skipped ? 'skipped' : success ? 'success' : 'failure';
}
class Changes with IterableMixin<List<List<Change>>> {