Skip to content

fix(web-awesome): fix group sorting by order/duration; add defaultSortBy option#676

Merged
todti merged 9 commits into
mainfrom
fix/issue-651-tree-group-sorting
May 29, 2026
Merged

fix(web-awesome): fix group sorting by order/duration; add defaultSortBy option#676
todti merged 9 commits into
mainfrom
fix/issue-651-tree-group-sorting

Conversation

@todti

@todti todti commented May 29, 2026

Copy link
Copy Markdown
Collaborator

What's changed

Closes #651, closes #654.

Bug fix: group sorting ignored Order and Duration (#651)

In the test tree, groups were always sorted by statistic (failed first) regardless of the selected sort mode — only leaves responded to Order/Duration selection.

Fix: Groups are now sorted correctly:

  • Order — by the earliest groupOrder among their leaves (when the first test in the group ran)
  • Duration — by aggregated leaf duration (sum of all test durations recursively)
  • Status — unchanged, still uses statistic (failed first)
  • Name — unchanged, alphabetical

Feature: configurable default sort order (#654)

Previously the default sort was hardcoded to order,asc. Now it can be set via allurerc.mjs:

export default defineConfig({
  plugins: {
    awesome: {
      options: {
        defaultSortBy: "name,asc",
      },
    },
  },
});

The user's manually selected sort is preserved in localStorage and takes priority over the configured default.

Bug fix: Test body collapsed by default for passing tests

The Test body section was closed by default when a test had no failed steps. The default expansion policy is now expanded, so Test body is always open when navigating to a test result. The previous behavior can be restored via config:

export default defineConfig({
  plugins: {
    awesome: {
      options: {
        stepTreeExpansion: "expand_failed_only",
      },
    },
  },
});

Groups were always sorted by statistic regardless of the selected sort
mode. Now Order sorts groups by the earliest leaf groupOrder, and
Duration sorts groups by aggregated leaf duration.
todti added 4 commits May 29, 2026 16:02
Allows setting the default tree sort order via allurerc.mjs:

  export default defineConfig({
    plugin: {
      awesome: { defaultSortBy: "name,asc" }
    }
  });

localStorage takes precedence over the config value, so user
selections are still preserved across sessions.
@todti todti changed the title fix(web-awesome): sort groups by order/duration in test tree fix(web-awesome): fix group sorting by order/duration; add defaultSortBy option May 29, 2026
@github-actions

github-actions Bot commented May 29, 2026

Copy link
Copy Markdown

Allure Report Summary

Name Duration Stats New Flaky Retry Report
Allure 3 Report 26m 6s Passed tests 1431   Failed tests 12   Skipped tests 15 0 0 0 View
My Dashboard 26m 6s Passed tests 1431   Failed tests 12   Skipped tests 15 0 0 0 View
Allure 3 GitHub actions run (2026-05-29T17:35:02.169Z) 26m 6s Passed tests 1431   Failed tests 12   Skipped tests 15 0 0 0 View

@todti todti merged commit c8eefbf into main May 29, 2026
4 checks passed
@todti todti deleted the fix/issue-651-tree-group-sorting branch May 29, 2026 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Is it possible to make the 'alphabet' as the default sort value? Test tree sorting by Order and Duration doesn't sort test groups

2 participants