Fix flaky //scouting:scouting_test
The test occasionally fails because of the alerts that pop up when
navigating away from the page. I've failed to make protractor deal
with the alerts in a reliable way. So this patch turns them off.
There's a special hidden checkbox that the test checks. When it's
checked, the scouting application does not display alerts. It's hacky,
but it seems to work. Rather than failing ~10 out of 1000 times, the
test now fails 0 out of 1000 times.
Signed-off-by: Philipp Schrader <philipp.schrader@gmail.com>
Change-Id: I2e920771c1605464994d7877da2bbb62a2e69d1f
diff --git a/scouting/www/common.css b/scouting/www/common.css
index 35e943f..43f117e 100644
--- a/scouting/www/common.css
+++ b/scouting/www/common.css
@@ -8,3 +8,10 @@
* I.e. It would be nice to keep the error message and the progress message
* aligned when they are non-empty. */
}
+
+/* Hidden from the user, but interactable from protractor. */
+.visually-hidden {
+ position: absolute !important;
+ top: -9999px !important;
+ left: -9999px !important;
+}