FIX: Flaky tests. Due to CSS transitions opacity might not be 0 yet.

FIX: Flaky tests. Due to CSS transitions opacity might not be 0 yet.

diff --git a/test/javascripts/helpers/assertions.js b/test/javascripts/helpers/assertions.js
index 81fbd40..2413572 100644
--- a/test/javascripts/helpers/assertions.js
+++ b/test/javascripts/helpers/assertions.js
@@ -15,7 +15,7 @@ function invisible(selector) {
   const $items = find(selector + ":visible");
   return (
     $items.length === 0 ||
-    $items.css("opacity") === "0" ||
+    $items.css("opacity") !== "1" ||
     $items.css("visibility") === "hidden"
   );
 }

GitHub sha: 2edee747

I think I have seen another user card test failing after this commit, but it seems to have improved situation :+1:

1 Like