RustPython / rustpython.github.io

https://rustpython.github.io
MIT License
10 stars 16 forks source link

Regrtest summary #12

Closed Ryex closed 4 years ago

Ryex commented 4 years ago

Add summaries for tests to quickly see passed | skipped | failed information

Screenshots: image

This adds an include for a result summary: this include can also do a badge like SVG if svg=true is passed. but defaults to the table block seen above.

it can do both if svg=true and table=true are passed at the same time.

passing just table=true gets you just the table.

image

I slightly modified the template to allow this include to be added to the right of the head for test groups.

mireille-raad commented 4 years ago

This is awesome and adds a lot of information to the page :D Also, neat way to add them with partials!

I have some comments on styles/colors, but those are really minor details/up to the maintainer discretion.

I would ditch the "rust"/"orange" color that I originally used as a background for the header and maybe use black instead. black is more neutral and might go better with the green/yellow/red.

The css class is results-test in style.css.... on line 253.

https://github.com/RustPython/rustpython.github.io/blob/c14ba36e3b4fb192fb497e51b8375d5d1e64e214/assets/style.css#L253-L259

(it is not the best class name now that I think of it ;p )

also for the bar height, maybe 20px instead of 40?

<div class="row" 
    style="background: linear-gradient(to right, 
            green {{ pass_percent }}%, 
              yellow {{ pass_percent }}% {{ skip_percent | plus: pass_percent }}%, 
              red {{ skip_percent | plus: pass_percent }}% {{ fail_percent | plus: pass_percent | plus: skip_percent }}%
            ); 
           height: 40px;">
Ryex commented 4 years ago

I adjusted the colors a bit to contrast better with the background, also adjusted the bar height to 20px and fixed the border color for the table

image

coolreader18 commented 4 years ago

Looks great!