/*
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.facebook.litho.testing.testrunner;

import com.facebook.litho.config.ComponentsConfiguration;
import org.junit.runners.model.FrameworkMethod;

public class SplitBuildAndLayoutTestRunConfiguration implements LithoTestRunConfiguration {

  private final boolean defaultApplyStateUpdateEarly =
      ComponentsConfiguration.applyStateUpdateEarly;
  private final boolean defaultIsBuildAndLayoutSplitEnabled =
      ComponentsConfiguration.isBuildAndLayoutSplitEnabled;

  @Override
  public void beforeTest(FrameworkMethod method) {
    ComponentsConfiguration.isBuildAndLayoutSplitEnabled = true;
    ComponentsConfiguration.applyStateUpdateEarly = true;
  }

  @Override
  public void afterTest(FrameworkMethod method) {
    ComponentsConfiguration.isBuildAndLayoutSplitEnabled = defaultIsBuildAndLayoutSplitEnabled;
    ComponentsConfiguration.applyStateUpdateEarly = defaultApplyStateUpdateEarly;
  }
}

@@ -1090,16 +1090,106 @@
 Enabled;
+%0A  private final boolean defaultUseResolvedTree = ComponentsConfiguration.useResolvedTree;
 %0A%0A  @Ove
@@ -1368,16 +1368,68 @@
 = true;%0A
+    ComponentsConfiguration.useResolvedTree = true;%0A
   %7D%0A%0A  @
@@ -1583,16 +1583,16 @@
 nabled;%0A
-
     Comp
@@ -1665,14 +1665,84 @@
 eEarly;%0A
+    ComponentsConfiguration.useResolvedTree = defaultUseResolvedTree;%0A
   %7D%0A%7D%0A

Add useResolvedTree flag to SplitBuildAndLayoutTestConfiguration