This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 249183 - Search button for Mocha does not work
Summary: Search button for Mocha does not work
Status: VERIFIED FIXED
Alias: None
Product: javascript
Classification: Unclassified
Component: Testing (show other bugs)
Version: 8.1
Hardware: PC Linux
: P2 normal (vote)
Assignee: Theofanis Oikonomou
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-12-08 07:02 UTC by Vladimir Riha
Modified: 2014-12-10 15:33 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Riha 2014-12-08 07:02:08 UTC
I have installed Mocha using

$ npm install -g mocha

which installed it to /usr/local/bin/mocha . If I go to project properties and press Search button to find Mocha, IDE does not find this location. If I install mocha locally to the project, its path is node_modules/.bin/mocha but this location is also not being found. 


Thank you


Product Version: NetBeans IDE Dev (Build web-main-1657-on-20141208)
Java: 1.7.0_71; Java HotSpot(TM) Client VM 24.71-b01
Runtime: Java(TM) SE Runtime Environment 1.7.0_71-b14
System: Linux version 3.13.0-35-generic running on i386; UTF-8; en_US (nb)
Comment 1 Vladimir Riha 2014-12-08 07:03:16 UTC
... I think IDE should look for both, "mocha" on $PATH and "mocha" in node_modules/.bin/mocha.
Comment 2 Vladimir Riha 2014-12-08 07:09:51 UTC
Oh, I see now I have to configure mocha directory, not binary :) Is there a reason for wanting directory and not just binary? It is just that other tools generally want binary not directory and if you press the Search button, IDE shows "no mocha executable was found".

I would be more understandable to ask directly for binary and I guess the Search button would work better then as well.
Comment 3 Theofanis Oikonomou 2014-12-08 19:31:05 UTC
Changeset: 7256ed0772f5
Author:    Theofanis Oikonomou <theofanis@netbeans.org>
Date:      2014-12-08 20:30
Message:
Comment 4 Theofanis Oikonomou 2014-12-08 19:34:33 UTC
(In reply to Vladimir Riha from comment #2)
> Oh, I see now I have to configure mocha directory, not binary :) Is there a
> reason for wanting directory and not just binary? It is just that other

Unfortunately binary is not enough. The installation location is needed so that the reporter can work and thus notify UI in Tests Result Window.

> tools generally want binary not directory and if you press the Search
> button, IDE shows "no mocha executable was found".
> 
> I would be more understandable to ask directly for binary and I guess the
> Search button would work better then as well.

Removed the Search button completely as you are correct that it brings more confusion to the user. Updated also the warning messages shown to the user when selecting non valid install location for mocha. I think now it works better. Thanks
Comment 5 Vladimir Riha 2014-12-08 19:53:34 UTC
OK, thanks for quick fixes :-)
Comment 6 Quality Engineering 2014-12-10 04:02:22 UTC
Integrated into 'main-silver', will be available in build *201412100001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/7256ed0772f5
User: Theofanis Oikonomou <theofanis@netbeans.org>
Log: Task #249183 - Search button for Mocha does not work
Comment 7 Vladimir Riha 2014-12-10 15:33:26 UTC
Thank you, verified

Product Version: NetBeans IDE Dev (Build 201412100001)
Java: 1.7.0_71; Java HotSpot(TM) Client VM 24.71-b01
Runtime: Java(TM) SE Runtime Environment 1.7.0_71-b14
System: Linux version 3.13.0-35-generic running on i386; UTF-8; en_US (nb)