Skip to content

Commit 4fe6fef

Browse files
authored
Bugfix FXIOS-14306 [Translations] display icon after toggling settings ON (#31041)
1 parent 929dc30 commit 4fe6fef

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

firefox-ios/Client/Frontend/Settings/Translation/TranslationSettingsViewController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ final class TranslationSettingsViewController: SettingsTableViewController {
3636
guard let self else { return }
3737
store.dispatch(
3838
ToolbarAction(
39-
translationConfiguration: TranslationConfiguration(prefs: self.prefs),
39+
translationConfiguration: TranslationConfiguration(prefs: self.prefs, state: .inactive),
4040
windowUUID: self.windowUUID,
4141
actionType: ToolbarActionType.didTranslationSettingsChange
4242
)

firefox-ios/firefox-ios-tests/Tests/XCUITests/SettingsTests.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -353,6 +353,9 @@ class SettingsTests: FeatureFlaggedTestBase {
353353
addLaunchArgument(jsonFileName: "defaultEnabledOn", featureName: "translations-feature")
354354
app.launch()
355355
navigator.nowAt(HomePanelsScreen)
356+
navigator.openURL(path(forTestPage: "test-translation.html"))
357+
mozWaitForElementToExist(app.buttons[AccessibilityIdentifiers.Toolbar.translateButton])
358+
356359
navigator.goto(SettingsScreen)
357360
let table = app.tables.element(boundBy: 0)
358361
mozWaitForElementToExist(table)
@@ -368,7 +371,6 @@ class SettingsTests: FeatureFlaggedTestBase {
368371
dismissSearchScreenFromTranslation()
369372

370373
navigator.nowAt(BrowserTab)
371-
navigator.openURL(path(forTestPage: "test-translation.html"))
372374
mozWaitForElementToNotExist(app.buttons[AccessibilityIdentifiers.Toolbar.translateButton])
373375

374376
navigator.goto(SettingsScreen)
@@ -381,7 +383,6 @@ class SettingsTests: FeatureFlaggedTestBase {
381383
dismissSearchScreenFromTranslation()
382384

383385
navigator.nowAt(BrowserTab)
384-
navigator.openURL(path(forTestPage: "test-translation.html"))
385386
mozWaitForElementToExist(app.buttons[AccessibilityIdentifiers.Toolbar.translateButton])
386387
navigator.nowAt(BrowserTab)
387388

0 commit comments

Comments
 (0)