mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Ensure the correct label is used in panel headers when viewing filtered rows. Fixes #4228
This commit is contained in:
committed by
Dave Page
parent
d774a0ff67
commit
23364464c2
@@ -63,6 +63,7 @@ describe('#show_data', () => {
|
||||
label: 'server1',
|
||||
server_type: 'pg',
|
||||
_id: 2,
|
||||
user: {name: 'someuser'},
|
||||
}, ['parent', 'server_group1']);
|
||||
pgBrowser.treeMenu.addChild(serverGroup1, server1);
|
||||
|
||||
@@ -133,7 +134,7 @@ describe('#show_data', () => {
|
||||
'false',
|
||||
'pg',
|
||||
'',
|
||||
'schema1.schema1',
|
||||
'schema1.schema1/database1/someuser@server1',
|
||||
''
|
||||
);
|
||||
});
|
||||
@@ -148,7 +149,7 @@ describe('#show_data', () => {
|
||||
'false',
|
||||
'pg',
|
||||
'',
|
||||
'view1.view1',
|
||||
'view1.view1/database1/someuser@server1',
|
||||
''
|
||||
);
|
||||
});
|
||||
@@ -163,7 +164,7 @@ describe('#show_data', () => {
|
||||
'false',
|
||||
'pg',
|
||||
'',
|
||||
'catalog1.catalog1',
|
||||
'catalog1.catalog1/database1/someuser@server1',
|
||||
''
|
||||
);
|
||||
});
|
||||
|
||||
@@ -51,6 +51,8 @@ describe('#showQueryTool', () => {
|
||||
label: 'server1',
|
||||
server_type: 'pg',
|
||||
_id: 2,
|
||||
user: {name: 'someuser'},
|
||||
db: 'otherdblabel',
|
||||
});
|
||||
pgBrowser.treeMenu.addChild(serverGroup1, server1);
|
||||
|
||||
@@ -64,7 +66,7 @@ describe('#showQueryTool', () => {
|
||||
|
||||
context('cannot find the tree node', () => {
|
||||
beforeEach(() => {
|
||||
showQueryTool(queryTool, pgBrowser, alertify, '', [{id: '10'}], 'title');
|
||||
showQueryTool(queryTool, pgBrowser, alertify, '', [{id: '10'}]);
|
||||
});
|
||||
it('does not create a transaction', () => {
|
||||
expect(queryTool.create_transaction).not.toHaveBeenCalled();
|
||||
@@ -92,14 +94,14 @@ describe('#showQueryTool', () => {
|
||||
context('current node is underneath a server', () => {
|
||||
context('current node is not underneath a database', () => {
|
||||
it('creates a transaction', () => {
|
||||
showQueryTool(queryTool, pgBrowser, alertify, 'http://someurl', [{id: 'server1'}], 'title');
|
||||
showQueryTool(queryTool, pgBrowser, alertify, 'http://someurl', [{id: 'server1'}]);
|
||||
expect(queryTool.create_transaction).toHaveBeenCalledWith(
|
||||
'/initialize/query_tool/1/2',
|
||||
null,
|
||||
'true',
|
||||
'pg',
|
||||
'http://someurl',
|
||||
'title',
|
||||
'otherdblabel/someuser@server1',
|
||||
'',
|
||||
false
|
||||
);
|
||||
@@ -115,7 +117,7 @@ describe('#showQueryTool', () => {
|
||||
'true',
|
||||
'pg',
|
||||
'http://someurl',
|
||||
'title',
|
||||
'database1/someuser@server1',
|
||||
'',
|
||||
false
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user