mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Add EXPLAIN options for SETTINGS and SUMMARY. Fixes #4335
Prevent flickering of large tooltips on the Graphical EXPLAIN canvas. Fixes #4224 EXPLAIN options should be Query Tool instance-specific. Fixes #4395
This commit is contained in:
committed by
Dave Page
parent
15556f9f89
commit
0340b8fb28
@@ -30,6 +30,7 @@ describe('ExplainStatistics', () => {
|
||||
|
||||
statsModel.set('JIT', []);
|
||||
statsModel.set('Triggers', []);
|
||||
statsModel.set('Summary', {});
|
||||
statsModel.set_statistics(tooltipContainer);
|
||||
|
||||
expect($('.pg-explain-stats-area').hasClass('d-none')).toEqual(true);
|
||||
@@ -93,4 +94,37 @@ describe('ExplainStatistics', () => {
|
||||
expect(tooltipContainer.css('opacity')).toEqual('0');
|
||||
});
|
||||
});
|
||||
|
||||
describe('Summary', () => {
|
||||
beforeEach(function() {
|
||||
$('body').append(statsDiv);
|
||||
statsModel.set('JIT', []);
|
||||
statsModel.set('Triggers', []);
|
||||
statsModel.set('Summary', {
|
||||
'Planning Time': 0.12,
|
||||
'Execution Time': 2.34,
|
||||
});
|
||||
statsModel.set_statistics(tooltipContainer);
|
||||
});
|
||||
|
||||
it('Statistics button should be visible', () => {
|
||||
expect($('.pg-explain-stats-area').hasClass('d-none')).toEqual(false);
|
||||
});
|
||||
|
||||
it('Mouse over event should be trigger', () => {
|
||||
// Trigger mouse over event
|
||||
var hoverEvent = new $.Event('mouseover');
|
||||
$('.pg-explain-stats-area').trigger(hoverEvent);
|
||||
|
||||
expect(tooltipContainer.css('opacity')).toEqual('0.8');
|
||||
});
|
||||
|
||||
it('Mouse out event should be trigger', () => {
|
||||
// Trigger mouse out event
|
||||
var hoverEvent = new $.Event('mouseout');
|
||||
$('.pg-explain-stats-area').trigger(hoverEvent);
|
||||
|
||||
expect(tooltipContainer.css('opacity')).toEqual('0');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user