@fansifter
@audience-overview-page
Feature: Audience overview page tests

  @FS-2058
  @cleanup-created-audience
  @ows_dmp
  @id_caf1056401093957a738de41d34c088bbbfcde4bb96d8c921212ac8bd9e49836
  Scenario: Audience overview page audience update
    Given an orchard employee fansifter-set-2-10-libra for fansifter
    And I have the audience data:
      | Account         | Columbia Records Group         |
      | Audience Use    | Advertising                    |
      | Artists         | The Kid LAROI                  |
      | Fan location    | Include, United States         |
      | Fan segment     | Include, Engaged Fans          |
      | Last engagement | Include, Past Year             |
      | Spend min       | 5                              |
      | Spend max       | 100                            |
      | Fan DSP         | Exclude, Apple Music           |
      | Heavy rotation  | Exclude, NOT in Heavy Rotation |
    And I log in
    When I visit Audiences page
    And I open New audience page
    And I fill new audience data
    Then the audience being edited is now updated, the correct date and time are displayed
    When I save new audience
    Then new audience is created
    And created audience was updated now, and the correct date and time are displayed
    When I click edit audience button
    And I update audience data
    And I save updated audience
    Then audience is updated
    And created audience was updated now, and the correct date and time are displayed

  Rule: Artist audience

    Background: Log in (user has access to a few labels)
      Given an orchard employee fansifter-set-2-6-gemini for fansifter
      And I have the audience data:
        | Account         | Columbia Records Group         |
        | Audience Use    | Advertising                    |
        | Artists         | The Kid LAROI                  |
        | Fan location    | Include, United States         |
        | Fan segment     | Include, Engaged Fans          |
        | Last engagement | Include, Past Year             |
        | Spend min       | 5                              |
        | Spend max       | 100                            |
        | Fan DSP         | Exclude, Apple Music           |
        | Heavy rotation  | Exclude, NOT in Heavy Rotation |
      And I log in
      When I visit Audiences page
      And I open New audience page
      And I fill new audience data

    @FS-2056
    @cleanup-created-audience
    @id_fe1354dd87b7097d433427842a4757ea9ac33c9551e149d534bf886876f63428
    Scenario: Audience overview page data verification
      When I save new audience
      Then new audience is created
      And audience page shows correct audience data
      And audience page does not show elements not in audience data

    @FS-2057
    @cleanup-created-audience
    @id_b6488c5859a04d659e1e7170f763aa8c2ab12afd288fd74ab101e5ffd54a5a22
    Scenario: Audience overview page audience refresh
      When I save new audience
      Then new audience is created
      When I click refresh audience button
      Then audience size is updated
      And created audience was updated now, and the correct date and time are displayed
      When I click refresh audience button
      Then audience size is updated

    @FS-2220
    @cleanup-created-audience
    @id_55cf7bb57c3bc9e2ad8ab963a35d203f0747a6daf322e2833042e9bf501fed7a
    Scenario: Audience overview page design (Artist audience)
      When I save new audience
      And audience overview page header contains audience name and export button
      And audience details block contains Edit button and all entered information
      And audience size block contains size, last updated info and Refresh button

  Rule: Custom list audience

    Background: Log in (user has access to a few labels)
      Given an orchard employee fansifter-set-2-12-ophiuchus for fansifter
      And I have the audience data:
        | Account         | Test Label                     |
        | Audience Use    | Advertising                    |
        | Custom List     | Warped Tour                    |
        | Fan location    | Include, United States         |
        | Fan segment     | Exclude, Lapsed Fans           |
        | Last engagement | Include, Past Year             |
        | Fan DSP         | Exclude, Deezer                |
        | Heavy rotation  | Exclude, NOT in Heavy Rotation |
      And I log in
      When I visit Audiences page
      And I open New audience page
      And I fill new audience data

    @FS-2220
    @cleanup-created-audience
    @id_17fe00794536ba7883e58322e167feee11f889b4e074e6535bb329828adfe3f3
    Scenario: Audience overview page design (Custom list audience)
      When I save new audience
      And audience overview page header contains audience name and export button
      And audience details block contains Edit button and all entered information
      And audience size block contains size, last updated info and Refresh button

  Rule: Audience with artist and custom list

    Background: Log in (user has access to a few labels)
      Given an orchard employee fansifter-set-2-12-ophiuchus for fansifter
      And I have the audience data:
        | Account         | Test Label                     |
        | Audience Use    | Advertising                    |
        | Custom List     | Warped Tour                    |
        | Artists         | Wolfgang Amadeus Mozart        |
        | Fan location    | Include, United States         |
        | Fan segment     | Include, Engaged Fans          |
        | Last engagement | Include, Past Year             |
        | Fan DSP         | Include, Apple Music           |
        | Heavy rotation  | Exclude, NOT in Heavy Rotation |
      And I log in
      When I visit Audiences page
      And I open New audience page
      And I fill new audience data

    @cleanup-created-audience
    @FS-4207
    @id_6e56beffdadf8b6328804f4ad7fb52fa58a9d2890b06f11ab1562a689678f2c5
    Scenario: Audience overview page design (Artist and Custom list audience)
      When I save new audience
      And audience overview page header contains audience name and export button
      And audience details block contains Edit button and all entered information
      And audience size block contains size, last updated info and Refresh button

  Rule: Audience with two artists

    Background: Log in (user has access to a few labels)
      Given an orchard employee fansifter-set-2-12-ophiuchus for fansifter
      And I have the audience data:
        | Account         | Test Label                             |
        | Audience Use    | Advertising                            |
        | Artists         | Wolfgang Amadeus Mozart, Frank Sinatra |
        | Fan location    | Include, United States                 |
        | Fan segment     | Include, Engaged Fans                  |
        | Last engagement | Include, Past Year                     |
        | Fan DSP         | Exclude, Apple Music                   |
        | Heavy rotation  | Exclude, NOT in Heavy Rotation         |
      And I log in
      When I visit Audiences page
      And I open New audience page
      And I fill new audience data

    @FS-4206
    @cleanup-created-audience
    @id_5385d7aecf0aa1f1f27c489a07a0e5009e726570cbbd545832056e079743806e
    Scenario: Audience overview page design (Two artists audience)
      When I save new audience
      And audience overview page header contains audience name and export button
      And audience details block contains Edit button and all entered information
      And audience size block contains size, last updated info and Refresh button
