getgauge / html-report

HTML report generation plugin for Gauge

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Sorting Specs by name not retained when a spec is clicked

DvagNic opened this issue · comments

Actual and Expected behaviour

When I sort the specs by "Name" (top left button in the specification navbar), the specs are sorted correctly. As soon as I click on any spec, the sorting reverts to the default of all failed specs at the top. I would expect the sorting to remain until I click on any other button (Name or Execution time) or search for specs.

Steps to reproduce

  1. Open a html report with more than one spec
  2. Sort by "Name" and see the sorting change
  3. Click on a spec
  4. See the sorting change

Gauge version

Gauge version: 1.4.0
Plugins
-------
html-report (4.1.0)
python (0.3.17)
screenshot (0.1.0)
xml-report (0.2.3)

Screenshots

1
2

The sorting preference is not saved at the moment, worth doing this. Thanks for reporting

Dev notes:

in main.js for the default theme, consider storing the sorting preference in a cookie/local storage or as a query param, and read it when initializing the sort: https://github.com/getgauge/html-report/blob/master/themes/default/assets/js/main.js#L313

If anyone wants to contribute a PR, I'll review and merge asap!