From a087cf837b2b00cedb199a8a062b98d477c82fd7 Mon Sep 17 00:00:00 2001 From: Juan Manuel Pereira Date: Tue, 12 Nov 2024 11:42:04 -0300 Subject: [PATCH] Do not run NTP Search Box experiment (#3537) Task/Issue URL: https://app.asana.com/0/1201037661562251/1208734291836545/f Tech Design URL: CC: **Description**: Avoid showing the NTP Search Box when running UI Tests. **Definition of Done**: * [x] Does this PR satisfy our [Definition of Done](https://app.asana.com/0/1202500774821704/1207634633537039/f)? --- ###### Internal references: [Pull Request Review Checklist](https://app.asana.com/0/1202500774821704/1203764234894239/f) [Software Engineering Expectations](https://app.asana.com/0/59792373528535/199064865822552) [Technical Design Template](https://app.asana.com/0/59792373528535/184709971311943) [Pull Request Documentation](https://app.asana.com/0/1202500774821704/1204012835277482/f) --- DuckDuckGo/HomePage/Model/NewTabPageSearchBoxExperiment.swift | 3 +++ 1 file changed, 3 insertions(+) diff --git a/DuckDuckGo/HomePage/Model/NewTabPageSearchBoxExperiment.swift b/DuckDuckGo/HomePage/Model/NewTabPageSearchBoxExperiment.swift index eb49a31193..de1fbea87b 100644 --- a/DuckDuckGo/HomePage/Model/NewTabPageSearchBoxExperiment.swift +++ b/DuckDuckGo/HomePage/Model/NewTabPageSearchBoxExperiment.swift @@ -75,6 +75,9 @@ protocol NewTabPageSearchBoxExperimentCohortDeciding { struct DefaultNewTabPageSearchBoxExperimentCohortDecider: NewTabPageSearchBoxExperimentCohortDeciding { var cohort: NewTabPageSearchBoxExperiment.Cohort? { + if NSApp.runType == .uiTests { + return nil + } // We enroll all new users if AppDelegate.isNewUser {