|
|
@ -45,11 +45,7 @@ export const addPanel = (config?: Partial<AddPanelConfig>): any => |
|
|
|
.scrollIntoView() |
|
|
|
.scrollIntoView() |
|
|
|
.click(); |
|
|
|
.click(); |
|
|
|
|
|
|
|
|
|
|
|
isOptionsOpen().then((isOpen: any) => { |
|
|
|
openOptions(); |
|
|
|
if (!isOpen) { |
|
|
|
|
|
|
|
toggleOptions(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
openOptionsGroup('settings'); |
|
|
|
openOptionsGroup('settings'); |
|
|
|
getOptionsGroup('settings') |
|
|
|
getOptionsGroup('settings') |
|
|
@ -75,11 +71,7 @@ export const addPanel = (config?: Partial<AddPanelConfig>): any => |
|
|
|
//e2e.components.Panels.Panel.containerByTitle(panelTitle).find('.panel-content').contains('No data');
|
|
|
|
//e2e.components.Panels.Panel.containerByTitle(panelTitle).find('.panel-content').contains('No data');
|
|
|
|
//e2e.components.QueryEditorRow.actionButton('Disable/enable query').click();
|
|
|
|
//e2e.components.QueryEditorRow.actionButton('Disable/enable query').click();
|
|
|
|
|
|
|
|
|
|
|
|
isOptionsOpen().then((isOpen: any) => { |
|
|
|
closeOptions(); |
|
|
|
if (isOpen) { |
|
|
|
|
|
|
|
toggleOptions(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
e2e() |
|
|
|
e2e() |
|
|
|
.get('button[title="Apply changes and go back to dashboard"]') |
|
|
|
.get('button[title="Apply changes and go back to dashboard"]') |
|
|
@ -89,6 +81,14 @@ export const addPanel = (config?: Partial<AddPanelConfig>): any => |
|
|
|
return e2e().wrap({ config: fullConfig }); |
|
|
|
return e2e().wrap({ config: fullConfig }); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// @todo this actually returns type `Cypress.Chainable`
|
|
|
|
|
|
|
|
const closeOptions = (): any => |
|
|
|
|
|
|
|
isOptionsOpen().then((isOpen: any) => { |
|
|
|
|
|
|
|
if (isOpen) { |
|
|
|
|
|
|
|
e2e.components.PanelEditor.OptionsPane.close().click(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
// @todo this actually returns type `Cypress.Chainable`
|
|
|
|
// @todo this actually returns type `Cypress.Chainable`
|
|
|
|
const closeOptionsGroup = (name: string): any => |
|
|
|
const closeOptionsGroup = (name: string): any => |
|
|
|
isOptionsGroupOpen(name).then((isOpen: any) => { |
|
|
|
isOptionsGroupOpen(name).then((isOpen: any) => { |
|
|
@ -118,6 +118,14 @@ const isOptionsOpen = (): any => |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// @todo this actually returns type `Cypress.Chainable`
|
|
|
|
|
|
|
|
const openOptions = (): any => |
|
|
|
|
|
|
|
isOptionsOpen().then((isOpen: any) => { |
|
|
|
|
|
|
|
if (!isOpen) { |
|
|
|
|
|
|
|
e2e.components.PanelEditor.OptionsPane.open().click(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
// @todo this actually returns type `Cypress.Chainable`
|
|
|
|
// @todo this actually returns type `Cypress.Chainable`
|
|
|
|
const openOptionsGroup = (name: string): any => |
|
|
|
const openOptionsGroup = (name: string): any => |
|
|
|
isOptionsGroupOpen(name).then((isOpen: any) => { |
|
|
|
isOptionsGroupOpen(name).then((isOpen: any) => { |
|
|
@ -126,8 +134,6 @@ const openOptionsGroup = (name: string): any => |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
const toggleOptions = () => e2e.components.PanelEditor.OptionsPane.close().click(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const toggleOptionsGroup = (name: string) => |
|
|
|
const toggleOptionsGroup = (name: string) => |
|
|
|
getOptionsGroup(name) |
|
|
|
getOptionsGroup(name) |
|
|
|
.find('.editor-options-group-toggle') |
|
|
|
.find('.editor-options-group-toggle') |
|
|
|