Skip to content
Snippets Groups Projects
Commit 56d5c905 authored by Atte Keinänen's avatar Atte Keinänen
Browse files

Try to fix transient CI failures in ObjectDetail.integ.spec.js

parent 95eb033c
No related branches found
No related tags found
No related merge requests found
......@@ -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")
})
})
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment