@deprecated
@fansifter
@app-connections-page
Feature: App connections page

  Background: Log in and open App Connections page
    Given an orchard employee fansifter-set-2-4-aries for fansifter
    And I log in to fansifter silently
    And I visit App Connections page

  @FS-2458
  @id_5592022f8819a2d321fc022c70e60fa70ddc752331eebfe7d404728f5ac8d908
  Scenario: App connections page design
    Then App Connections page header is shown
    And Meta Ad Accounts section with table is shown
    And I see only "Test Label, Columbia Records Group" accounts in "Meta" app connections table
    And Google Ad Accounts section with table is shown
    And I see only "Test Label, Columbia Records Group" accounts in "Google" app connections table
    And TikTok Ad Accounts section with table is shown
    And I see only "Test Label, Columbia Records Group" accounts in "TikTok" app connections table
    And Shopify stores section with table is shown
    And I see only "Test Label, Columbia Records Group" accounts in "Shopify" app connections table
    When I open Add a Meta ad account modal
    Then Add a Meta ad account modal is shown
    When I close Add a Meta ad account modal
    And I open Connect a Google ad account modal
    Then Connect a Google ad account modal is shown
    When I close Connect a Google ad account modal
    And I open Connect a TikTok ad account modal
    Then Connect a TikTok ad account modal is shown
    When I close Connect a TikTok ad account modal
    And I open Connect a Shopify store modal
    Then Connect a Shopify store modal is shown

  @FS-2440
  @id_399c0b45853ec67a2e2c034c47f58ff2b695bb7b6a73b1c203e3aec23dec71c2
  Scenario: App connections Meta Ad Accounts modal default state
    Please note, this test requires:
    - feature flag "audience_skip_meta_audience_sharing_connection" to be enabled for the test user.
    - existing "Demo Ad Account" connection.

    When I open Add a Meta ad account modal
    Then Audience sharing is enabled with connected account
    And Campaign reporting is not connected

  @FS-2517
  @id_ef6fb357780217b3c45a9d05213934c48ebb2cfd49fb46c59f9b3e1bbb2385fb
  Scenario: App connections Meta Ad Accounts Campaign Reporting connection
    Please note, this test requires:
    - feature flag "audience_skip_meta_audience_sharing_connection" to be enabled for the test user.
    - existing "Demo Ad Account" connection.

    When I open Add a Meta ad account modal
    And I click Continue button in the Add a Meta ad account modal
    Then you are redirected to Fivetran connection page
    When I click Continue button in the Fivetran page
    Then Fivetran connection dialog is shown
