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

Sorting Specs by name not retained when a spec is clicked #279

Open
DvagNic opened this issue Aug 17, 2021 · 2 comments
Open

Sorting Specs by name not retained when a spec is clicked #279

DvagNic opened this issue Aug 17, 2021 · 2 comments

Comments

@DvagNic
Copy link

DvagNic commented Aug 17, 2021

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

@sriv
Copy link
Member

sriv commented Aug 19, 2021

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

@sriv
Copy link
Member

sriv commented Aug 19, 2021

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants