[results feed] Display new flaky tests in gold
Change-Id: Ie97ead0a9be436abd2f29779cf032134cccdbe67
Reviewed-on: https://dart-review.googlesource.com/c/dart_ci/+/158321
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 5926294..bacfa5a 100644
--- a/results_feed/lib/src/components/results.css
+++ b/results_feed/lib/src/components/results.css
@@ -6,6 +6,7 @@
.failure { background-color:lightCoral; }
.success { background-color:lightGreen; }
+.flaky { 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 7da9c8e..a3ab22b 100644
--- a/results_feed/lib/src/model/commit.dart
+++ b/results_feed/lib/src/model/commit.dart
@@ -214,6 +214,8 @@
document.get('active') ?? false,
);
static const skipped = 'skipped';
+ static const oldFlakyResult = 'flaky';
+ static const flakyResult = 'Flaky';
final String id;
final String name;
@@ -236,7 +238,8 @@
int compareTo(Object other) => name.compareTo((other as Change).name);
bool get failed => result != expected && result != skipped;
- String get resultStyle => failed ? 'failure' : 'success';
+ bool get flaky => result == oldFlakyResult || result == flakyResult;
+ String get resultStyle => failed ? flaky ? 'flaky' : 'failure' : 'success';
}
class Changes with IterableMixin<List<List<Change>>> {