Re: JS Test error on Windows

From: Dave Page <dpage(at)pgadmin(dot)org>
To: Aditya Toshniwal <aditya(dot)toshniwal(at)enterprisedb(dot)com>
Cc: Murtuza Zabuawala <murtuza(dot)zabuawala(at)enterprisedb(dot)com>, pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>, Khushboo Vashi <khushboo(dot)vashi(at)enterprisedb(dot)com>
Subject: Re: JS Test error on Windows
Date: 2018-05-11 09:56:11
Message-ID: CA+OCxoyR8F6YFZg4RUimY3J-Xp3H9RZ9HPy-aJA8VmjcSk_e6g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

On Fri, May 11, 2018 at 10:53 AM, Aditya Toshniwal <
aditya(dot)toshniwal(at)enterprisedb(dot)com> wrote:

> Hi Dave,
>
> The above error was not thrown when import 'jquery.event.drag' was added
> to column_selector_spec.js (although it was giving some other error, but
> above was cleared).
> So the doubt was on webpack as it was not importing jquery.event.drag even
> though it was added using imports-loader, the below test:
> test: /.*slickgrid\/+slick\.(?!core)*/,
> loader: 'imports-loader?' +
> 'jquery.ui' +
> ',jquery.event.drag' +
> ',slickgrid',
>
> I noticed later that the test regex is not just for files but also
> included path. So, gave try by replacing "\/" with "\\" and it worked.
> But then this will not work on Unix, and so changed it to [\\\/]+ taking
> both styles.
>

Good work!

>
>
>
> Thanks and Regards,
> Aditya Toshniwal
> Software Engineer | EnterpriseDB Software Solutions | Pune
> "Don't Complain about Heat, Plant a tree"
>
> On Fri, May 11, 2018 at 3:05 PM, Dave Page <dpage(at)pgadmin(dot)org> wrote:
>
>>
>>
>> On Fri, May 11, 2018 at 7:28 AM, Aditya Toshniwal <
>> aditya(dot)toshniwal(at)enterprisedb(dot)com> wrote:
>>
>>> Hi Dave/Hackers,
>>>
>>> PFA fix for the problem. The RegEx for webpack test is not working on
>>> windows because the path separator is different for Windows( \ ) and
>>> Unix( / ). And so, the imports loader is not executing for slickgrid.
>>> Patch tested on Win 10, Win 7, Ubuntu, Cent OS and works fine.
>>>
>>
>> Nice catch! How did you figure that one out?
>>
>> Patch applied.
>>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EnterpriseDB UK: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>
>

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Browse pgadmin-hackers by date

  From Date Subject
Next Message Akshay Joshi 2018-05-11 17:14:24 Re: [pgAdmin4][Patch] Feature #3270 Add support for running regression tests against Firefox
Previous Message Aditya Toshniwal 2018-05-11 09:53:49 Re: JS Test error on Windows