mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-03 20:20:46 -06:00
1) Fixes the broken explain GUI test case.
2) Displays a tooltip "Click for details..." on hover over explain plan nodes. refs #5488
This commit is contained in:
parent
850afd7402
commit
57a2559f11
@ -313,7 +313,7 @@ class CheckForXssFeatureTest(BaseFeatureTest):
|
|||||||
self.driver.find_element_by_css_selector(
|
self.driver.find_element_by_css_selector(
|
||||||
'div.pgadmin-explain-container > svg > g > g > image'
|
'div.pgadmin-explain-container > svg > g > g > image'
|
||||||
)
|
)
|
||||||
).perform()
|
).click().perform()
|
||||||
break
|
break
|
||||||
except Exception:
|
except Exception:
|
||||||
if idx != 2:
|
if idx != 2:
|
||||||
@ -326,8 +326,8 @@ class CheckForXssFeatureTest(BaseFeatureTest):
|
|||||||
)
|
)
|
||||||
raise
|
raise
|
||||||
|
|
||||||
source_code = self.driver.find_element_by_id(
|
source_code = self.driver.find_element_by_css_selector(
|
||||||
'toolTip').get_attribute('innerHTML')
|
'.pgadmin-explain-details:not(.d-none)').get_attribute('innerHTML')
|
||||||
|
|
||||||
self._check_escaped_characters(
|
self._check_escaped_characters(
|
||||||
source_code,
|
source_code,
|
||||||
|
@ -947,7 +947,10 @@ define('pgadmin.misc.explain', [
|
|||||||
IMAGE_WIDTH,
|
IMAGE_WIDTH,
|
||||||
IMAGE_HEIGHT
|
IMAGE_HEIGHT
|
||||||
);
|
);
|
||||||
image.attr({style: 'cursor: pointer'});
|
image.attr({
|
||||||
|
style: 'cursor: pointer',
|
||||||
|
class: 'image-node',
|
||||||
|
});
|
||||||
|
|
||||||
// Draw tooltip
|
// Draw tooltip
|
||||||
var image_data = this.toJSON(),
|
var image_data = this.toJSON(),
|
||||||
@ -1478,6 +1481,10 @@ define('pgadmin.misc.explain', [
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
container.find('.image-node').tooltip({
|
||||||
|
title: gettext('Click for details...'),
|
||||||
|
template: '<div class="tooltip" role="tooltip"><div class="arrow d-none"></div><div class="tooltip-inner"></div></div>',
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
_renderExplainTable(ctx._explainTable, explainTable);
|
_renderExplainTable(ctx._explainTable, explainTable);
|
||||||
|
Loading…
Reference in New Issue
Block a user