mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Fixed the issues for all the javascript files reported by the liner.
This commit is contained in:
@@ -12,7 +12,7 @@ define([
|
||||
'pgadmin.backform',
|
||||
], function ($, Backbone, Backform) {
|
||||
describe('KeyboardshortcutControl', function () {
|
||||
let field, innerFields, control, model, event;
|
||||
let field, innerFields, control, model;
|
||||
|
||||
beforeEach(() => {
|
||||
|
||||
@@ -91,7 +91,7 @@ define([
|
||||
'key': {
|
||||
'key_code': 65,
|
||||
'char': 'A',
|
||||
}
|
||||
},
|
||||
})
|
||||
);
|
||||
|
||||
@@ -128,7 +128,7 @@ define([
|
||||
|
||||
model.set(field.get('name'),
|
||||
$.extend(true, val, {
|
||||
'control': false
|
||||
'control': false,
|
||||
})
|
||||
);
|
||||
|
||||
@@ -165,7 +165,7 @@ define([
|
||||
|
||||
model.set(field.get('name'),
|
||||
$.extend(true, val, {
|
||||
'shift': true
|
||||
'shift': true,
|
||||
})
|
||||
);
|
||||
|
||||
@@ -202,7 +202,7 @@ define([
|
||||
|
||||
model.set(field.get('name'),
|
||||
$.extend(true, val, {
|
||||
'alt_option': false
|
||||
'alt_option': false,
|
||||
})
|
||||
);
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ define([
|
||||
'key': {
|
||||
'key_code': 65,
|
||||
'char': 'A',
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
field = new Backform.Field({
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
//
|
||||
//////////////////////////////////////////////////////////////
|
||||
|
||||
import $ from 'jquery'
|
||||
import modifyAnimation from 'sources/modify_animation'
|
||||
import $ from 'jquery';
|
||||
import modifyAnimation from 'sources/modify_animation';
|
||||
|
||||
|
||||
describe('modifyAnimation', function () {
|
||||
@@ -16,7 +16,7 @@ describe('modifyAnimation', function () {
|
||||
let dummyElement;
|
||||
|
||||
beforeEach(() => {
|
||||
pgBrowser = jasmine.createSpyObj('pgBrowser', ['get_preference', 'tree'])
|
||||
pgBrowser = jasmine.createSpyObj('pgBrowser', ['get_preference', 'tree']);
|
||||
pgBrowser.tree = jasmine.createSpyObj('tree', ['options']);
|
||||
pgBrowser.tree.options.and.returnValue({
|
||||
show: {},
|
||||
|
||||
@@ -62,7 +62,7 @@ describe('Server#ModelValidation', () => {
|
||||
expect(model.errorModel.set).toHaveBeenCalledWith({
|
||||
host: 'Either Host name, Address or Service must be specified.',
|
||||
hostaddr: 'Either Host name, Address or Service must be specified.',
|
||||
db: 'Maintenance database must be specified.'
|
||||
db: 'Maintenance database must be specified.',
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -81,7 +81,7 @@ describe('Server#ModelValidation', () => {
|
||||
hostaddr: 'Either Host name, Address or Service must be specified.',
|
||||
db: 'Maintenance database must be specified.',
|
||||
username: 'Username must be specified.',
|
||||
port: 'Port must be specified.'
|
||||
port: 'Port must be specified.',
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -96,7 +96,7 @@ describe('Server#ModelValidation', () => {
|
||||
hostaddr: 'Host address must be valid IPv4 or IPv6 address.',
|
||||
db: 'Maintenance database must be specified.',
|
||||
username: 'Username must be specified.',
|
||||
port: 'Port must be specified.'
|
||||
port: 'Port must be specified.',
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -109,7 +109,7 @@ describe('Server#ModelValidation', () => {
|
||||
expect(model.errorModel.set).toHaveBeenCalledWith({
|
||||
name: 'Name must be specified.',
|
||||
username: 'Username must be specified.',
|
||||
port: 'Port must be specified.'
|
||||
port: 'Port must be specified.',
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -10,18 +10,18 @@
|
||||
import keyboardShortcuts from 'sources/keyboard_shortcuts';
|
||||
|
||||
describe('the keyboard shortcuts', () => {
|
||||
const F1_KEY = 112,
|
||||
EDIT_KEY = 71, // Key: G -> Grid values
|
||||
LEFT_ARROW_KEY = 37,
|
||||
RIGHT_ARROW_KEY = 39,
|
||||
MOVE_NEXT = 'right';
|
||||
const F1_KEY = 112;
|
||||
// const EDIT_KEY = 71; // Key: G -> Grid values
|
||||
// const LEFT_ARROW_KEY = 37;
|
||||
// const RIGHT_ARROW_KEY = 39;
|
||||
// const MOVE_NEXT = 'right';
|
||||
|
||||
let debuggerElementSpy, event, debuggerUserShortcutSpy;
|
||||
debuggerUserShortcutSpy = jasmine.createSpyObj(
|
||||
'userDefinedShortcuts', [
|
||||
{ 'edit_grid_keys': null },
|
||||
{ 'next_panel_keys': null },
|
||||
{ 'previous_panel_keys': null }
|
||||
{ 'previous_panel_keys': null },
|
||||
]
|
||||
);
|
||||
beforeEach(() => {
|
||||
|
||||
@@ -16,12 +16,12 @@ describe('debuggerUtils', function () {
|
||||
let tab_key = {
|
||||
which: 9,
|
||||
keyCode: 9,
|
||||
}
|
||||
};
|
||||
|
||||
let enter_key = {
|
||||
which: 13,
|
||||
keyCode: 13,
|
||||
}
|
||||
};
|
||||
|
||||
describe('debuggerUtils', function () {
|
||||
it('returns undefined if no command is passed', function () {
|
||||
@@ -31,7 +31,7 @@ describe('debuggerUtils', function () {
|
||||
|
||||
describe('debuggerUtils', function () {
|
||||
it('should call focus on editor', function () {
|
||||
setFocusToDebuggerEditor(editor, enter_key)
|
||||
setFocusToDebuggerEditor(editor, enter_key);
|
||||
expect(editor.focus).toHaveBeenCalled();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -61,14 +61,14 @@ import 'bootstrap';
|
||||
'alt': false,
|
||||
'shift': true,
|
||||
'control': true,
|
||||
'key': {'key_code': 91, 'char': '['}
|
||||
'key': {'key_code': 91, 'char': '['},
|
||||
};
|
||||
|
||||
forward_shortcut = {
|
||||
'alt': false,
|
||||
'shift': true,
|
||||
'control': true,
|
||||
'key': {'key_code': 93, 'char': ']'}
|
||||
'key': {'key_code': 93, 'char': ']'},
|
||||
};
|
||||
|
||||
tabNavigator = new dialogTabNavigator.dialogTabNavigator(
|
||||
|
||||
@@ -11,6 +11,6 @@ define(function () {
|
||||
return {
|
||||
'static': '/base/pgadmin/static/<path:filename>',
|
||||
'sqleditor.poll': '/sqleditor/query_tool/poll/<path:trans_id>',
|
||||
'sqleditor.query_tool_start': '/sqleditor/query_tool/start/<path:trans_id>'
|
||||
'sqleditor.query_tool_start': '/sqleditor/query_tool/start/<path:trans_id>',
|
||||
};
|
||||
});
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
import {nodeHasStatistics} from "../../../../pgadmin/static/js/misc/statistics/statistics";
|
||||
import {nodeHasStatistics} from '../../../../pgadmin/static/js/misc/statistics/statistics';
|
||||
|
||||
describe('#nodeHasStatistics', () => {
|
||||
describe('when node hasStatistics is not a function', () => {
|
||||
|
||||
@@ -7,18 +7,17 @@
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
import filterDialog from 'sources/sqleditor/filter_dialog';
|
||||
import filterDialogModel from 'sources/sqleditor/filter_dialog_model';
|
||||
// import filterDialogModel from 'sources/sqleditor/filter_dialog_model';
|
||||
|
||||
describe('filterDialog', () => {
|
||||
let sqlEditorController;
|
||||
sqlEditorController = jasmine.createSpy('sqlEditorController')
|
||||
jasmine.createSpy('sqlEditorController');
|
||||
describe('filterDialog', () => {
|
||||
describe('when using filter dialog', () => {
|
||||
beforeEach(() => {
|
||||
spyOn(filterDialog, 'dialog');
|
||||
});
|
||||
|
||||
it("it should be defined as function", function() {
|
||||
it('it should be defined as function', function() {
|
||||
expect(filterDialog.dialog).toBeDefined();
|
||||
});
|
||||
|
||||
|
||||
@@ -35,48 +35,48 @@ describe('the keyboard shortcuts', () => {
|
||||
shift: false,
|
||||
control: false,
|
||||
key: {
|
||||
key_code: F5_KEY
|
||||
}
|
||||
key_code: F5_KEY,
|
||||
},
|
||||
},
|
||||
explain: {
|
||||
alt: false,
|
||||
shift: false,
|
||||
control: false,
|
||||
key: {
|
||||
key_code: F7_KEY
|
||||
}
|
||||
key_code: F7_KEY,
|
||||
},
|
||||
},
|
||||
explain_analyze: {
|
||||
alt: false,
|
||||
shift: true,
|
||||
control: false,
|
||||
key: {
|
||||
key_code: F7_KEY
|
||||
}
|
||||
key_code: F7_KEY,
|
||||
},
|
||||
},
|
||||
download_csv: {
|
||||
alt: false,
|
||||
shift: false,
|
||||
control: false,
|
||||
key: {
|
||||
key_code: F8_KEY
|
||||
}
|
||||
key_code: F8_KEY,
|
||||
},
|
||||
},
|
||||
move_next: {
|
||||
alt: false,
|
||||
shift: false,
|
||||
control: false,
|
||||
key: {
|
||||
key_code: null
|
||||
}
|
||||
key_code: null,
|
||||
},
|
||||
},
|
||||
move_previous: {
|
||||
alt: false,
|
||||
shift: false,
|
||||
control: false,
|
||||
key: {
|
||||
key_code: null
|
||||
}
|
||||
key_code: null,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
import {
|
||||
httpResponseRequiresNewTransaction,
|
||||
handleQueryToolAjaxError
|
||||
handleQueryToolAjaxError,
|
||||
} from '../../../pgadmin/static/js/sqleditor/query_tool_http_error_handler';
|
||||
|
||||
describe('#httpResponseRequiresNewTransaction', () => {
|
||||
@@ -71,7 +71,7 @@ describe('#httpResponseRequiresNewTransaction', () => {
|
||||
describe('#handleQueryToolAjaxError', () => {
|
||||
let sqlEditorHandler,
|
||||
exceptionSpy, stateToSave,
|
||||
stateParameters, checkTransaction, UserManagementMock,
|
||||
stateParameters, checkTransaction,
|
||||
pgBrowserMock;
|
||||
|
||||
beforeEach(() => {
|
||||
@@ -90,8 +90,8 @@ describe('#handleQueryToolAjaxError', () => {
|
||||
};
|
||||
pgBrowserMock = {
|
||||
'Browser': {
|
||||
'UserManagement': jasmine.createSpyObj('UserManagement', ['isPgaLoginRequired', 'pgaLogin'])
|
||||
}
|
||||
'UserManagement': jasmine.createSpyObj('UserManagement', ['isPgaLoginRequired', 'pgaLogin']),
|
||||
},
|
||||
};
|
||||
});
|
||||
|
||||
@@ -149,7 +149,7 @@ describe('#handleQueryToolAjaxError', () => {
|
||||
exceptionSpy.readyState = 1;
|
||||
exceptionSpy.status = 503;
|
||||
exceptionSpy.responseJSON = {
|
||||
'info': 'CONNECTION_LOST'
|
||||
'info': 'CONNECTION_LOST',
|
||||
};
|
||||
pgBrowserMock.Browser.UserManagement.isPgaLoginRequired.and.returnValue(false);
|
||||
checkTransaction = false;
|
||||
|
||||
Reference in New Issue
Block a user