From 56d5c9052a1f2e6243442af842f5babebee804eb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Atte=20Kein=C3=A4nen?= <atte.keinanen@gmail.com>
Date: Tue, 26 Sep 2017 15:02:23 +0300
Subject: [PATCH] Try to fix transient CI failures in
 ObjectDetail.integ.spec.js

---
 .../visualizations/components/ObjectDetail.integ.spec.js    | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/frontend/test/visualizations/components/ObjectDetail.integ.spec.js b/frontend/test/visualizations/components/ObjectDetail.integ.spec.js
index c9c11f2e03b..18538b07d25 100644
--- a/frontend/test/visualizations/components/ObjectDetail.integ.spec.js
+++ b/frontend/test/visualizations/components/ObjectDetail.integ.spec.js
@@ -10,6 +10,7 @@ import {
 } from "__support__/enzyme_utils"
 
 import { mount } from 'enzyme'
+import { delay } from 'metabase/lib/promise'
 
 import {
     INITIALIZE_QB,
@@ -42,6 +43,7 @@ describe('ObjectDetail', () => {
             const app = mount(store.getAppContainer());
 
             await store.waitForActions([INITIALIZE_QB, QUERY_COMPLETED]);
+            await delay(100); // Trying to address random CI failures with a small delay
 
             expect(app.find('.ObjectDetail h1').text()).toEqual("2")
 
@@ -49,12 +51,14 @@ describe('ObjectDetail', () => {
             click(previousObjectTrigger)
 
             await store.waitForActions([QUERY_COMPLETED]);
+            await delay(100); // Trying to address random CI failures with a small delay
 
             expect(app.find('.ObjectDetail h1').text()).toEqual("1")
             const nextObjectTrigger = app.find('.Icon.Icon-forwardArrow')
             click(nextObjectTrigger)
 
             await store.waitForActions([QUERY_COMPLETED]);
+            await delay(100); // Trying to address random CI failures with a small delay
 
             expect(app.find('.ObjectDetail h1').text()).toEqual("2")
 
@@ -63,11 +67,13 @@ describe('ObjectDetail', () => {
             // left arrow
             dispatchBrowserEvent('keydown', { key: 'ArrowLeft' })
             await store.waitForActions([QUERY_COMPLETED]);
+            await delay(100); // Trying to address random CI failures with a small delay
             expect(app.find('.ObjectDetail h1').text()).toEqual("1")
 
             // left arrow
             dispatchBrowserEvent('keydown', { key: 'ArrowRight' })
             await store.waitForActions([QUERY_COMPLETED]);
+            await delay(100); // Trying to address random CI failures with a small delay
             expect(app.find('.ObjectDetail h1').text()).toEqual("2")
         })
     })
-- 
GitLab