LiTiang / js-test-driver

Automatically exported from code.google.com/p/js-test-driver
0 stars 0 forks source link

User friendly error handling in lauch configuration shortcut. #310

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
1.) If user tries to run tests and the launch configuration does not exists, 
JsTestDriver could create it and pre-fill fields. It would then open new 
configuraion in a standard 'Edit configuration and launch' view. 

2.) If user tries to run tests and the server is ready yet, JsTestDriver could 
activate JsTestDriver view. It would save user some clicks.

Original issue reported on code.google.com by m.jurcov...@gmail.com on 11 Dec 2011 at 12:42

GoogleCodeExporter commented 9 years ago
Attached patch adds both features. 

1.) New launch configuration has two prefigured fields:
* project name:
   - project name,
* configuration file:
   - order of preferences for config file selection:
   -- the file whose name ends with "JsTestDriver.conf" and has shortest absolute path
   -- the file whose name ends with ".conf" and has shortest absolute path
   -- nothing, combo box is empty. 

2.) The view is opened after user closes error message.

Original comment by m.jurcov...@gmail.com on 11 Dec 2011 at 12:48

GoogleCodeExporter commented 9 years ago
I found a bug in a previous patch, so I deleted it. Never should hurry up with 
patches :), sorry.

Original comment by m.jurcov...@gmail.com on 11 Dec 2011 at 10:05

GoogleCodeExporter commented 9 years ago
No worries. Haven't had a chance to look at the patch yet.

Original comment by corbinrs...@gmail.com on 11 Dec 2011 at 10:31

GoogleCodeExporter commented 9 years ago
Adding one more thing to fix:

3.) If user tries to run tests from project run configuration and the server is 
not running, the 'no server running' error is not shown. Instead, nothing 
happens. 

Original comment by m.jurcov...@gmail.com on 12 Dec 2011 at 12:40

GoogleCodeExporter commented 9 years ago
The patch fixes all three points. 

I ended up changing a little more than I expected. The patch contains comments 
to explain what I have changed. I wanted to err on the side of 'too many 
comments', so feel free to remove them. 

There are five ways how to run tests and they should all work the same way:
* run whole project,
* run selected file(s),
* run file from open editor,
* run method selected in the editor,
* re-run last tests.

Side-note: LoadedSourceFileLibrary file is missing from the repository. It 
should be in the com.google.eclipse.javascript.jstestdriver.core.model package. 

Original comment by m.jurcov...@gmail.com on 12 Dec 2011 at 12:42

Attachments: