require_relative '../../integration_test_helper'
require 'gds_api/test_helpers/content_api'

class EngineIntegrationTest < ActionDispatch::IntegrationTest
  include GdsApi::TestHelpers::ContentApi

  setup do
    fixture_flows_path = Rails.root.join(*%w{test fixtures smart_answer_flows})
    @preload_flows = FLOW_REGISTRY_OPTIONS[:preload_flows]
    FLOW_REGISTRY_OPTIONS[:preload_flows] = false
    FLOW_REGISTRY_OPTIONS[:smart_answer_load_path] = fixture_flows_path
    SmartAnswer::FlowRegistry.reset_instance
    SmartdownAdapter::Registry.reset_instance
    stub_content_api_default_artefact
  end

  teardown do
    FLOW_REGISTRY_OPTIONS.delete(:smart_answer_load_path)
    FLOW_REGISTRY_OPTIONS[:preload_flows] = @preload_flows
    SmartAnswer::FlowRegistry.reset_instance
    SmartdownAdapter::Registry.reset_instance
  end
end

require_relative '../../integration_test_helper'
require 'gds_api/test_helpers/content_api'

class EngineIntegrationTest < ActionDispatch::IntegrationTest
  include GdsApi::TestHelpers::ContentApi

  setup do
    fixture_flows_path = Rails.root.join(*%w{test fixtures smart_answer_flows})
    @preload_flows = FLOW_REGISTRY_OPTIONS[:preload_flows]
    FLOW_REGISTRY_OPTIONS[:preload_flows] = false
    FLOW_REGISTRY_OPTIONS[:smart_answer_load_path] = fixture_flows_path
    SmartAnswer::FlowRegistry.reset_instance
    stub_content_api_default_artefact
  end

  teardown do
    FLOW_REGISTRY_OPTIONS.delete(:smart_answer_load_path)
    FLOW_REGISTRY_OPTIONS[:preload_flows] = @preload_flows
    SmartAnswer::FlowRegistry.reset_instance
  end
end

Remove Smartdown reference from EngineIntegrationTest
Remove Smartdown reference from EngineIntegrationTest

We've now converted the final Smartdown flow (pay-leave-for-parents) to Ruby so
can start removing the Smartdown related code.
