diff --git a/Sources/fxios/Commands/L10n/L10nProduct.swift b/Sources/fxios/Commands/L10n/L10nProduct.swift index 38f70e3..ef4a653 100644 --- a/Sources/fxios/Commands/L10n/L10nProduct.swift +++ b/Sources/fxios/Commands/L10n/L10nProduct.swift @@ -40,8 +40,8 @@ enum L10nProduct: String, ExpressibleByArgument, CaseIterable { /// Relative path from repo root to .xcodeproj var projectPath: String { switch self { - case .firefox: return "Client.xcodeproj" - case .focus: return "Blockzilla.xcodeproj" + case .firefox: return "firefox-ios/Client.xcodeproj" + case .focus: return "focus-ios/Blockzilla.xcodeproj" } } diff --git a/Tests/fxiosTests/L10n/L10nProductTests.swift b/Tests/fxiosTests/L10n/L10nProductTests.swift index 7ae400a..92287a1 100644 --- a/Tests/fxiosTests/L10n/L10nProductTests.swift +++ b/Tests/fxiosTests/L10n/L10nProductTests.swift @@ -59,9 +59,9 @@ struct L10nProductTests { #expect(L10nProduct.firefox.projectName == "Client.xcodeproj") } - @Test("Firefox projectPath is Client.xcodeproj") + @Test("Firefox projectPath is firefox-ios/Client.xcodeproj") func firefoxProjectPath() { - #expect(L10nProduct.firefox.projectPath == "Client.xcodeproj") + #expect(L10nProduct.firefox.projectPath == "firefox-ios/Client.xcodeproj") } @Test("Firefox skipWidgetKit is false") @@ -95,9 +95,9 @@ struct L10nProductTests { #expect(L10nProduct.focus.projectName == "Blockzilla.xcodeproj") } - @Test("Focus projectPath is Blockzilla.xcodeproj") + @Test("Focus projectPath is focus-ios/Blockzilla.xcodeproj") func focusProjectPath() { - #expect(L10nProduct.focus.projectPath == "Blockzilla.xcodeproj") + #expect(L10nProduct.focus.projectPath == "focus-ios/Blockzilla.xcodeproj") } @Test("Focus skipWidgetKit is true") @@ -106,6 +106,24 @@ struct L10nProductTests { } } + // MARK: - BuildProduct Parity + + /// L10nProduct.projectPath must match BuildProduct.projectPath for the same product, + /// since both resolve against the same repo root. Drift caused issue #23. + @Suite("BuildProduct Parity") + struct BuildProductParityTests { + + @Test("Firefox projectPath matches BuildProduct.firefox") + func firefoxProjectPathMatchesBuildProduct() { + #expect(L10nProduct.firefox.projectPath == BuildProduct.firefox.projectPath) + } + + @Test("Focus projectPath matches BuildProduct.focus") + func focusProjectPathMatchesBuildProduct() { + #expect(L10nProduct.focus.projectPath == BuildProduct.focus.projectPath) + } + } + // MARK: - Argument Parser Integration @Suite("ArgumentParser Integration")