Jump to content

tpr
 Share

Recommended Posts

ProcessNetteTester

Run Nette Tester tests within ProcessWire admin.
(continued from here)

processnettetester-v008.thumb.png.25414515c3b972c21ed2cd7e948547e7.png

Features

  • AJAX interface for running Nette Tester tests, in bulk or manually
  • display counter, error message and execution time in a table
  • run all tests at once or launch single tests
  • show formatted test error messages and report PHP syntax errors
  • stop on first failed test (optional)
  • hide passed tests (optional)
  • display failed/total instead passed/total (optional)
  • re-run failed tests only (optional)
  • auto scroll (optional)
  • include or exclude tests based on query parameters
  • start/stop all tests with the spacebar
  • reset one test or all tests (ctrl+click)
  • TracyDebugger File Editor integration

https://modules.processwire.com/modules/process-nette-tester/

https://github.com/rolandtoth/ProcessNetteTester

  • Like 14
Link to comment
Share on other sites

  • 2 weeks later...

I've added Tracy Editor integration, so if Tracy is installed and its File Editor feature is enabled you can click on a test name and the editor loads.

@adrian

It was not straightforward to integrate the editor, adding "tracy://?f=..." wasn't enough. I've pulled the corresponding script and then it started to work fine.

However, currently the page reloads after save in the editor which is a drawback in this module. Is there a way to skip this? Perhaps adding an extra parameter to tracyFileEditorLoader.loadFileEditor?

Or would it interfere with the editor's Backup feature?
(I don't mind if it's not available in this case)

  • Like 3
Link to comment
Share on other sites

Hey @tpr - I think the issue with the file-editor.js file is that in Tracy it's not loaded until the File Editor panel is triggered. I don't think I really want to change this behavior because I'd rather Tracy loaded as little as possible on each page load and only bring in panel specific assets when needed. Is that ok? EDIT: actually I don't know why you are having to load it - surely you are still opening the editor panel - not sure why that file isn't loaded.

Regarding the page reload - typically in the Tracy File Editor you are editing the template for the page you are viewing, so you actually want to reload the page to see the changes. Saving could be converted to AJAX, but then you'd need to reload the page anyway to see the changes. I understand it's not what you are looking for in this case though, so maybe we need an AJAX save option - maybe two buttons: Save and Save & Reload. 

Any thoughts?

Link to comment
Share on other sites

tracyFileEditorLoader was not available until the File Editor panel was not opened, so clicking on an edit link (outside of any Tracy panel) didn't do anything. Anyway, I'm fine with the current solution.

An AJAX save would definitely solve the issue here but I don't know if there any users who would use this. I can live with the page reload, I think I would use the File Editor only to see what's happening or what went wrong, and edit the file in my IDE. So I would suggest leaving as it is until someone requests that.

  • Like 2
Link to comment
Share on other sites

5 minutes ago, tpr said:

tracyFileEditorLoader was not available until the File Editor panel was not opened, so clicking on an edit link (outside of any Tracy panel) didn't do anything.

Interesting. Test this out.

1) Make sure you have: "Force editor links to use Tracy File Editor" checked.

2) Turn on the File Editor panel

3) Load a page and click the edit template icon at the bottom right of the Request Info panel - it should load the File Editor

That works for me. Does it work for you?

Link to comment
Share on other sites

I've updated the module to v0.0.9: failure messages containing HTML are displayed as plain text. So eg. if you test if an iframe markup is returned and it fails, the error displayed will show the markup as text and not parsed as HTML as before.

  • Like 3
Link to comment
Share on other sites

  • 5 months later...
  • 7 months later...

Many thanks for this module, it's coming in handy! However, using v.0.1.3 on my PW 3.0.135 localhost install, it's not showing Breadcrumbs, though I have that option selected. You mention configurability but I'm not sure where changes could be made.

Link to comment
Share on other sites

On 9/4/2019 at 12:55 AM, tpr said:

Do you have your test files in subdirectories? The breadcrumb should show the subdirectory names (paths). On configurable I meant the "Show breadcrumbs" checkbox above the test list.

Thanks, makes perfect sense now.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...