mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
One more attempt to fix Jasmin test cases.
This commit is contained in:
parent
b76bb58378
commit
71a8c0f317
@ -35,7 +35,7 @@ describe('fileSelectDialog', function () {
|
|||||||
else if (iw > pgAdmin.Browser.stdW.sm)
|
else if (iw > pgAdmin.Browser.stdW.sm)
|
||||||
return pgAdmin.Browser.stdW.sm;
|
return pgAdmin.Browser.stdW.sm;
|
||||||
else
|
else
|
||||||
// if avilable screen resolution is still
|
// if available screen resolution is still
|
||||||
// less then return the width value as it
|
// less then return the width value as it
|
||||||
return iw;
|
return iw;
|
||||||
}
|
}
|
||||||
@ -57,7 +57,7 @@ describe('fileSelectDialog', function () {
|
|||||||
else if (ih > pgAdmin.Browser.stdH.md)
|
else if (ih > pgAdmin.Browser.stdH.md)
|
||||||
return pgAdmin.Browser.stdH.md;
|
return pgAdmin.Browser.stdH.md;
|
||||||
else
|
else
|
||||||
// if avilable screen resolution is still
|
// if available screen resolution is still
|
||||||
// less then return the height value as it
|
// less then return the height value as it
|
||||||
return ih;
|
return ih;
|
||||||
}
|
}
|
||||||
@ -86,7 +86,7 @@ describe('fileSelectDialog', function () {
|
|||||||
else if (iw > pgAdmin.Browser.stdW.sm)
|
else if (iw > pgAdmin.Browser.stdW.sm)
|
||||||
return pgAdmin.Browser.stdW.sm;
|
return pgAdmin.Browser.stdW.sm;
|
||||||
else
|
else
|
||||||
// if avilable screen resolution is still
|
// if available screen resolution is still
|
||||||
// less then return the width value as it
|
// less then return the width value as it
|
||||||
return iw;
|
return iw;
|
||||||
}
|
}
|
||||||
@ -108,7 +108,7 @@ describe('fileSelectDialog', function () {
|
|||||||
else if (ih > pgAdmin.Browser.stdH.md)
|
else if (ih > pgAdmin.Browser.stdH.md)
|
||||||
return pgAdmin.Browser.stdH.md;
|
return pgAdmin.Browser.stdH.md;
|
||||||
else
|
else
|
||||||
// if avilable screen resolution is still
|
// if available screen resolution is still
|
||||||
// less then return the height value as it
|
// less then return the height value as it
|
||||||
return ih;
|
return ih;
|
||||||
}
|
}
|
||||||
@ -151,6 +151,56 @@ describe('fileSelectDialog', function () {
|
|||||||
});
|
});
|
||||||
|
|
||||||
describe('When dialog is called for storage file', () => {
|
describe('When dialog is called for storage file', () => {
|
||||||
|
beforeEach(() => {
|
||||||
|
pgAdmin.Browser = {
|
||||||
|
stdW: {
|
||||||
|
sm: 500,
|
||||||
|
md: 700,
|
||||||
|
lg: 900,
|
||||||
|
default: 500,
|
||||||
|
calc: (passed_width) => {
|
||||||
|
let iw = window.innerWidth;
|
||||||
|
if(iw > passed_width){
|
||||||
|
return passed_width;
|
||||||
|
}else{
|
||||||
|
if (iw > pgAdmin.Browser.stdW.lg)
|
||||||
|
return pgAdmin.Browser.stdW.lg;
|
||||||
|
else if (iw > pgAdmin.Browser.stdW.md)
|
||||||
|
return pgAdmin.Browser.stdW.md;
|
||||||
|
else if (iw > pgAdmin.Browser.stdW.sm)
|
||||||
|
return pgAdmin.Browser.stdW.sm;
|
||||||
|
else
|
||||||
|
// if available screen resolution is still
|
||||||
|
// less then return the width value as it
|
||||||
|
return iw;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
stdH: {
|
||||||
|
sm: 200,
|
||||||
|
md: 400,
|
||||||
|
lg: 550,
|
||||||
|
default: 550,
|
||||||
|
calc: (passed_height) => {
|
||||||
|
// We are excluding sm as it is too small for dialog
|
||||||
|
let ih = window.innerHeight;
|
||||||
|
if (ih > passed_height){
|
||||||
|
return passed_height;
|
||||||
|
}else{
|
||||||
|
if (ih > pgAdmin.Browser.stdH.lg)
|
||||||
|
return pgAdmin.Browser.stdH.lg;
|
||||||
|
else if (ih > pgAdmin.Browser.stdH.md)
|
||||||
|
return pgAdmin.Browser.stdH.md;
|
||||||
|
else
|
||||||
|
// if available screen resolution is still
|
||||||
|
// less then return the height value as it
|
||||||
|
return ih;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
it('Storage file dialog', function() {
|
it('Storage file dialog', function() {
|
||||||
params = {
|
params = {
|
||||||
'dialog_title': 'Storage Manager',
|
'dialog_title': 'Storage Manager',
|
||||||
|
Loading…
Reference in New Issue
Block a user