@deprecated
@fansifter
@audience-creation-page
Feature: Audience creation page - Audience size calculation after setting filters

  Background: Log in (user has access to a few labels)
    Given an orchard employee fansifter-set-2-13-sagittarius for fansifter
    And I have authorized local storage for fansifter
    When I visit Audiences page
    And I open New audience page
    And I select "Columbia Records Group (34514)" account for new audience
    And I open artist multiselect for new audience
    And I select "Megan Moroney" artist in multiselect for new audience and close
    Then audience size is calculated

  @FS-1962
  @id_77819283c2022b35eb8348b60adf69dee33ab8a0bb7f20c733dbc0b196a2ee80
  Scenario: Audience creation page audience size calculation after setting account and artist
    When I open artist multiselect for new audience
    And I select "First Aid Kit" artist in multiselect for new audience and close
    Then audience size is recalculated
    And I remove "Megan Moroney" artist from multiselect for new audience
    Then audience size is recalculated

  @FS-1963
  @FS-1832
  @id_550bd3e60b5b6166e9b4ed274158e8f33b294f2933d1f280a9d7b8024b6b1c27
  Scenario: Audience creation page audience size recalculation after setting fan location
    When I select "Australia" location for new audience
    Then the audience location is "Australia"
    And audience size is recalculated
    And the audience location "Australia" is not listed in the dropdown
    When I select "Canada" location for new audience
    Then audience size is recalculated
    And the audience location is "Australia,Canada"
    When I select "India" location for new audience
    Then alert about fans from "India" are not eligible is shown
    And audience size is the same
    And the audience location is "Australia,Canada,India"
    When I select "Hungary" location for new audience
    Then alert about fans from "India and Hungary" are not eligible is shown
    And audience size is the same
    And the audience location is "Australia,Canada,India,Hungary"

  @FS-4720
  @id_de641d7230e0b14058729c7935580ba406ef1d50aca6d5d57e1f3191dd826c25
  Scenario: Audience creation page audience size recalculation for country an city filters
    When I add "Rome" city to the location for new audience
    When I remember audience size as "romeAudienceSize"
    And the audience location is "Select"
    When I add "London" city to the location for new audience
    And the audience location is "Select"
    And audience size is greater then "romeAudienceSize" for new audience
    When I remember audience size as "londonAndRomeAudienceSize"
    And I select "Italy" location for new audience
    And audience size is the same as "romeAudienceSize" for new audience
    When I select "United Kingdom" location for new audience
    And audience size is the same as "londonAndRomeAudienceSize" for new audience
    And I can't add "New York" city to the location for new audience
    And I remove "United Kingdom" location from the audience
    And audience size is the same as "romeAudienceSize" for new audience
    When I remove "Italy" location from the audience
    And audience size is the same as "londonAndRomeAudienceSize" for new audience
    When I add "New York" city to the location for new audience
    Then audience size is greater then "londonAndRomeAudienceSize" for new audience
    When I select "Germany" location for new audience
    Then audience size is equal to 0 for new audience

  @FS-1964
  @FS-1891
  @id_b2209930ee6425e34b5d964966052321666294fc06ec88ae68fffc5f4c1f74e0
  Scenario: Audience creation page audience size recalculation after setting audience use
    Given Ad campaign audience use is selected
    And artist "Megan Moroney" is selected in multiselect for new audience
    When I open artist multiselect for new audience
    And I select "Adele" artist in multiselect for new audience and close
    Then audience size is recalculated
    And artist "Megan Moroney,Adele" is selected in multiselect for new audience
    When I select Email campaign audience use
    Then Email campaign audience use is selected
    And artist "Megan Moroney" is selected for new audience
    And audience size is recalculated
    When I select Advertising campaign audience use
    Then audience size is recalculated
    And Ad campaign audience use is selected

  @FS-1965
  @FS-1892
  @id_83ae1b4b48a0e803ae22258af88e21ec2a619b617b6b173fafde95dbc8025380
  Scenario: Audience creation page audience size recalculation after setting fan segment filter
    When I open fan segments filter dropdown
    Then there is an ability to include or exclude fan segment
    And I see all fan segments in the list as non-employee
    When I select "Superfans" fan segment
    Then "Superfans" fan segment is in filter with "Include" operator
    And audience size is recalculated
    When I select "Casual Fans" fan segment
    Then "Superfans,Casual Fans" fan segment is in filter with "Include" operator
    And audience size is recalculated
    When I select "Exclude" operator for fan segment filter and close
    Then "Superfans,Casual Fans" fan segment is in filter with "Exclude" operator
    And audience size is recalculated

  @FS-2018
  @FS-1893
  @id_8160207fd615f7278f2136fa406ff9e116b481634fcbfe40865d778f94381383
  Scenario: Audience creation page audience size recalculation after setting last engagement filter
    When I open last engagement filter dropdown
    Then there is an ability to include or exclude last engagement
    And all last engagement time periods are available in the list
    When I select "Past 2 Weeks" last engagement time period
    Then "Past 2 Weeks" last engagement is in filter with "Include" operator
    Then audience size is recalculated
    When I open last engagement filter dropdown
    And I select "Past 6 Months" last engagement time period
    Then "Past 6 Months" last engagement is in filter with "Include" operator
    And audience size is recalculated
    When I open last engagement filter dropdown
    And I select "Exclude" operator for last engagement filter and close
    Then "Past 6 Months" last engagement is in filter with "Exclude" operator
    And audience size is recalculated

  @FS-2019
  @FS-1899
  @id_6315c69284d1b1e2181a99e2946be6c546b278ac63fbea0580dc600df844f143
  Scenario: Audience creation page audience size recalculation after setting spend min, max filters
    Given min and max spend fields are enabled
    When I enter "10" into spend min field
    Then Shopify min field value is "10"
    And audience size is recalculated
    When I enter "5" into spend max field
    Then spend max field value is "10"
    And audience size is recalculated
    When I clear Shopify max field
    Then audience size is recalculated
    When I enter "20" into spend max field
    Then audience size is recalculated
    When I clear Shopify min field
    Then audience size is recalculated
    When I clear Shopify max field
    Then audience size is recalculated
    When I open artist multiselect for new audience
    And I select "Adele" artist in multiselect for new audience and close
    And I remove "Megan Moroney" artist from multiselect for new audience
    Then min and max Shopify spend fields are disabled

  @FS-2035
  @id_97b663503b1b583b5323ef1e691f035aa04974781461a55bb16a4431dcf881c4
  Scenario: Audience creation page audience size recalculation after setting fan DSP filter
    When I open fan DSP filter dropdown
    Then there is an ability to include or exclude fan DSP
    And all fan DSP services are available in the list
    And I select "Deezer" fan DSP service
    Then "Deezer" fan DSP is in filter with "Include" operator
    And audience size is recalculated
    And I select "Youtube" fan DSP service
    Then "Deezer,Youtube" fan DSP is in filter with "Include" operator
    And audience size is recalculated
    When I select "Exclude" operator for fan DSP filter
    Then "Deezer,Youtube" fan DSP is in filter with "Exclude" operator
    And audience size is recalculated
    When I select "Include" operator for fan DSP filter and close
    Then "Deezer,Youtube" fan DSP is in filter with "Include" operator
    And audience size is recalculated

  @FS-2036
  @FS-1901
  @id_4f748f809b935cae2da491cff196f189a2ef249610c83deb6b47622c01132898
  Scenario: Audience creation page audience size recalculation after setting heavy rotation filter
    When I open heavy rotation filter dropdown
    Then there is an ability to include or exclude heavy rotation
    When I select "In Heavy Rotation" option for heavy rotation filter
    Then "In Heavy Rotation" heavy rotation is in filter with "Include" operator
    And audience size is recalculated
    When I select "Exclude" operator for heavy rotation filter
    Then "In Heavy Rotation" heavy rotation is in filter with "Exclude" operator
    And audience size is recalculated
    When I select "NOT in Heavy Rotation" option for heavy rotation filter and close
    Then "In Heavy Rotation,NOT in Heavy Rotation" heavy rotation is in filter with "Exclude" operator
    And audience size is recalculated

  @FS-1946
  @cleanup-created-audience
  @id_b46423f6d413282b425a90bf249984dd90eff84bb2928346168dc100c531e481
  Scenario: Audience creation page filters selection add audience with filters
    When I select "United States" location for new audience
    And I open fan segments filter dropdown
    And I select "Engaged Fans" fan segment and close
    And I open last engagement filter dropdown
    And I select "Past Year" last engagement time period and close
    And I enter "5" into spend min field
    And I enter "100" into spend max field
    And I open fan DSP filter dropdown
    And I select "Exclude" operator for fan DSP filter
    And I select "Apple Music" fan DSP service and close
    And I open heavy rotation filter dropdown
    And I select "Exclude" operator for heavy rotation filter
    And I select "NOT in Heavy Rotation" option for heavy rotation filter and close
    And I enter random audience name
    And I click on the Save button for new audience
    Then new audience is created
    And created audience filters data is correct
