Fixed code smell 'Update this function so that its implementation is not identical' reported by SonarQube.

This commit is contained in:
Akshay Joshi
2022-01-31 20:04:04 +05:30
parent bc0b25d995
commit b9e533e31a
13 changed files with 749 additions and 1583 deletions
@@ -41,6 +41,14 @@ describe('ExplainStatistics', () => {
});
});
let mouseClickAction = ()=> {
// Trigger mouse over event
var clickEvent = new $.Event('click');
$('.pg-explain-stats-area').trigger(clickEvent);
expect(tooltipContainer.hasClass('d-none')).toBe(false);
};
describe('JIT Statistics', () => {
beforeEach(function() {
$('body').append(statsDiv);
@@ -54,11 +62,7 @@ describe('ExplainStatistics', () => {
});
it('Mouse click event should be trigger', () => {
// Trigger mouse over event
var clickEvent = new $.Event('click');
$('.pg-explain-stats-area').trigger(clickEvent);
expect(tooltipContainer.hasClass('d-none')).toBe(false);
mouseClickAction();
});
});
@@ -75,11 +79,7 @@ describe('ExplainStatistics', () => {
});
it('Mouse click event should be trigger', () => {
// Trigger mouse over event
var clickEvent = new $.Event('click');
$('.pg-explain-stats-area').trigger(clickEvent);
expect(tooltipContainer.hasClass('d-none')).toBe(false);
mouseClickAction();
});
});
@@ -100,11 +100,7 @@ describe('ExplainStatistics', () => {
});
it('Mouse click event should be trigger', () => {
// Trigger mouse over event
var clickEvent = new $.Event('click');
$('.pg-explain-stats-area').trigger(clickEvent);
expect(tooltipContainer.hasClass('d-none')).toBe(false);
mouseClickAction();
});
});
});