Always Show Embeddable Panel Header in Edit Mode (#79152)

* Always show header in edit mode
This commit is contained in:
Devon Thomson 2020-10-01 14:52:28 -04:00 committed by GitHub
parent 46084cbbe8
commit e08f6a38f6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -136,7 +136,7 @@ export function PanelHeader({
}: PanelHeaderProps) {
const viewDescription = getViewDescription(embeddable);
const showTitle = !hidePanelTitle && (!isViewMode || title || viewDescription !== '');
const showPanelBar = badges.length > 0 || notifications.length > 0 || showTitle;
const showPanelBar = !isViewMode || badges.length > 0 || notifications.length > 0 || showTitle;
const classes = classNames('embPanel__header', {
// eslint-disable-next-line @typescript-eslint/naming-convention
'embPanel__header--floater': !showPanelBar,

View file

@ -44,7 +44,7 @@ export default function ({ getService, getPageObjects }) {
await PageObjects.dashboard.checkHideTitle();
await retry.try(async () => {
const titles = await PageObjects.dashboard.getPanelTitles();
expect(titles[0]).to.eql(undefined);
expect(titles[0]).to.eql('');
});
});