@fansifter
@ad-reporting-page
Feature: Ad Reporting page Data and Design verifications

  Background: Log in and open Ad Reporting page
    Given an orchard employee fansifter-set-2-4-aries for fansifter
    When I log in
    And I open Ad Reporting page
    Then I receive "reports" data from backend

  @FS-2798
  @FS-2799
  @id_edaeac10dddb63b6b4bc4dfb3926ee03ec0385fc0eb40ae9bccf523bfa4695ce
  Scenario: Ad Report > Overview Data and Design
    When I open last available report
    Then I receive "report" data from backend
    And report page header data is shown
    And all report page tabs are shown
    And report data is correctly shown in the page
    And topline performance table contains only default columns
    And topline table data is correctly shown on ad report page
    And performance by country table contains only default columns
    And by Country table data is correctly shown on ad report page

  @FS-3292
  @id_36beb61514ce1fd87d15ce6761d5febe7967f1d915c19f08b4efb1f5205dc19c
  Scenario: Ad report > Export topline and performance by country reports
    When I open last available report
    Then I receive "report" data from backend
    When I export top line report to csv
    Then valid topline performance CSV is downloaded
    When I export performance by country report to csv
    Then valid performance by country CSV is downloaded

  @FS-2915
  @FS-2916
  @id_e43998d3dbdf24f111d76dbcb7b2135457d063d906ca92e7081a8cf9b2fa08c7
  Scenario: Ad report > Campaigns tab Data and Design
    When I open last available report
    Then I receive "report" data from backend
    When I click on report's "Campaigns" tab
    Then Report's "Campaigns" filters are shown
    And I receive report's campaigns data from backend
    And Export and customize table actions are present in report's "Campaigns" tab
    And Default columns in report's "Campaigns" tab table are shown
    And Default report's "Campaigns" data is correctly shown in the table
    When I open Ad reporting Customize table modal
    Then I select all columns and save changes
    And All columns in report's "Campaigns" tab table are shown
    And All report's "Campaigns" data is correctly shown in the table

  @FS-2950
  @FS-2949
  @id_c335a5a98dce4f9a71c9f04474de35b003315c51ac7e8358e25908c62cd28b95
  Scenario: Ad Report > Ad Sets tab Data and Design
    When I open last available report
    Then I receive "report" data from backend
    When I click on report's "Ad Sets" tab
    Then I receive report's ad sets data from backend
    And Default report's "Ad Sets" data is correctly shown in the table
    And Default columns in report's "Ad Sets" tab table are shown
    And Report's "Ad Sets" filters are shown
    And Export and customize table actions are present in report's "Ad Sets" tab
    When I open Ad reporting Customize table modal
    Then I select all columns and save changes
    And All report's "Ad Sets" data is correctly shown in the table
    And All columns in report's "Ad Sets" tab table are shown

  @FS-2951
  @FS-2952
  @id_df6ab0fc72dcf93a862abd58219ed1b6018565dd4e4d0d20ed88dd8533de9f02
  Scenario: Ad Report > Ads tab Data and Design
    When I open last available report
    Then I receive "report" data from backend
    When I click on report's "Ads" tab
    Then I receive report's grouped ads data from backend
    And report's grouped ads data is correctly shown in the table
    And Report's "Ads" filters are shown
    When I switch report's ads to individual view
    Then I receive report's ads data from backend
    And Default columns in report's "Ads" tab table are shown
    And Default report's "Ads" data is correctly shown in the table
    And Report's "Ads" filters are shown
    And Export and customize table actions are present in report's "Ads" tab
    When I open Ad reporting Customize table modal
    Then I select all columns and save changes
    And All columns in report's "Ads" tab table are shown
    And All report's "Ads" data is correctly shown in the table
