Skip to content

initial-sort flag not working on the columns other than the status result one #247

Closed
@wanam

Description

@wanam

I'm trying to set an initial order on the test name instead of the result status column, but it does not seem to work.

Here is what how i'm doing it:
` def pytest_html_create_batch_table_header(self, cells):

    # # Set initial-sort on test column
    cells[2].attr.class_ = 'sortable initial-sort'
    cells[0].attr.class_ = 'sortable result'

`
I see the sort icon on the 3 column but it's not sorted, it is still sorted for the first column.
Otherwise it would be great to have a hook or command line option for the default sorting column.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions