@insights_regression
@insights_my_catalog
@insights_my_catalog_accounts
Feature: My Catalog Accounts Tab

  Background: Account Page is opened in default state
    Given an orchard employee multiaccount1 for insights
    And I log in
    And I visit the insights /catalog/accounts?offset=0&limit=2 page

  @IN-12587
  @id_632d7fd36ee9a03734ff71ddcafe928e3bcfb2a4eff8d49d05b5d2545ba69866
  Scenario: [Regression][My Catalog][Accounts] - links and columns
    Then I can see My Catalog page with the accounts table
    And I can verify links on My Catalog - Accounts tab
    And I can verify table columns on the page: #|Account|28dStreams|28dChange|28dTrack D/L|28dTrack D/L Change|28dAlbum D/L|28dAlbum D/L Change

  @IN-12596
  @id_e6e01389b793c78acf08b38977ef3561b8267e9b6fbc6c33f6b8736d61c789a2
  Scenario Outline: [Regression][My Catalog] Accounts - list of sub/accounts <option>
    When I visit the insights <option> page
    Then I can see subaccount list is correct on My Catalog - Accounts tab
    When I can click subaccount toggle on My Catalog - Accounts tab
    Then I can see account list is correct on My Catalog - Accounts tab

    Examples:
      | option                                                                                                                                                                                         |
      | /catalog/accounts                                                                                                                                                                              |
      | /catalog/accounts?offset=0&limit=100&country=UY&country=PE&country=FK&country=EC&country=PY&country=CL&country=SR&country=BR&country=CO&country=BO&country=GF&country=GY&country=VE&country=AR |

  @IN-12597
  @id_28d63457054819d0bcb66dc1df621a27ee2a9bcc267b3835cd29f6a6d05566df
  Scenario: [Regression][My Catalog][Accounts] - table sorting
    When I click on 28dStreams column to sort asc on My Catalog - Accounts tab
    Then I can see account list is correct on My Catalog - Accounts tab
    When I click on 28dStreams column to sort desc on My Catalog - Accounts tab
    Then I can see account list is correct on My Catalog - Accounts tab
    When I click on 28dChange column to sort desc on My Catalog - Accounts tab
    And I click on 28dChange column to sort asc on My Catalog - Accounts tab
    Then I can see account list is correct on My Catalog - Accounts tab
    When I click on 28dTrack D/L column to sort desc on My Catalog - Accounts tab
    And I click on 28dTrack D/L column to sort asc on My Catalog - Accounts tab
    Then I can see account list is correct on My Catalog - Accounts tab
    When I click on 28dAlbum D/L Change column to sort desc on My Catalog - Accounts tab
    And I click on 28dAlbum D/L Change column to sort asc on My Catalog - Accounts tab
    Then I can see account list is correct on My Catalog - Accounts tab

  @IN-12619
  @id_9d0114420b209297cf1cf9f7149e2ff1db5007e6859223b39b21babcadb493d0
  Scenario: [Regression][My Catalog][Accounts] - tooltip
    Then I can see subaccount list is correct on My Catalog - Accounts tab
    And I can see tooltip for account name on My Catalog - Accounts tab

  @IN-12620
  @id_a6c405e8b37cfa9777a5e650b9ba2a0b86f5899192f476e53c62d71b0fe8df45
  Scenario: [Regression][My Catalog][Accounts] - account data
    Then I can see account data is correct on My Catalog - Accounts tab
    And I can open account page from Accounts tab
    Then I can verify title and streams on Account page

  @IN-12651
  @id_b89b84d01526cbd01114323b207ee31e6802d5f7d346dfedbde5612cc01e81bc
  Scenario: [Regression][My Catalog][Accounts] - export
    Then I can verify exported data from My Catalog - Accounts tab

  @IN-12631
  @id_f0e928ad7cc71a7a7ffa51f1a32611b8e54350b98e268df07a61af6d1aaaea6d
  Scenario: [Regression][My Catalog][Accounts] - filters
    When I can filter by Label on My Catalog - Accounts tab
    Then I can see account list is correct on My Catalog - Accounts tab
    When I can clear filters on My Catalog - Accounts tab
    When I can filter by Store on My Catalog - Accounts tab
    Then I can see account list is correct on My Catalog - Accounts tab
    When I can clear filters on My Catalog - Accounts tab
    Then I can see account list is correct on My Catalog - Accounts tab
