Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@ import Common
struct SearchEngineFlagManager {
/// Whether Search Engine Consolidation is enabled.
/// If enabled, search engines are fetched from Remote Settings rather than our pre-bundled XML files.
/// TODO: [FXIOS-13834 & 11403] Remove hardcoded override once UI & unit tests are updated (or deleted)
static var isSECEnabled: Bool {
// TODO: [FXIOS-13834 & 11403] Remove hardcoded override once UI & unit tests are updated (or deleted)
guard !AppConstants.isRunningUnitTest && !AppConstants.isRunningUITests else { return false }

// If you want to disable during unit tests, do it here:
if AppConstants.isRunningUnitTest {
return false
}
// SEC enabled for all users. Related clean-up forthcoming in [FXIOS-11403].
return true
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ class SearchTests: FeatureFlaggedTestBase {
// Open the list of default search engines and select the desired
app.tables.cells.element(boundBy: 0).waitAndTap()
let tablesQuery2 = app.tables
tablesQuery2.staticTexts[searchEngine].waitAndTap()
tablesQuery2.staticTexts.containing(NSPredicate(format: "label CONTAINS[c] %@", searchEngine)).element.waitAndTap()
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Wikipedia" now appears as "Wikipedia (en)" in the list of search engines.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes the name has changed between the bundled engine and the Wikipedia entries on RS (so that's expected)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@clarmso we already have a function that checks if an element contains some text.
You can simply use tablesQuery2.staticTexts.elementContainingText(searchEngine).waitAndTap()
I have tested locally and it works


navigator.goto(HomePanelsScreen)
navigator.goto(URLBarOpen)
Expand Down