@insights_regression
@insights_my_catalog
Feature: My Catalog Accounts Tab

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

  @IN-12587
  @id_51752a9c8d204f47cb29ea08025e7d79c102fa27b7bb1d09cfb16e9668937090
  Scenario: [Regression][My Catalog][Accounts] - links and columns
    And I can see My Catalog page with the accounts table
    And I can verify links on Accounts tab - My Catalog
    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_fd01b3b5d37af3aecaf3bffb88ce89704fc575d11290d64022f567f236bbc530
  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 - Account tab
    When I can click subaccount toggle on My Catalog - Accounts tab
    Then I can see account list is correct on My Catalog - Account 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_49c128b07df40233cd0d66b2fe2d20e3e6a85cfc8d5d722fdefd8668c7c794d6
  Scenario: [Regression][My Catalog][Accounts] - table sorting
    When I click on 28dStreams column to sort asc My Catalog - Accounts tab
    Then I can see account list is correct on My Catalog - Account tab no wait
    And I click on 28dStreams column to sort desc My Catalog - Accounts tab
    Then I can see account list is correct on My Catalog - Account tab no wait

    And I click on 28dChange column to sort desc My Catalog - Accounts tab
    And I click on 28dChange column to sort asc My Catalog - Accounts tab
    Then I can see account list is correct on My Catalog - Account tab no wait

    And I click on 28dTrack D/L column to sort desc My Catalog - Accounts tab
    And I click on 28dTrack D/L column to sort asc My Catalog - Accounts tab
    Then I can see account list is correct on My Catalog - Account tab no wait

    And I click on 28dAlbum D/L Change column to sort desc My Catalog - Accounts tab
    And I click on 28dAlbum D/L Change column to sort asc My Catalog - Accounts tab
    Then I can see account list is correct on My Catalog - Account tab no wait

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

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

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

  @IN-12631
  @id_94986db9742cfaced31a2e1c208bd23146ace9a3730ee89be52c61c464a9fdf4
  Scenario: [Regression][My Catalog][Accounts] - filters
    When I can filter by Label from on My Catalog - Accounts tab
    Then I can see account filtered by labelIds list is correct on My Catalog - Account tab
    When I can clear filters from on My Catalog - Accounts tab
    Then I can filter by Store from on My Catalog - Accounts tab
    Then I can see account filtered by storeIds list is correct on My Catalog - Account tab
    When I can clear filters from on My Catalog - Accounts tab
    Then I can see account filtered by none list is correct on My Catalog - Account tab
