Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a fancy debug page #26

Open
paulcsmith opened this issue Jul 2, 2018 · 0 comments
Open

Add a fancy debug page #26

paulcsmith opened this issue Jul 2, 2018 · 0 comments
Labels
feature request A new requested feature / option

Comments

@paulcsmith
Copy link
Member

paulcsmith commented Jul 2, 2018

Rough idea:

  • Save html page for each spec to tmp/lucky_flow/debug_pages/. Example: tmp/lucky_flow/debug_pages/signs-a-user-in-spec.html
  • Show what interactions happened (Ran click "@heading", Ran fill UserForm, etc.) on a pane to the left
  • Clicking what happened in the left plane (click "@heading") shows screenshot of the page on the right
  • Would love to also include styles and images, but since the server stops after spec ends it could be really hard
    • Maybe copy assets and rewrite the asset URLs the page? Probably too much for v1
  • Also allow frameworks to extend the page and show other debug info
    • What page was rendered
    • What action rendered it
    • What assigns were passed to it
      • forms - so you can see forms
      • context
      • headers, etc.
      • session
    • Allow customizing objects TheObjext#lucky_flow_inspect
      • So for forms you might show how if there are errors in an easily digestible way
        * Or queries might show the SQL that it had and the results

Examples of left pane

  • Click “@heading” with text “adds”
  • Fill UserForm
  • Should have “@heading” with text “adds”

Example of right pane

Click "@heading" with text "adds"

Details

  • On page Users::IndexPage
    • Data:
    • Users: <UserQuery#lucky_flow_inspect> which would print the SQL that was run, number of results, etc.
  • Rendered by Users::Index
  • Params
  • Headers
@paulcsmith paulcsmith changed the title Add a debug page Add a fancy debug page Jul 2, 2018
@jwoertink jwoertink added the feature request A new requested feature / option label Dec 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request A new requested feature / option
Projects
None yet
Development

No branches or pull requests

2 participants