mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Hide menu options for creating objects, if the object type is set to hidden. Includes Jasmine tests. Fixes #2225
This commit is contained in:
committed by
Dave Page
parent
dd318e679d
commit
aea0d93390
32
web/regression/javascript/check_node_visiblity_spec.js
Normal file
32
web/regression/javascript/check_node_visiblity_spec.js
Normal file
@@ -0,0 +1,32 @@
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// pgAdmin 4 - PostgreSQL Tools
|
||||
//
|
||||
// Copyright (C) 2013 - 2017, The pgAdmin Development Team
|
||||
// This software is released under the PostgreSQL Licence
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
define(["sources/check_node_visibility"],
|
||||
function (checkNodeVisibility, pgBrowser) {
|
||||
describe("checkNodeVisibility", function () {
|
||||
|
||||
var browser;
|
||||
|
||||
browser = jasmine.createSpyObj('browser', [
|
||||
'node_preference_data', 'get_preference']
|
||||
);
|
||||
|
||||
describe("when node is server collection", function () {
|
||||
it("returns true", function () {
|
||||
expect(checkNodeVisibility(browser, 'coll-server')).toEqual(true);
|
||||
});
|
||||
});
|
||||
|
||||
describe("when node is server", function () {
|
||||
it("returns true", function () {
|
||||
expect(checkNodeVisibility(browser, 'server')).toEqual(true);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -32,6 +32,7 @@ require.config({
|
||||
'jquery.ui': sourcesDir + 'vendor/jquery-ui/jquery-ui-1.11.3',
|
||||
'jquery.event.drag': sourcesDir + 'vendor/jquery-ui/jquery.event.drag-2.2',
|
||||
'underscore': sourcesDir + 'vendor/underscore/underscore',
|
||||
'underscore.string': sourcesDir + 'vendor/underscore/underscore.string',
|
||||
'slickgrid': sourcesDir + 'vendor/slickgrid/slick.core',
|
||||
'slickgrid/slick.grid': sourcesDir + 'vendor/slickgrid/slick.grid',
|
||||
'slickgrid/slick.rowselectionmodel': sourcesDir + 'vendor/slickgrid/plugins/slick.rowselectionmodel',
|
||||
|
||||
Reference in New Issue
Block a user