From ab8dadb7d813d0764eda25919c3c20d673fd32ac Mon Sep 17 00:00:00 2001 From: Mark Taylor <138604938+mtaylorgds@users.noreply.github.com> Date: Wed, 25 Sep 2024 14:42:07 +0100 Subject: [PATCH] Fix flakey integration tests Turn off the `design_system_edit` feature toggle for legacy integration tests to ensure the new GOV.UK Design System-based UI is not used by these legacy UI-based tests. --- test/integration/edition_workflow_test.rb | 1 - test/legacy_integration_test_helper.rb | 5 +++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/test/integration/edition_workflow_test.rb b/test/integration/edition_workflow_test.rb index 376303fdf..07ea5d30e 100644 --- a/test/integration/edition_workflow_test.rb +++ b/test/integration/edition_workflow_test.rb @@ -18,7 +18,6 @@ class EditionWorkflowTest < LegacyJavascriptIntegrationTest test_strategy = Flipflop::FeatureSet.current.test! test_strategy.switch!(:design_system_publications_filter, false) - test_strategy.switch!(:design_system_edit, false) end teardown do diff --git a/test/legacy_integration_test_helper.rb b/test/legacy_integration_test_helper.rb index 9a4dd2193..5820d1069 100644 --- a/test/legacy_integration_test_helper.rb +++ b/test/legacy_integration_test_helper.rb @@ -9,6 +9,11 @@ class LegacyIntegrationTest < ActionDispatch::IntegrationTest include CapybaraSelect2::Helpers include Warden::Test::Helpers + setup do + test_strategy = Flipflop::FeatureSet.current.test! + test_strategy.switch!(:design_system_edit, false) + end + teardown do Capybara.reset_sessions! # Forget the (simulated) browser state Capybara.use_default_driver # Revert Capybara.current_driver to Capybara.default_driver