@insights_regression
@insights_my_catalog
@insights_my_catalog_products
Feature: My Catalog Products Tab

  Background: Account Page is opened in default state
    Given an orchard employee multiaccount1 for insights
    And I log in

  @IN-12716
  @id_169b74dfe28890522e68f9dac6d5a46305ce86346be24977d399b316b7e9d5b2
  Scenario: [Regression][My Catalog][Products] - links and columns
    Then I visit the insights /catalog/products?offset=0&limit=2 page
    And I can see My Catalog page with the products table
    And I can verify links on My Catalog - Products tab
    Then I can verify table columns on the page: #|Product|Artist|Imprint|Account|Release Date|1dStreams|1dChange|7dStreams|7dChange|28dStreams|28dChange|All TimeStreams

  @IN-12717
  @id_df312c9fd51b9a6eec5dca2be4ca26a9148f38f66321f4787369a7c5818796f6
  Scenario Outline: [Regression][My Catalog][Products] - list of products <option>
    When I visit the insights <option> page
    And I can see list is correct on My Catalog - Products tab

    Examples:
      | option                                                                                                                                                                                       |
      | /catalog/products?offset=0&limit=2                                                                                                                                                           |
      | /catalog/products?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&offset=0&limit=2 |

  @IN-12728
  @id_32d7ca5340f4669f4852a5cc103704ef4185e49176382648994400875bce8b87
  Scenario: [Regression][My Catalog][Products] - sortable columns
    Then I visit the insights /catalog/products?offset=0&limit=10 page
    When I click on Release Date column to sort desc on My Catalog - Products tab
    Then I can see list is correct on My Catalog - Products tab
    When I click on Release Date column to sort asc on My Catalog - Products tab
    Then I can see list is correct on My Catalog - Products tab
    When I click on 1dStreams column to sort desc on My Catalog - Products tab
    And I click on 1dStreams column to sort asc on My Catalog - Products tab
    Then I can see list is correct on My Catalog - Products tab
    When I click on 1dChange column to sort desc on My Catalog - Products tab
    And I click on 1dChange column to sort asc on My Catalog - Products tab
    Then I can see list is correct on My Catalog - Products tab
    When I click on 7dStreams column to sort desc on My Catalog - Products tab
    Then I can see list is correct on My Catalog - Products tab
    And I click on 7dStreams column to sort asc on My Catalog - Products tab
    When I click on 7dChange column to sort desc on My Catalog - Products tab
    And I click on 7dChange column to sort asc on My Catalog - Products tab
    Then I can see list is correct on My Catalog - Products tab
    When I click on 28dStreams column to sort desc on My Catalog - Products tab
    And I click on 28dStreams column to sort asc on My Catalog - Products tab
    Then I can see list is correct on My Catalog - Products tab
    When I click on 28dChange column to sort desc on My Catalog - Products tab
    Then I can see list is correct on My Catalog - Products tab
    And I click on 28dChange column to sort asc on My Catalog - Products tab
    When I click on All TimeStreams column to sort desc on My Catalog - Products tab
    Then I can see list is correct on My Catalog - Products tab
    And I click on All TimeStreams column to sort asc on My Catalog - Products tab

  @IN-12733
  @id_0ca769b2d5e9c839743d77235ea094b9005e294a00b028adb2fbf234e7684ccc
  Scenario: [Regression][My Catalog][Products] - filters
    Then I visit the insights /catalog/products?offset=0&limit=2 page
    When I can filter by Artist on My Catalog - Products tab
    Then I can see list is correct on My Catalog - Products tab
    When I can clear filters on My Catalog - Products tab
    When I can filter by Label on My Catalog - Products tab
    Then I can see list is correct on My Catalog - Products tab
    When I can clear filters on My Catalog - Products tab
    Then I can see list is correct on My Catalog - Products tab

  @IN-12737
  @id_f4c360def3e78428e49d24c49a58252a2e1230215dd1a7fd4715849967fe4a08
  Scenario Outline: [Regression][My Catalog][Products] - tooltips <option>
    Then I visit the insights /catalog/products?offset=0&limit=2 page
    And I can see tooltip for <option> on My Catalog - Products tab

    Examples:
      | option  |
      | Account |
      | Artist  |
      | Product |
      | Imprint |

  @IN-12746
  @IN-12719
  @id_92d68be92dd70c02fcf47b2f0c925783b72bf74a2fa7ed769b624cd7d18705b8
  Scenario: [Regression][My Catalog][Products] - product row and customize popup
    Then I visit the insights /catalog/products?offset=0&limit=2 page
    And I can see table data is correct on My Catalog - Products tab
    When I open Customize popup on a grid table
    And I can click on (1 Day) Streams column in Customize popup for grid
    Then I can close using cancel Customize popup on a grid table
    And I can see (1 Day) Streams column on a grid
    When I open Customize popup on a grid table
    And I can click on (1 Day) Streams column in Customize popup for grid
    Then I can close using save Customize popup on a grid table
    And I can't see (1 Day) Streams column on a grid
    When I open Customize popup on a grid table
    Then I can close using x-close Customize popup on a grid table

  @IN-12738
  @id_263c02551c0047046e70b2752f33657e4a17c80c4ad98655670f1d1675c98e4b
  Scenario: [Regression][My Catalog][Products] - export
    Then I visit the insights /catalog/products?offset=0&limit=2 page
    And I can verify exported data from My Catalog - Products tab

  @IN-12754
  @id_593096e41d5a339673fe7777ed676ff9e5365db8dc9dd9b4d6b20db4a3b36ada
  Scenario: [Regression][My Catalog][Products] - product data consistency
    Then I visit the insights /catalog/products?offset=0&limit=2 page
    Then I can open artist page from Products tab
    When I visit the insights /catalog/products page
    And I can navigate to My Catalog
    Then I can navigate to the Artists tab on the page
    And I can navigate to the Products tab on the page
    Then I can see table data is correct on My Catalog - Products tab
    And I can open product page from Products tab
    And I can verify data on Product page is the same as on My Catalog - Products tab
