@ -142,8 +142,8 @@ describe('Explore: Query History', () => {
await assertQueryHistory ( [ '{"expr":"query #2"}' , '{"expr":"query #1"}' ] ) ;
} ) ;
// FIXME: flaky test
it . skip ( 'updates the state in both Explore panes' , async ( ) = > {
describe ( 'updates the state in both Explore panes' , ( ) = > {
beforeEach ( async ( ) = > {
const urlParams = {
left : serializeStateToUrlParam ( {
datasource : 'loki' ,
@ -162,12 +162,16 @@ describe('Explore: Query History', () => {
await waitForExplore ( ) ;
await waitForExplore ( 'right' ) ;
// queries in history
await openQueryHistory ( 'left' ) ;
await assertQueryHistory ( [ '{"expr":"query #2"}' , '{"expr":"query #1"}' ] , 'left' ) ;
await openQueryHistory ( 'right' ) ;
} ) ;
it ( 'initial state is in sync' , async ( ) = > {
await assertQueryHistory ( [ '{"expr":"query #2"}' , '{"expr":"query #1"}' ] , 'left' ) ;
await assertQueryHistory ( [ '{"expr":"query #2"}' , '{"expr":"query #1"}' ] , 'right' ) ;
} ) ;
it ( 'starred queries are synced' , async ( ) = > {
// star one one query
await starQueryHistory ( 1 , 'left' ) ;
await assertQueryHistoryIsStarred ( [ false , true ] , 'left' ) ;
@ -176,7 +180,9 @@ describe('Explore: Query History', () => {
queryHistoryEnabled : false ,
newValue : true ,
} ) ;
} ) ;
it ( 'deleted queries are synced' , async ( ) = > {
await deleteQueryHistory ( 0 , 'left' ) ;
await assertQueryHistory ( [ '{"expr":"query #1"}' ] , 'left' ) ;
await assertQueryHistory ( [ '{"expr":"query #1"}' ] , 'right' ) ;
@ -184,6 +190,7 @@ describe('Explore: Query History', () => {
queryHistoryEnabled : false ,
} ) ;
} ) ;
} ) ;
it ( 'add comments to query history' , async ( ) = > {
const urlParams = {