@insights_regression
@insights_charts
@insights_charts_data
@donotfail
@IN-12201
Feature: Chart Data Sorting

  Background: Chart Page is opened
    Given an orchard employee single_label for insights
    And I log in

  @id_e7117d24a977a628c6d51dc8df4a422a3f7e37378a30b6b8964397c7a01d1f80
  Scenario Outline: [Regression][Chart] - Sorting <type> chart by <column_title>
    When I visit the random insights <type> chart page
    Then I see a chart table is loaded
    And I see Charts table content sorted by # ASC
    When I click on <column_title> column title on Chart page
    Then I see Charts table content sorted by <column_title> <expected_order_1>
    When I click on <column_title> column title on Chart page
    Then I see Charts table content sorted by <column_title> <expected_order_2>

    Examples:
      | type  | column_title  | expected_order_1 | expected_order_2 |
      | Video | #             | DESC             | ASC              |
      | Track | #             | DESC             | ASC              |
      | Video | Time on Chart | DESC             | ASC              |
      | Track | Time on Chart | DESC             | ASC              |
