@wip
@moneyhub
Feature: Sub-account Revenue Insights User Experience

  @id_37cb271ed6d330073ed57f3b486eabe42844ec34d232d90132da10d71381fb1c
  Scenario: Verify highlights and product drill-down for a sub-account
    Given an orchard employee label_84084 for moneyhub
    And I log in
    And I am on the sub-account highlight page
    And The moneyhub sidenav only shows Highlights and Documents for a subaccount
    When I select May 2025 – April 2026 from the statement period filter
    # Verify revenue values are correct for the subaccount for the selected statement period
    Then Revenue values are correct on the header revenue section for this subaccount
      | Label            | Revenue |
      | All Time Revenue | 1510.80 |
      | Period Revenue   | 0.00    |
    And Revenue values are correct on the performance over time card for this subaccount
      | Revenue |
      | 38.46   |
    And Revenue values are correct on the Top Stores Types Card for this subaccount
      | Store   | Percentage |
      | Twitch  | 96         |
      | Spotify | 4          |
    And Revenue values are correct on the Top Transaction Types Card for this subaccount
      | Transaction Type           | Revenue |
      | Ad-Supported Audio Streams | 36.77   |
      | Streaming Bonus            | 1.67    |
      | Subscription Audio Streams | 0.02    |
    And Revenue values are correct on the Top Products Card for this subaccount
      | Product     | Revenue |
      | The Hostage | 5.77    |
    # Verify revenue values are correct for a product 'The Hostage' in this subaccount, for the selected statement period
    When I navigate to the highlights Products tab
    When I select the product The Hostage from the highlights products list
    Then I am on the product page for The Hostage with the selected statement period preserved
    And Revenue values are correct on the header revenue section for this product
      | Label          | Revenue |
      | Period Revenue | 0.00    |
    And Revenue values are correct on the performance over time card for this product
      | Revenue |
      | 5.77    |
    And Revenue values are correct on the Top Stores Types Card for this product
      | Store   | Percentage |
      | Twitch  | 96         |
      | Spotify | 4          |
    And Revenue values are correct on the Top Transaction Types Card for this product
      | Transaction Type           | Revenue |
      | Ad-Supported Audio Streams | 5.56    |
      | Streaming Bonus            | 0.21    |
    And Revenue values are correct on the Top Countries Card for this product
      | Country        | Revenue |
      | United States  | 4.99    |
      | Canada         | 0.32    |
      | United Kingdom | 0.17    |
      | Spain          | 0.12    |
      | Germany        | 0.10    |
      | France         | 0.05    |
      | Australia      | 0.01    |
      | Norway         | 0.00    |
    And I log out
