@insights_regression
@insights_account
Feature: Account Page YouTube Views States

  Background:
    Given an orchard employee insightsemployee for insights
    And I log in

  @IN-13186
  @id_bc0dd8a3edc73281d214751fc627dc44f25de033e1e85d656dc180d0ba16cb23
  Scenario: Account YouTube Views section - no data
    And I mock "accountYoutubeVideos" insights request with empty data
    When I visit the insights /account/21786 page
    Then "You don’t have any data yet" message in YouTube Views section

  @IN-13186
  @id_cdbde2476cc8da415189bc508938fe23da6e38594655b8415f682cdf737a1bc3
  Scenario: Account Videos Performance over Time - no data
    And I mock "accountVideoViewsTimeseriesQuery" insights request with empty data
    When I visit the insights /account/21786/videos page
    Then "You don’t have any data yet" message in Performance over Time section

  @IN-13186
  @id_0dbf9a27d53436398aae5c50d84e4875e324ce07ec0685750b3d6b2d0f8856e2
  Scenario: Account YouTube Views section - failed state
    And I mock "accountYoutubeVideos" insights request with error
    When I visit the insights /account/21786 page
    Then "Sorry, we hit a snag" message in YouTube Views section
    And "Data failed to load. Please refresh the page." message in YouTube Views section

  @IN-13186
  @id_48543521753a7d37c434563ebfb1fc22e63217ace5bbcd5bbecdde9fc3464b60
  Scenario: Account Videos Performance over Time - failed state
    And I mock "accountVideoViewsTimeseriesQuery" insights request with error
    When I visit the insights /account/21786/videos page
    Then "Sorry, we hit a snag" message in Performance over Time section
    And "Data failed to load. Please refresh the page." message in Performance over Time section

  @IN-13528
  @id_53a4cfd09d97679778fba6fb9ffe17714b2252bd1fe0be0bb3ea5e7e96753d1b
  Scenario: SubAccount YouTube views not present
    When I visit the insights /account/26760/subaccount/46189/ page
    Then I can verify YouTube Views section is not visible
