public inbox for [email protected]
help / color / mirror / Atom feed[pgAdmin4][Patch] - Jasmine Tests Fixes
2+ messages / 2 participants
[nested] [flat]
* [pgAdmin4][Patch] - Jasmine Tests Fixes
@ 2020-10-21 13:38 Khushboo Vashi <[email protected]>
0 siblings, 1 reply; 2+ messages in thread
From: Khushboo Vashi @ 2020-10-21 13:38 UTC (permalink / raw)
To: pgadmin-hackers
Hi,
Please find the attached patch to fix the Jasmine tests failure.
It was due to 18cad32bd4541e1993a051028bee81a2310d020c commit.
Thanks,
Khushboo
Attachments:
[application/octet-stream] jasmine_test_fixes.patch (2.6K, 3-jasmine_test_fixes.patch)
download | inline diff:
diff --git a/web/regression/javascript/file_manager/file_manager_specs.js b/web/regression/javascript/file_manager/file_manager_specs.js
index 0485ee2cb..de4c1de69 100644
--- a/web/regression/javascript/file_manager/file_manager_specs.js
+++ b/web/regression/javascript/file_manager/file_manager_specs.js
@@ -65,8 +65,59 @@ describe('fileSelectDialog', function () {
},
};
- describe('When dialog is called for select file', () => {
- it('Select file dialog', function() {
+ describe('When dialog is called for', () => {
+
+ 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 avilable 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 avilable screen resolution is still
+ // less then return the height value as it
+ return ih;
+ }
+ },
+ },
+ };
+ });
+
+ it('Select file', function() {
params = {
'dialog_title': 'Select file',
'dialog_type': 'select_file',
@@ -81,10 +132,8 @@ describe('fileSelectDialog', function () {
expect(Alertify.fileSelectionDlg).toHaveBeenCalled();
});
- });
- describe('When dialog is called for create file', () => {
- it('Select file dialog', function() {
+ it('create file', function() {
params = {
'dialog_title': 'Create file',
'dialog_type': 'create_file',
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: [pgAdmin4][Patch] - Jasmine Tests Fixes
@ 2020-10-21 16:47 Akshay Joshi <[email protected]>
parent: Khushboo Vashi <[email protected]>
0 siblings, 0 replies; 2+ messages in thread
From: Akshay Joshi @ 2020-10-21 16:47 UTC (permalink / raw)
To: Khushboo Vashi <[email protected]>; +Cc: pgadmin-hackers
Thanks, patch applied.
On Wed, Oct 21, 2020 at 7:08 PM Khushboo Vashi <
[email protected]> wrote:
> Hi,
>
> Please find the attached patch to fix the Jasmine tests failure.
> It was due to 18cad32bd4541e1993a051028bee81a2310d020c commit.
>
> Thanks,
> Khushboo
>
--
*Thanks & Regards*
*Akshay Joshi*
*pgAdmin Hacker | Sr. Software Architect*
*EDB Postgres <http://edbpostgres.com>*
*Mobile: +91 976-788-8246*
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2020-10-21 16:47 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-10-21 13:38 [pgAdmin4][Patch] - Jasmine Tests Fixes Khushboo Vashi <[email protected]>
2020-10-21 16:47 ` Akshay Joshi <[email protected]>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox