diff --git a/OUDS/Core/Components/Sources/Extensions/View+Typography.swift b/OUDS/Core/Components/Sources/Extensions/View+Typography.swift index 71e4b7560f..51b83d89bf 100644 --- a/OUDS/Core/Components/Sources/Extensions/View+Typography.swift +++ b/OUDS/Core/Components/Sources/Extensions/View+Typography.swift @@ -23,7 +23,7 @@ extension View { /// - Parameter theme: The current `OUDSTheme` to use to load the current font family and the suitable font semantic token. /// - Returns some View: The current `View` but with new typography applied public func typeDisplayLarge(_ theme: OUDSTheme) -> some View { - self.modifier(TypographyModifier(customFontFamily: theme.customFontFamily, font: theme.typeDisplayLarge)) + self.modifier(TypographyModifier(customFontFamily: theme.customFontFamily, font: theme.fonts.typeDisplayLarge)) } /// Modifies the current `View` to apply a *display medium* typography. @@ -31,7 +31,7 @@ extension View { /// - Parameter theme: The current `OUDSTheme` to use to load the current font family and the suitable font semantic token. /// - Returns some View: The current `View` but with new typography applied public func typeDisplayMedium(_ theme: OUDSTheme) -> some View { - self.modifier(TypographyModifier(customFontFamily: theme.customFontFamily, font: theme.typeDisplayMedium)) + self.modifier(TypographyModifier(customFontFamily: theme.customFontFamily, font: theme.fonts.typeDisplayMedium)) } /// Modifies the current `View` to apply a *display small* typography. @@ -39,7 +39,7 @@ extension View { /// - Parameter theme: The current `OUDSTheme` to use to load the current font family and the suitable font semantic token. /// - Returns some View: The current `View` but with new typography applied public func typeDisplaySmall(_ theme: OUDSTheme) -> some View { - self.modifier(TypographyModifier(customFontFamily: theme.customFontFamily, font: theme.typeDisplaySmall)) + self.modifier(TypographyModifier(customFontFamily: theme.customFontFamily, font: theme.fonts.typeDisplaySmall)) } /// Modifies the current `View` to apply a *heading x large* typography. @@ -47,7 +47,7 @@ extension View { /// - Parameter theme: The current `OUDSTheme` to use to load the current font family and the suitable font semantic token. /// - Returns some View: The current `View` but with new typography applied public func typeHeadingXLarge(_ theme: OUDSTheme) -> some View { - self.modifier(TypographyModifier(customFontFamily: theme.customFontFamily, font: theme.typeHeadingXLarge)) + self.modifier(TypographyModifier(customFontFamily: theme.customFontFamily, font: theme.fonts.typeHeadingXLarge)) } /// Modifies the current `View` to apply a *heading large* typography. @@ -55,7 +55,7 @@ extension View { /// - Parameter theme: The current `OUDSTheme` to use to load the current font family and the suitable font semantic token. /// - Returns some View: The current `View` but with new typography applied public func typeHeadingLarge(_ theme: OUDSTheme) -> some View { - self.modifier(TypographyModifier(customFontFamily: theme.customFontFamily, font: theme.typeHeadingLarge)) + self.modifier(TypographyModifier(customFontFamily: theme.customFontFamily, font: theme.fonts.typeHeadingLarge)) } /// Modifies the current `View` to apply a *heading medium* typography. @@ -63,7 +63,7 @@ extension View { /// - Parameter theme: The current `OUDSTheme` to use to load the current font family and the suitable font semantic token. /// - Returns some View: The current `View` but with new typography applied public func typeHeadingMedium(_ theme: OUDSTheme) -> some View { - self.modifier(TypographyModifier(customFontFamily: theme.customFontFamily, font: theme.typeHeadingMedium)) + self.modifier(TypographyModifier(customFontFamily: theme.customFontFamily, font: theme.fonts.typeHeadingMedium)) } /// Modifies the current `View` to apply a *heading small* typography. @@ -71,7 +71,7 @@ extension View { /// - Parameter theme: The current `OUDSTheme` to use to load the current font family and the suitable font semantic token. /// - Returns some View: The current `View` but with new typography applied public func typeHeadingSmall(_ theme: OUDSTheme) -> some View { - self.modifier(TypographyModifier(customFontFamily: theme.customFontFamily, font: theme.typeHeadingSmall)) + self.modifier(TypographyModifier(customFontFamily: theme.customFontFamily, font: theme.fonts.typeHeadingSmall)) } /// Modifies the current `View` to apply a *body default large* typography. @@ -79,7 +79,7 @@ extension View { /// - Parameter theme: The current `OUDSTheme` to use to load the current font family and the suitable font semantic token. /// - Returns some View: The current `View` but with new typography applied public func typeBodyDefaultLarge(_ theme: OUDSTheme) -> some View { - self.modifier(TypographyModifier(customFontFamily: theme.customFontFamily, font: theme.typeBodyDefaultLarge)) + self.modifier(TypographyModifier(customFontFamily: theme.customFontFamily, font: theme.fonts.typeBodyDefaultLarge)) } /// Modifies the current `View` to apply a *body default medium* typography. @@ -87,7 +87,7 @@ extension View { /// - Parameter theme: The current `OUDSTheme` to use to load the current font family and the suitable font semantic token. /// - Returns some View: The current `View` but with new typography applied public func typeBodyDefaultMedium(_ theme: OUDSTheme) -> some View { - self.modifier(TypographyModifier(customFontFamily: theme.customFontFamily, font: theme.typeBodyDefaultMedium)) + self.modifier(TypographyModifier(customFontFamily: theme.customFontFamily, font: theme.fonts.typeBodyDefaultMedium)) } /// Modifies the current `View` to apply a *body default small* typography. @@ -95,7 +95,7 @@ extension View { /// - Parameter theme: The current `OUDSTheme` to use to load the current font family and the suitable font semantic token. /// - Returns some View: The current `View` but with new typography applied public func typeBodyDefaultSmall(_ theme: OUDSTheme) -> some View { - self.modifier(TypographyModifier(customFontFamily: theme.customFontFamily, font: theme.typeBodyDefaultSmall)) + self.modifier(TypographyModifier(customFontFamily: theme.customFontFamily, font: theme.fonts.typeBodyDefaultSmall)) } /// Modifies the current `View` to apply a *body strong large* typography. @@ -103,7 +103,7 @@ extension View { /// - Parameter theme: The current `OUDSTheme` to use to load the current font family and the suitable font semantic token. /// - Returns some View: The current `View` but with new typography applied public func typeBodyStrongLarge(_ theme: OUDSTheme) -> some View { - self.modifier(TypographyModifier(customFontFamily: theme.customFontFamily, font: theme.typeBodyStrongLarge)) + self.modifier(TypographyModifier(customFontFamily: theme.customFontFamily, font: theme.fonts.typeBodyStrongLarge)) } /// Modifies the current `View` to apply a *body strong medium* typography. @@ -111,7 +111,7 @@ extension View { /// - Parameter theme: The current `OUDSTheme` to use to load the current font family and the suitable font semantic token. /// - Returns some View: The current `View` but with new typography applied public func typeBodyStrongMedium(_ theme: OUDSTheme) -> some View { - self.modifier(TypographyModifier(customFontFamily: theme.customFontFamily, font: theme.typeBodyStrongMedium)) + self.modifier(TypographyModifier(customFontFamily: theme.customFontFamily, font: theme.fonts.typeBodyStrongMedium)) } /// Modifies the current `View` to apply a *body strong small* typography. @@ -119,7 +119,7 @@ extension View { /// - Parameter theme: The current `OUDSTheme` to use to load the current font family and the suitable font semantic token. /// - Returns some View: The current `View` but with new typography applied public func typeBodyStrongSmall(_ theme: OUDSTheme) -> some View { - self.modifier(TypographyModifier(customFontFamily: theme.customFontFamily, font: theme.typeBodyStrongSmall)) + self.modifier(TypographyModifier(customFontFamily: theme.customFontFamily, font: theme.fonts.typeBodyStrongSmall)) } /// Modifies the current `View` to apply a *label default x large* typography. @@ -127,7 +127,7 @@ extension View { /// - Parameter theme: The current `OUDSTheme` to use to load the current font family and the suitable font semantic token. /// - Returns some View: The current `View` but with new typography applied public func typeLabelDefaultXLarge(_ theme: OUDSTheme) -> some View { - self.modifier(TypographyModifier(customFontFamily: theme.customFontFamily, font: theme.typeLabelDefaultXLarge)) + self.modifier(TypographyModifier(customFontFamily: theme.customFontFamily, font: theme.fonts.typeLabelDefaultXLarge)) } /// Modifies the current `View` to apply a *label default large* typography. @@ -135,7 +135,7 @@ extension View { /// - Parameter theme: The current `OUDSTheme` to use to load the current font family and the suitable font semantic token. /// - Returns some View: The current `View` but with new typography applied public func typeLabelDefaultLarge(_ theme: OUDSTheme) -> some View { - self.modifier(TypographyModifier(customFontFamily: theme.customFontFamily, font: theme.typeBodyDefaultLarge)) + self.modifier(TypographyModifier(customFontFamily: theme.customFontFamily, font: theme.fonts.typeBodyDefaultLarge)) } /// Modifies the current `View` to apply a *label default medium* typography. @@ -143,7 +143,7 @@ extension View { /// - Parameter theme: The current `OUDSTheme` to use to load the current font family and the suitable font semantic token. /// - Returns some View: The current `View` but with new typography applied public func typeLabelDefaultMedium(_ theme: OUDSTheme) -> some View { - self.modifier(TypographyModifier(customFontFamily: theme.customFontFamily, font: theme.typeBodyDefaultMedium)) + self.modifier(TypographyModifier(customFontFamily: theme.customFontFamily, font: theme.fonts.typeBodyDefaultMedium)) } /// Modifies the current `View` to apply a *label default small* typography. @@ -151,7 +151,7 @@ extension View { /// - Parameter theme: The current `OUDSTheme` to use to load the current font family and the suitable font semantic token. /// - Returns some View: The current `View` but with new typography applied public func typeLabelDefaultSmall(_ theme: OUDSTheme) -> some View { - self.modifier(TypographyModifier(customFontFamily: theme.customFontFamily, font: theme.typeBodyDefaultSmall)) + self.modifier(TypographyModifier(customFontFamily: theme.customFontFamily, font: theme.fonts.typeBodyDefaultSmall)) } /// Modifies the current `View` to apply a *label strong x large* typography. @@ -159,7 +159,7 @@ extension View { /// - Parameter theme: The current `OUDSTheme` to use to load the current font family and the suitable font semantic token. /// - Returns some View: The current `View` but with new typography applied public func typeLabelStrongXLarge(_ theme: OUDSTheme) -> some View { - self.modifier(TypographyModifier(customFontFamily: theme.customFontFamily, font: theme.typeLabelStrongXLarge)) + self.modifier(TypographyModifier(customFontFamily: theme.customFontFamily, font: theme.fonts.typeLabelStrongXLarge)) } /// Modifies the current `View` to apply a *label strong large* typography. @@ -167,7 +167,7 @@ extension View { /// - Parameter theme: The current `OUDSTheme` to use to load the current font family and the suitable font semantic token. /// - Returns some View: The current `View` but with new typography applied public func typeLabelStrongLarge(_ theme: OUDSTheme) -> some View { - self.modifier(TypographyModifier(customFontFamily: theme.customFontFamily, font: theme.typeLabelStrongLarge)) + self.modifier(TypographyModifier(customFontFamily: theme.customFontFamily, font: theme.fonts.typeLabelStrongLarge)) } /// Modifies the current `View` to apply a *label strong medium* typography. @@ -175,7 +175,7 @@ extension View { /// - Parameter theme: The current `OUDSTheme` to use to load the current font family and the suitable font semantic token. /// - Returns some View: The current `View` but with new typography applied public func typeLabelStrongMedium(_ theme: OUDSTheme) -> some View { - self.modifier(TypographyModifier(customFontFamily: theme.customFontFamily, font: theme.typeLabelStrongMedium)) + self.modifier(TypographyModifier(customFontFamily: theme.customFontFamily, font: theme.fonts.typeLabelStrongMedium)) } /// Modifies the current `View` to apply a *label strong small* typography. @@ -183,7 +183,7 @@ extension View { /// - Parameter theme: The current `OUDSTheme` to use to load the current font family and the suitable font semantic token. /// - Returns some View: The current `View` but with new typography applied public func typeLabelStrongSmall(_ theme: OUDSTheme) -> some View { - self.modifier(TypographyModifier(customFontFamily: theme.customFontFamily, font: theme.typeLabelStrongSmall)) + self.modifier(TypographyModifier(customFontFamily: theme.customFontFamily, font: theme.fonts.typeLabelStrongSmall)) } /// Modifies the current `View` to apply a *code medium* typography. @@ -191,7 +191,7 @@ extension View { /// - Parameter theme: The current `OUDSTheme` to use to load the current font family and the suitable font semantic token. /// - Returns some View: The current `View` but with new typography applied public func typeCodeMedium(_ theme: OUDSTheme) -> some View { - self.modifier(TypographyModifier(customFontFamily: theme.customFontFamily, font: theme.typeCodeMedium)) + self.modifier(TypographyModifier(customFontFamily: theme.customFontFamily, font: theme.fonts.typeCodeMedium)) } /// Modifies the current `View` to apply a *code small* typography. @@ -199,6 +199,6 @@ extension View { /// - Parameter theme: The current `OUDSTheme` to use to load the current font family and the suitable font semantic token. /// - Returns some View: The current `View` but with new typography applied public func typeCodeSmall(_ theme: OUDSTheme) -> some View { - self.modifier(TypographyModifier(customFontFamily: theme.customFontFamily, font: theme.typeCodeSmall)) + self.modifier(TypographyModifier(customFontFamily: theme.customFontFamily, font: theme.fonts.typeCodeSmall)) } } diff --git a/OUDS/Core/OUDS/Sources/OUDSTheme/OUDSTheme+SemanticTokens/OUDSTheme+FontCompositeSemanticTokens.swift b/OUDS/Core/OUDS/Sources/OUDSTheme/OUDSTheme+SemanticTokens/OUDSTheme+FontCompositeSemanticTokens.swift index 0ea2e94c2c..e5799631b5 100644 --- a/OUDS/Core/OUDS/Sources/OUDSTheme/OUDSTheme+SemanticTokens/OUDSTheme+FontCompositeSemanticTokens.swift +++ b/OUDS/Core/OUDS/Sources/OUDSTheme/OUDSTheme+SemanticTokens/OUDSTheme+FontCompositeSemanticTokens.swift @@ -22,10 +22,10 @@ import OUDSTokensSemantic // swiftlint:disable line_length /// Defines basic values common to all themes for ``FontCompositeSemanticTokens``. -/// These values can be overriden inside ``OUDSTheme`` subclasses (in extensions or not, in the same module or not) thanks to the `@objc open` combination. +/// These values can be overriden inside ``OUDSFontSemanticTokensWrapper`` subclasses (in extensions or not, in the same module or not) thanks to the `@objc open` combination. /// The aim of this extensions is to make relationships between all composite semantic tokens for typography / fonts and associated composite raw tokens. -/// `OUDSTheme` can be seen as a kind of "abstract class" in _object oriented paradigm_. -extension OUDSTheme: FontCompositeSemanticTokens { +/// The *tokenator* is not able to provide code for such "composite" objects because the *Figma* tool itself cannot manage that and does not output anything in its JSON to process. +extension OUDSFontSemanticTokensWrapper: FontCompositeSemanticTokens { // MARK: - Semantic tokens - Typography - Composites - Display diff --git a/OUDS/Core/OUDS/Sources/OUDSTheme/OUDSTheme+SemanticTokens/OUDSTheme+FontMultipleSemanticTokens.swift b/OUDS/Core/OUDS/Sources/OUDSTheme/OUDSTheme+SemanticTokens/OUDSTheme+FontMultipleSemanticTokens.swift index 01a017322f..0d6642cb74 100644 --- a/OUDS/Core/OUDS/Sources/OUDSTheme/OUDSTheme+SemanticTokens/OUDSTheme+FontMultipleSemanticTokens.swift +++ b/OUDS/Core/OUDS/Sources/OUDSTheme/OUDSTheme+SemanticTokens/OUDSTheme+FontMultipleSemanticTokens.swift @@ -21,9 +21,9 @@ import OUDSTokensSemantic // swiftlint:disable line_length -/// Defines wrapper objects for typography semantic tokens but "multiple", i.e. tokens with values depending to size classes or color schemes. -/// These values can be overriden inside ``OUDSTheme`` subclasses (in extensions or not, in the same module or not) thanks to the `@objc open` combination. -extension OUDSTheme: FontMultipleSemanticTokens { +/// Defines wrapper objects for font semantic tokens but "multiple", i.e. tokens with values depending to size classes or color schemes. +/// These values can be overriden inside `OUDSFontSemanticTokensWrapper` subclasses (in extensions or not, in the same module or not) thanks to the `@objc open` combination. +extension OUDSFontSemanticTokensWrapper: FontMultipleSemanticTokens { // MARK: - Semantic token - Typography - Font - Size diff --git a/OUDS/Core/OUDS/Sources/OUDSTheme/OUDSTheme+SemanticTokens/OUDSTheme+FontSemanticTokens.swift b/OUDS/Core/OUDS/Sources/OUDSTheme/OUDSTheme+SemanticTokens/OUDSTheme+FontSemanticTokens.swift index 3af7fc8444..c3a327c9e5 100644 --- a/OUDS/Core/OUDS/Sources/OUDSTheme/OUDSTheme+SemanticTokens/OUDSTheme+FontSemanticTokens.swift +++ b/OUDS/Core/OUDS/Sources/OUDSTheme/OUDSTheme+SemanticTokens/OUDSTheme+FontSemanticTokens.swift @@ -15,7 +15,7 @@ import Foundation import OUDSTokensRaw import OUDSTokensSemantic -extension OUDSTheme: FontSemanticTokens { +extension OUDSFontSemanticTokensWrapper: FontSemanticTokens { @objc open var fontFamily: FontFamilySemanticToken { FontRawTokens.fontFamilySystemSfPro } @objc open var fontLetterSpacingBodyLargeMobile: FontLetterSpacingSemanticToken { FontRawTokens.fontLetterSpacing250 } @objc open var fontLetterSpacingBodyLargeTablet: FontLetterSpacingSemanticToken { FontRawTokens.fontLetterSpacing250 } diff --git a/OUDS/Core/OUDS/Sources/OUDSTheme/OUDSTheme.swift b/OUDS/Core/OUDS/Sources/OUDSTheme/OUDSTheme.swift index f67c18f36e..2ad08e0862 100644 --- a/OUDS/Core/OUDS/Sources/OUDSTheme/OUDSTheme.swift +++ b/OUDS/Core/OUDS/Sources/OUDSTheme/OUDSTheme.swift @@ -41,6 +41,9 @@ open class OUDSTheme: @unchecked Sendable { /// All elevation semantic tokens exposed in one object public let elevations: AllElevationSemanticTokens + /// All font semantic tokens exposed in one object + public let fonts: AllFontSemanticTokens + /// A theme can have a custom font which is not the system font public let customFontFamily: FontFamilySemanticToken? @@ -53,14 +56,17 @@ open class OUDSTheme: @unchecked Sendable { /// - opacities: An object providing all the opacity semantic tokens, by default `OUDSOpacitySemanticTokensWrapper` /// - colors: An object providing all the color semantic tokens, by default `OUDSColorSemanticTokensWrapper` /// - elevations: An object providing all the elevation semantic tokens, by default `OUDSElevationSemanticTokensWrapper` + /// - fonts: An object providing all the font semantic tokens, by default `OUDSFontSemanticTokensWrapper` public init(borders: AllBorderSemanticTokens = OUDSBorderSemanticTokensWrapper(), opacities: AllOpacitySemanticTokens = OUDSOpacitySemanticTokensWrapper(), colors: AllColorSemanticTokens = OUDSColorSemanticTokensWrapper(), - elevations: AllElevationSemanticTokens = OUDSElevationSemanticTokensWrapper()) { + elevations: AllElevationSemanticTokens = OUDSElevationSemanticTokensWrapper(), + fonts: AllFontSemanticTokens = OUDSFontSemanticTokensWrapper()) { self.borders = borders self.opacities = opacities self.colors = colors self.elevations = elevations + self.fonts = fonts customFontFamily = nil } @@ -70,16 +76,19 @@ open class OUDSTheme: @unchecked Sendable { /// - opacities: An object providing all the opacity semantic tokens, as `OpacitySemanticTokens` implementation /// - colors: An object providing all the color semantic tokens, as `AllColorSemanticTokens` implementation /// - elevations: An object providing all the elevation semantic tokens, by default `AllElevationSemanticTokens` + /// - fonts: An object providing all the font semantic tokens, by default `AllFontemanticTokens` /// - customFontFamily: Set `nil` if system font to use, otherwise use the `FontFamilySemanticToken` you want to apply public init(borders: AllBorderSemanticTokens, opacities: AllOpacitySemanticTokens, colors: AllColorSemanticTokens, elevations: AllElevationSemanticTokens, + fonts: AllFontSemanticTokens, customFontFamily: FontFamilySemanticToken?) { self.borders = borders self.opacities = opacities self.colors = colors self.elevations = elevations + self.fonts = fonts self.customFontFamily = customFontFamily } diff --git a/OUDS/Core/OUDS/Tests/OUDSTheme/MockThemes/MockTheme+BorderSemanticTokens.swift b/OUDS/Core/OUDS/Tests/OUDSTheme/MockThemes/MockTheme+AllBorderSemanticTokens.swift similarity index 100% rename from OUDS/Core/OUDS/Tests/OUDSTheme/MockThemes/MockTheme+BorderSemanticTokens.swift rename to OUDS/Core/OUDS/Tests/OUDSTheme/MockThemes/MockTheme+AllBorderSemanticTokens.swift diff --git a/OUDS/Core/OUDS/Tests/OUDSTheme/MockThemes/MockTheme+ColorSemanticTokens.swift b/OUDS/Core/OUDS/Tests/OUDSTheme/MockThemes/MockTheme+AllColorSemanticTokens.swift similarity index 100% rename from OUDS/Core/OUDS/Tests/OUDSTheme/MockThemes/MockTheme+ColorSemanticTokens.swift rename to OUDS/Core/OUDS/Tests/OUDSTheme/MockThemes/MockTheme+AllColorSemanticTokens.swift diff --git a/OUDS/Core/OUDS/Tests/OUDSTheme/MockThemes/MockTheme+ElevationCompositeSemanticTokens.swift b/OUDS/Core/OUDS/Tests/OUDSTheme/MockThemes/MockTheme+AllElevationSemanticTokens.swift similarity index 100% rename from OUDS/Core/OUDS/Tests/OUDSTheme/MockThemes/MockTheme+ElevationCompositeSemanticTokens.swift rename to OUDS/Core/OUDS/Tests/OUDSTheme/MockThemes/MockTheme+AllElevationSemanticTokens.swift diff --git a/OUDS/Core/OUDS/Tests/OUDSTheme/MockThemes/MockTheme+AllFontSemanticTokens.swift b/OUDS/Core/OUDS/Tests/OUDSTheme/MockThemes/MockTheme+AllFontSemanticTokens.swift new file mode 100644 index 0000000000..75af34eab1 --- /dev/null +++ b/OUDS/Core/OUDS/Tests/OUDSTheme/MockThemes/MockTheme+AllFontSemanticTokens.swift @@ -0,0 +1,222 @@ +// +// Software Name: OUDS iOS +// SPDX-FileCopyrightText: Copyright (c) Orange SA +// SPDX-License-Identifier: MIT +// +// This software is distributed under the MIT license, +// the text of which is available at https://opensource.org/license/MIT/ +// or see the "LICENSE" file for more details. +// +// Authors: See CONTRIBUTORS.txt +// Software description: A SwiftUI components library with code examples for Orange Unified Design System +// + +import OUDSTokensRaw +import OUDSTokensSemantic + +// swiftlint:disable line_length +// swiftlint:disable required_deinit + +/// Overrides **all** the font semantic tokens, both simple, multiple and composites (from its super class, i.e. `OUDSFontSemanticTokensWrapper` so as to test overriding of them (unit tests) +/// and to act like smoke tests with crashing tests if some tokens disappeared. +final class MockThemeFontSemanticTokensWrapper: OUDSFontSemanticTokensWrapper { + + // MARK: Semantic tokens - Not composites + + static let mockThemeFontFamilyRawToken: FontFamilyRawToken = "o°xXSkyBl0GF0ntxXx°o" + static let mockThemeFontWeightRawToken: FontWeightRawToken = 888 + static let mockThemeFontSizeRawToken: FontSizeRawToken = 666 + static let mockThemeFontLineHeightRawToken: FontLineHeightRawToken = 321 + static let mockThemeFontLetterSpacingRawToken: FontLetterSpacingRawToken = 21_092_024 + static let mockThemeMultipleFontSizeTokens = MultipleFontSizeSemanticTokens(mockThemeFontSizeRawToken) + static let mockThemeMultipleFontLineHeightTokens = MultipleFontLineHeightSemanticTokens(mockThemeFontLineHeightRawToken) + static let mockThemeMultipleFontLetterSpacingTokens = MultipleFontLetterSpacingSemanticTokens(mockThemeFontLetterSpacingRawToken) + + // MARK: Semantic token - Typography - Font - Family + + override public var fontFamily: FontFamilySemanticToken { Self.mockThemeFontFamilyRawToken } + + // MARK: Semantic token - Typography - Font - Weight + + override public var fontWeightDefault: FontWeightSemanticToken { Self.mockThemeFontWeightRawToken } + override public var fontWeightCode: FontWeightSemanticToken { Self.mockThemeFontWeightRawToken } + override public var fontWeightStrong: FontWeightSemanticToken { Self.mockThemeFontWeightRawToken } + override public var fontWeightDisplay: FontWeightSemanticToken { Self.mockThemeFontWeightRawToken } + override public var fontWeightHeading: FontWeightSemanticToken { Self.mockThemeFontWeightRawToken } + override public var fontWeightBodyDefault: FontWeightSemanticToken { Self.mockThemeFontWeightRawToken } + override public var fontWeightBodyStrong: FontWeightSemanticToken { Self.mockThemeFontWeightRawToken } + override public var fontWeightLabelDefault: FontWeightSemanticToken { Self.mockThemeFontWeightRawToken } + override public var fontWeightLabelStrong: FontWeightSemanticToken { Self.mockThemeFontWeightRawToken } + + // MARK: - Semantic token - Typography - Multiples + + // MARK: Semantic token - Typography - Font - Size + + override public var fontSizeDisplayLarge: MultipleFontSizeSemanticTokens { Self.mockThemeMultipleFontSizeTokens } + override public var fontSizeDisplayMedium: MultipleFontSizeSemanticTokens { Self.mockThemeMultipleFontSizeTokens } + override public var fontSizeDisplaySmall: MultipleFontSizeSemanticTokens { Self.mockThemeMultipleFontSizeTokens } + override public var fontSizeHeadingXlarge: MultipleFontSizeSemanticTokens { Self.mockThemeMultipleFontSizeTokens } + override public var fontSizeHeadingLarge: MultipleFontSizeSemanticTokens { Self.mockThemeMultipleFontSizeTokens } + override public var fontSizeHeadingMedium: MultipleFontSizeSemanticTokens { Self.mockThemeMultipleFontSizeTokens } + override public var fontSizeHeadingSmall: MultipleFontSizeSemanticTokens { Self.mockThemeMultipleFontSizeTokens } + override public var fontSizeBodyLarge: MultipleFontSizeSemanticTokens { Self.mockThemeMultipleFontSizeTokens } + override public var fontSizeBodyMedium: MultipleFontSizeSemanticTokens { Self.mockThemeMultipleFontSizeTokens } + override public var fontSizeBodySmall: MultipleFontSizeSemanticTokens { Self.mockThemeMultipleFontSizeTokens } + override public var fontSizeLabelXlarge: FontSizeSemanticToken { Self.mockThemeFontSizeRawToken } + override public var fontSizeLabelLarge: FontSizeSemanticToken { Self.mockThemeFontSizeRawToken } + override public var fontSizeLabelMedium: FontSizeSemanticToken { Self.mockThemeFontSizeRawToken } + override public var fontSizeLabelSmall: FontSizeSemanticToken { Self.mockThemeFontSizeRawToken } + override public var fontSizeCodeMedium: FontSizeSemanticToken { Self.mockThemeFontSizeRawToken } + + // MARK: - Semantic token - Typography - Font - Line height + + override public var fontLineHeightDisplayLarge: MultipleFontLineHeightSemanticTokens { Self.mockThemeMultipleFontLineHeightTokens } + override public var fontLineHeightDisplayMedium: MultipleFontLineHeightSemanticTokens { Self.mockThemeMultipleFontLineHeightTokens } + override public var fontLineHeightDisplaySmall: MultipleFontLineHeightSemanticTokens { Self.mockThemeMultipleFontLineHeightTokens } + override public var fontLineHeightHeadingXlarge: MultipleFontLineHeightSemanticTokens { Self.mockThemeMultipleFontLineHeightTokens } + override public var fontLineHeightHeadingLarge: MultipleFontLineHeightSemanticTokens { Self.mockThemeMultipleFontLineHeightTokens } + override public var fontLineHeightHeadingMedium: MultipleFontLineHeightSemanticTokens { Self.mockThemeMultipleFontLineHeightTokens } + override public var fontLineHeightHeadingSmall: MultipleFontLineHeightSemanticTokens { Self.mockThemeMultipleFontLineHeightTokens } + override public var fontLineHeightBodyLarge: MultipleFontLineHeightSemanticTokens { Self.mockThemeMultipleFontLineHeightTokens } + override public var fontLineHeightBodyMedium: MultipleFontLineHeightSemanticTokens { Self.mockThemeMultipleFontLineHeightTokens } + override public var fontLineHeightBodySmall: MultipleFontLineHeightSemanticTokens { Self.mockThemeMultipleFontLineHeightTokens } + override public var fontLineHeightLabelXlarge: FontLineHeightSemanticToken { Self.mockThemeFontLineHeightRawToken } + override public var fontLineHeightLabelLarge: FontLineHeightSemanticToken { Self.mockThemeFontLineHeightRawToken } + override public var fontLineHeightLabelMedium: FontLineHeightSemanticToken { Self.mockThemeFontLineHeightRawToken } + override public var fontLineHeightLabelSmall: FontLineHeightSemanticToken { Self.mockThemeFontLineHeightRawToken } + override public var fontLineHeightCodeMedium: FontLineHeightSemanticToken { Self.mockThemeFontLineHeightRawToken } + + // MARK: - Semantic token - Typography - Font - Letter spacing + + override public var fontLetterSpacingDisplayLarge: MultipleFontLetterSpacingSemanticTokens { Self.mockThemeMultipleFontLetterSpacingTokens } + override public var fontLetterSpacingDisplayMedium: MultipleFontLetterSpacingSemanticTokens { Self.mockThemeMultipleFontLetterSpacingTokens } + override public var fontLetterSpacingDisplaySmall: MultipleFontLetterSpacingSemanticTokens { Self.mockThemeMultipleFontLetterSpacingTokens } + override public var fontLetterSpacingHeadingXlarge: MultipleFontLetterSpacingSemanticTokens { Self.mockThemeMultipleFontLetterSpacingTokens } + override public var fontLetterSpacingHeadingLarge: MultipleFontLetterSpacingSemanticTokens { Self.mockThemeMultipleFontLetterSpacingTokens } + override public var fontLetterSpacingHeadingMedium: MultipleFontLetterSpacingSemanticTokens { Self.mockThemeMultipleFontLetterSpacingTokens } + override public var fontLetterSpacingHeadingSmall: MultipleFontLetterSpacingSemanticTokens { Self.mockThemeMultipleFontLetterSpacingTokens } + override public var fontLetterSpacingBodyLarge: MultipleFontLetterSpacingSemanticTokens { Self.mockThemeMultipleFontLetterSpacingTokens } + override public var fontLetterSpacingBodyMedium: MultipleFontLetterSpacingSemanticTokens { Self.mockThemeMultipleFontLetterSpacingTokens } + override public var fontLetterSpacingBodySmall: MultipleFontLetterSpacingSemanticTokens { Self.mockThemeMultipleFontLetterSpacingTokens } + override public var fontLetterSpacingLabelXlarge: FontLetterSpacingSemanticToken { Self.mockThemeFontLetterSpacingRawToken } + override public var fontLetterSpacingLabelLarge: FontLetterSpacingSemanticToken { Self.mockThemeFontLetterSpacingRawToken } + override public var fontLetterSpacingLabelMedium: FontLetterSpacingSemanticToken { Self.mockThemeFontLetterSpacingRawToken } + override public var fontLetterSpacingLabelSmall: FontLetterSpacingSemanticToken { Self.mockThemeFontLetterSpacingRawToken } + override public var fontLetterSpacingCodeMedium: FontLetterSpacingSemanticToken { Self.mockThemeFontLetterSpacingRawToken } + + // MARK: - Semantic token - Typography - Pure semantic + + // MARK: Semantic token - Typography - Font - Size + + override public var fontSizeDisplayLargeMobile: FontSizeRawToken { Self.mockThemeFontSizeRawToken } + override public var fontSizeDisplayLargeTablet: FontSizeRawToken { Self.mockThemeFontSizeRawToken } + override public var fontSizeDisplayMediumMobile: FontSizeRawToken { Self.mockThemeFontSizeRawToken } + override public var fontSizeDisplayMediumTablet: FontSizeRawToken { Self.mockThemeFontSizeRawToken } + override public var fontSizeDisplaySmallMobile: FontSizeRawToken { Self.mockThemeFontSizeRawToken } + override public var fontSizeDisplaySmallTablet: FontSizeRawToken { Self.mockThemeFontSizeRawToken } + override public var fontSizeHeadingXlargeMobile: FontSizeRawToken { Self.mockThemeFontSizeRawToken } + override public var fontSizeHeadingXlargeTablet: FontSizeRawToken { Self.mockThemeFontSizeRawToken } + override public var fontSizeHeadingLargeMobile: FontSizeRawToken { Self.mockThemeFontSizeRawToken } + override public var fontSizeHeadingLargeTablet: FontSizeRawToken { Self.mockThemeFontSizeRawToken } + override public var fontSizeHeadingMediumMobile: FontSizeRawToken { Self.mockThemeFontSizeRawToken } + override public var fontSizeHeadingMediumTablet: FontSizeRawToken { Self.mockThemeFontSizeRawToken } + override public var fontSizeHeadingSmallMobile: FontSizeRawToken { Self.mockThemeFontSizeRawToken } + override public var fontSizeHeadingSmallTablet: FontSizeRawToken { Self.mockThemeFontSizeRawToken } + override public var fontSizeBodyLargeMobile: FontSizeRawToken { Self.mockThemeFontSizeRawToken } + override public var fontSizeBodyLargeTablet: FontSizeRawToken { Self.mockThemeFontSizeRawToken } + override public var fontSizeBodyMediumMobile: FontSizeRawToken { Self.mockThemeFontSizeRawToken } + override public var fontSizeBodyMediumTablet: FontSizeRawToken { Self.mockThemeFontSizeRawToken } + override public var fontSizeBodySmallMobile: FontSizeRawToken { Self.mockThemeFontSizeRawToken } + override public var fontSizeBodySmallTablet: FontSizeRawToken { Self.mockThemeFontSizeRawToken } + + // MARK: - Semantic token - Typography - Font - Line height + + override public var fontLineHeightDisplayLargeMobile: FontLineHeightRawToken { Self.mockThemeFontLineHeightRawToken } + override public var fontLineHeightDisplayLargeTablet: FontLineHeightRawToken { Self.mockThemeFontLineHeightRawToken } + override public var fontLineHeightDisplayMediumMobile: FontLineHeightRawToken { Self.mockThemeFontLineHeightRawToken } + override public var fontLineHeightDisplayMediumTablet: FontLineHeightRawToken { Self.mockThemeFontLineHeightRawToken } + override public var fontLineHeightDisplaySmallMobile: FontLineHeightRawToken { Self.mockThemeFontLineHeightRawToken } + override public var fontLineHeightDisplaySmallTablet: FontLineHeightRawToken { Self.mockThemeFontLineHeightRawToken } + override public var fontLineHeightHeadingXlargeMobile: FontLineHeightRawToken { Self.mockThemeFontLineHeightRawToken } + override public var fontLineHeightHeadingXlargeTablet: FontLineHeightRawToken { Self.mockThemeFontLineHeightRawToken } + override public var fontLineHeightHeadingLargeMobile: FontLineHeightRawToken { Self.mockThemeFontLineHeightRawToken } + override public var fontLineHeightHeadingLargeTablet: FontLineHeightRawToken { Self.mockThemeFontLineHeightRawToken } + override public var fontLineHeightHeadingMediumMobile: FontLineHeightRawToken { Self.mockThemeFontLineHeightRawToken } + override public var fontLineHeightHeadingMediumTablet: FontLineHeightRawToken { Self.mockThemeFontLineHeightRawToken } + override public var fontLineHeightHeadingSmallMobile: FontLineHeightRawToken { Self.mockThemeFontLineHeightRawToken } + override public var fontLineHeightHeadingSmallTablet: FontLineHeightRawToken { Self.mockThemeFontLineHeightRawToken } + override public var fontLineHeightBodyLargeMobile: FontLineHeightRawToken { Self.mockThemeFontLineHeightRawToken } + override public var fontLineHeightBodyLargeTablet: FontLineHeightRawToken { Self.mockThemeFontLineHeightRawToken } + override public var fontLineHeightBodyMediumMobile: FontLineHeightRawToken { Self.mockThemeFontLineHeightRawToken } + override public var fontLineHeightBodyMediumTablet: FontLineHeightRawToken { Self.mockThemeFontLineHeightRawToken } + override public var fontLineHeightBodySmallMobile: FontLineHeightRawToken { Self.mockThemeFontLineHeightRawToken } + override public var fontLineHeightBodySmallTablet: FontLineHeightRawToken { Self.mockThemeFontLineHeightRawToken } + + // MARK: - Semantic token - Typography - Font - Letter spacing + + override public var fontLetterSpacingDisplayLargeMobile: FontLetterSpacingSemanticToken { Self.mockThemeFontLetterSpacingRawToken } + override public var fontLetterSpacingDisplayLargeTablet: FontLetterSpacingSemanticToken { Self.mockThemeFontLetterSpacingRawToken } + override public var fontLetterSpacingDisplayMediumMobile: FontLetterSpacingSemanticToken { Self.mockThemeFontLetterSpacingRawToken } + override public var fontLetterSpacingDisplayMediumTablet: FontLetterSpacingSemanticToken { Self.mockThemeFontLetterSpacingRawToken } + override public var fontLetterSpacingDisplaySmallMobile: FontLetterSpacingSemanticToken { Self.mockThemeFontLetterSpacingRawToken } + override public var fontLetterSpacingDisplaySmallTablet: FontLetterSpacingSemanticToken { Self.mockThemeFontLetterSpacingRawToken } + override public var fontLetterSpacingHeadingXlargeMobile: FontLetterSpacingSemanticToken { Self.mockThemeFontLetterSpacingRawToken } + override public var fontLetterSpacingHeadingXlargeTablet: FontLetterSpacingSemanticToken { Self.mockThemeFontLetterSpacingRawToken } + override public var fontLetterSpacingHeadingLargeMobile: FontLetterSpacingSemanticToken { Self.mockThemeFontLetterSpacingRawToken } + override public var fontLetterSpacingHeadingLargeTablet: FontLetterSpacingSemanticToken { Self.mockThemeFontLetterSpacingRawToken } + override public var fontLetterSpacingHeadingMediumMobile: FontLetterSpacingSemanticToken { Self.mockThemeFontLetterSpacingRawToken } + override public var fontLetterSpacingHeadingMediumTablet: FontLetterSpacingSemanticToken { Self.mockThemeFontLetterSpacingRawToken } + override public var fontLetterSpacingHeadingSmallMobile: FontLetterSpacingSemanticToken { Self.mockThemeFontLetterSpacingRawToken } + override public var fontLetterSpacingHeadingSmallTablet: FontLetterSpacingSemanticToken { Self.mockThemeFontLetterSpacingRawToken } + override public var fontLetterSpacingBodyLargeMobile: FontLetterSpacingSemanticToken { Self.mockThemeFontLetterSpacingRawToken } + override public var fontLetterSpacingBodyLargeTablet: FontLetterSpacingSemanticToken { Self.mockThemeFontLetterSpacingRawToken } + override public var fontLetterSpacingBodyMediumMobile: FontLetterSpacingSemanticToken { Self.mockThemeFontLetterSpacingRawToken } + override public var fontLetterSpacingBodyMediumTablet: FontLetterSpacingSemanticToken { Self.mockThemeFontLetterSpacingRawToken } + override public var fontLetterSpacingBodySmallMobile: FontLetterSpacingSemanticToken { Self.mockThemeFontLetterSpacingRawToken } + override public var fontLetterSpacingBodySmallTablet: FontLetterSpacingSemanticToken { Self.mockThemeFontLetterSpacingRawToken } + + // MARK: Semantic tokens - Composites + + static let mockThemeMultipleFontCompositeRawTokens = MultipleFontCompositeRawTokens(FontRawTokens.typeBold1850) + + // MARK: - Semantic tokens - Typography - Composites - Display + + override public var typeDisplayLarge: MultipleFontCompositeRawTokens { Self.mockThemeMultipleFontCompositeRawTokens } + override public var typeDisplayMedium: MultipleFontCompositeRawTokens { Self.mockThemeMultipleFontCompositeRawTokens } + override public var typeDisplaySmall: MultipleFontCompositeRawTokens { Self.mockThemeMultipleFontCompositeRawTokens } + + // MARK: - Semantic tokens - Typography - Composites - Heading + + override public var typeHeadingXLarge: MultipleFontCompositeRawTokens { Self.mockThemeMultipleFontCompositeRawTokens } + override public var typeHeadingLarge: MultipleFontCompositeRawTokens { Self.mockThemeMultipleFontCompositeRawTokens } + override public var typeHeadingMedium: MultipleFontCompositeRawTokens { Self.mockThemeMultipleFontCompositeRawTokens } + override public var typeHeadingSmall: MultipleFontCompositeRawTokens { Self.mockThemeMultipleFontCompositeRawTokens } + + // MARK: - Semantic tokens - Typography - Composites - Body + + override public var typeBodyDefaultLarge: MultipleFontCompositeRawTokens { Self.mockThemeMultipleFontCompositeRawTokens } + override public var typeBodyDefaultMedium: MultipleFontCompositeRawTokens { Self.mockThemeMultipleFontCompositeRawTokens } + override public var typeBodyDefaultSmall: MultipleFontCompositeRawTokens { Self.mockThemeMultipleFontCompositeRawTokens } + override public var typeBodyStrongLarge: MultipleFontCompositeRawTokens { Self.mockThemeMultipleFontCompositeRawTokens } + override public var typeBodyStrongMedium: MultipleFontCompositeRawTokens { Self.mockThemeMultipleFontCompositeRawTokens } + override public var typeBodyStrongSmall: MultipleFontCompositeRawTokens { Self.mockThemeMultipleFontCompositeRawTokens } + + // MARK: - Semantic tokens - Typography - Composites - Label + + override public var typeLabelDefaultXLarge: MultipleFontCompositeRawTokens { Self.mockThemeMultipleFontCompositeRawTokens } + override public var typeLabelDefaultLarge: MultipleFontCompositeRawTokens { Self.mockThemeMultipleFontCompositeRawTokens } + override public var typeLabelDefaultMedium: MultipleFontCompositeRawTokens { Self.mockThemeMultipleFontCompositeRawTokens } + override public var typeLabelDefaultSmall: MultipleFontCompositeRawTokens { Self.mockThemeMultipleFontCompositeRawTokens } + override public var typeLabelStrongXLarge: MultipleFontCompositeRawTokens { Self.mockThemeMultipleFontCompositeRawTokens } + override public var typeLabelStrongLarge: MultipleFontCompositeRawTokens { Self.mockThemeMultipleFontCompositeRawTokens } + override public var typeLabelStrongMedium: MultipleFontCompositeRawTokens { Self.mockThemeMultipleFontCompositeRawTokens } + override public var typeLabelStrongSmall: MultipleFontCompositeRawTokens { Self.mockThemeMultipleFontCompositeRawTokens } + + // MARK: - Semantic tokens - Typography - Composites - Code + + override public var typeCodeMedium: MultipleFontCompositeRawTokens { Self.mockThemeMultipleFontCompositeRawTokens } + override public var typeCodeSmall: MultipleFontCompositeRawTokens { Self.mockThemeMultipleFontCompositeRawTokens } +} + +// swiftlint:enable line_length +// swiftlint:enable required_deinit diff --git a/OUDS/Core/OUDS/Tests/OUDSTheme/MockThemes/MockTheme+FontCompositeSemanticTokens.swift b/OUDS/Core/OUDS/Tests/OUDSTheme/MockThemes/MockTheme+FontCompositeSemanticTokens.swift deleted file mode 100644 index 82d4087a07..0000000000 --- a/OUDS/Core/OUDS/Tests/OUDSTheme/MockThemes/MockTheme+FontCompositeSemanticTokens.swift +++ /dev/null @@ -1,60 +0,0 @@ -// -// Software Name: OUDS iOS -// SPDX-FileCopyrightText: Copyright (c) Orange SA -// SPDX-License-Identifier: MIT -// -// This software is distributed under the MIT license, -// the text of which is available at https://opensource.org/license/MIT/ -// or see the "LICENSE" file for more details. -// -// Authors: See CONTRIBUTORS.txt -// Software description: A SwiftUI components library with code examples for Orange Unified Design System -// - -import OUDSTokensRaw -import OUDSTokensSemantic - -/// Overrides **all** the font composite semantic tokens (from its super class, i.e. `OUDSTheme` so as to test overriding of them (unit tests) -/// and to act like smoke tests with crashing tests if some tokens disappeared. -extension MockTheme { - - static let mockThemeMultipleFontCompositeRawTokens = MultipleFontCompositeRawTokens(FontRawTokens.typeBold1850) - - // MARK: - Semantic tokens - Typography - Composites - Display - - override open var typeDisplayLarge: MultipleFontCompositeRawTokens { Self.mockThemeMultipleFontCompositeRawTokens } - override open var typeDisplayMedium: MultipleFontCompositeRawTokens { Self.mockThemeMultipleFontCompositeRawTokens } - override open var typeDisplaySmall: MultipleFontCompositeRawTokens { Self.mockThemeMultipleFontCompositeRawTokens } - - // MARK: - Semantic tokens - Typography - Composites - Heading - - override open var typeHeadingXLarge: MultipleFontCompositeRawTokens { Self.mockThemeMultipleFontCompositeRawTokens } - override open var typeHeadingLarge: MultipleFontCompositeRawTokens { Self.mockThemeMultipleFontCompositeRawTokens } - override open var typeHeadingMedium: MultipleFontCompositeRawTokens { Self.mockThemeMultipleFontCompositeRawTokens } - override open var typeHeadingSmall: MultipleFontCompositeRawTokens { Self.mockThemeMultipleFontCompositeRawTokens } - - // MARK: - Semantic tokens - Typography - Composites - Body - - override open var typeBodyDefaultLarge: MultipleFontCompositeRawTokens { Self.mockThemeMultipleFontCompositeRawTokens } - override open var typeBodyDefaultMedium: MultipleFontCompositeRawTokens { Self.mockThemeMultipleFontCompositeRawTokens } - override open var typeBodyDefaultSmall: MultipleFontCompositeRawTokens { Self.mockThemeMultipleFontCompositeRawTokens } - override open var typeBodyStrongLarge: MultipleFontCompositeRawTokens { Self.mockThemeMultipleFontCompositeRawTokens } - override open var typeBodyStrongMedium: MultipleFontCompositeRawTokens { Self.mockThemeMultipleFontCompositeRawTokens } - override open var typeBodyStrongSmall: MultipleFontCompositeRawTokens { Self.mockThemeMultipleFontCompositeRawTokens } - - // MARK: - Semantic tokens - Typography - Composites - Label - - override open var typeLabelDefaultXLarge: MultipleFontCompositeRawTokens { Self.mockThemeMultipleFontCompositeRawTokens } - override open var typeLabelDefaultLarge: MultipleFontCompositeRawTokens { Self.mockThemeMultipleFontCompositeRawTokens } - override open var typeLabelDefaultMedium: MultipleFontCompositeRawTokens { Self.mockThemeMultipleFontCompositeRawTokens } - override open var typeLabelDefaultSmall: MultipleFontCompositeRawTokens { Self.mockThemeMultipleFontCompositeRawTokens } - override open var typeLabelStrongXLarge: MultipleFontCompositeRawTokens { Self.mockThemeMultipleFontCompositeRawTokens } - override open var typeLabelStrongLarge: MultipleFontCompositeRawTokens { Self.mockThemeMultipleFontCompositeRawTokens } - override open var typeLabelStrongMedium: MultipleFontCompositeRawTokens { Self.mockThemeMultipleFontCompositeRawTokens } - override open var typeLabelStrongSmall: MultipleFontCompositeRawTokens { Self.mockThemeMultipleFontCompositeRawTokens } - - // MARK: - Semantic tokens - Typography - Composites - Code - - override open var typeCodeMedium: MultipleFontCompositeRawTokens { Self.mockThemeMultipleFontCompositeRawTokens } - override open var typeCodeSmall: MultipleFontCompositeRawTokens { Self.mockThemeMultipleFontCompositeRawTokens } -} diff --git a/OUDS/Core/OUDS/Tests/OUDSTheme/MockThemes/MockTheme+FontSemanticTokens.swift b/OUDS/Core/OUDS/Tests/OUDSTheme/MockThemes/MockTheme+FontSemanticTokens.swift deleted file mode 100644 index 753db658f1..0000000000 --- a/OUDS/Core/OUDS/Tests/OUDSTheme/MockThemes/MockTheme+FontSemanticTokens.swift +++ /dev/null @@ -1,172 +0,0 @@ -// -// Software Name: OUDS iOS -// SPDX-FileCopyrightText: Copyright (c) Orange SA -// SPDX-License-Identifier: MIT -// -// This software is distributed under the MIT license, -// the text of which is available at https://opensource.org/license/MIT/ -// or see the "LICENSE" file for more details. -// -// Authors: See CONTRIBUTORS.txt -// Software description: A SwiftUI components library with code examples for Orange Unified Design System -// - -import OUDSTokensRaw -import OUDSTokensSemantic - -/// Overrides **all** the font semantic tokens (from its super class, i.e. `OUDSTheme` so as to test overriding of them (unit tests) -/// and to act like smoke tests with crashing tests if some tokens disappeared. -extension MockTheme { - - static let mockThemeFontFamilyRawToken: FontFamilyRawToken = "o°xXSkyBl0GF0ntxXx°o" - static let mockThemeFontWeightRawToken: FontWeightRawToken = 888 - static let mockThemeFontSizeRawToken: FontSizeRawToken = 666 - static let mockThemeFontLineHeightRawToken: FontLineHeightRawToken = 321 - static let mockThemeFontLetterSpacingRawToken: FontLetterSpacingRawToken = 21_092_024 - static let mockThemeMultipleFontSizeTokens = MultipleFontSizeSemanticTokens(mockThemeFontSizeRawToken) - static let mockThemeMultipleFontLineHeightTokens = MultipleFontLineHeightSemanticTokens(mockThemeFontLineHeightRawToken) - static let mockThemeMultipleFontLetterSpacingTokens = MultipleFontLetterSpacingSemanticTokens(mockThemeFontLetterSpacingRawToken) - - // MARK: Semantic token - Typography - Font - Family - - override open var fontFamily: FontFamilySemanticToken { Self.mockThemeFontFamilyRawToken } - - // MARK: Semantic token - Typography - Font - Weight - - override open var fontWeightDefault: FontWeightSemanticToken { Self.mockThemeFontWeightRawToken } - override open var fontWeightCode: FontWeightSemanticToken { Self.mockThemeFontWeightRawToken } - override open var fontWeightStrong: FontWeightSemanticToken { Self.mockThemeFontWeightRawToken } - override open var fontWeightDisplay: FontWeightSemanticToken { Self.mockThemeFontWeightRawToken } - override open var fontWeightHeading: FontWeightSemanticToken { Self.mockThemeFontWeightRawToken } - override open var fontWeightBodyDefault: FontWeightSemanticToken { Self.mockThemeFontWeightRawToken } - override open var fontWeightBodyStrong: FontWeightSemanticToken { Self.mockThemeFontWeightRawToken } - override open var fontWeightLabelDefault: FontWeightSemanticToken { Self.mockThemeFontWeightRawToken } - override open var fontWeightLabelStrong: FontWeightSemanticToken { Self.mockThemeFontWeightRawToken } - - // MARK: - Semantic token - Typography - Multiples - - // MARK: Semantic token - Typography - Font - Size - - override open var fontSizeDisplayLarge: MultipleFontSizeSemanticTokens { Self.mockThemeMultipleFontSizeTokens } - override open var fontSizeDisplayMedium: MultipleFontSizeSemanticTokens { Self.mockThemeMultipleFontSizeTokens } - override open var fontSizeDisplaySmall: MultipleFontSizeSemanticTokens { Self.mockThemeMultipleFontSizeTokens } - override open var fontSizeHeadingXlarge: MultipleFontSizeSemanticTokens { Self.mockThemeMultipleFontSizeTokens } - override open var fontSizeHeadingLarge: MultipleFontSizeSemanticTokens { Self.mockThemeMultipleFontSizeTokens } - override open var fontSizeHeadingMedium: MultipleFontSizeSemanticTokens { Self.mockThemeMultipleFontSizeTokens } - override open var fontSizeHeadingSmall: MultipleFontSizeSemanticTokens { Self.mockThemeMultipleFontSizeTokens } - override open var fontSizeBodyLarge: MultipleFontSizeSemanticTokens { Self.mockThemeMultipleFontSizeTokens } - override open var fontSizeBodyMedium: MultipleFontSizeSemanticTokens { Self.mockThemeMultipleFontSizeTokens } - override open var fontSizeBodySmall: MultipleFontSizeSemanticTokens { Self.mockThemeMultipleFontSizeTokens } - override open var fontSizeLabelXlarge: FontSizeSemanticToken { Self.mockThemeFontSizeRawToken } - override open var fontSizeLabelLarge: FontSizeSemanticToken { Self.mockThemeFontSizeRawToken } - override open var fontSizeLabelMedium: FontSizeSemanticToken { Self.mockThemeFontSizeRawToken } - override open var fontSizeLabelSmall: FontSizeSemanticToken { Self.mockThemeFontSizeRawToken } - override open var fontSizeCodeMedium: FontSizeSemanticToken { Self.mockThemeFontSizeRawToken } - - // MARK: - Semantic token - Typography - Font - Line height - - override open var fontLineHeightDisplayLarge: MultipleFontLineHeightSemanticTokens { Self.mockThemeMultipleFontLineHeightTokens } - override open var fontLineHeightDisplayMedium: MultipleFontLineHeightSemanticTokens { Self.mockThemeMultipleFontLineHeightTokens } - override open var fontLineHeightDisplaySmall: MultipleFontLineHeightSemanticTokens { Self.mockThemeMultipleFontLineHeightTokens } - override open var fontLineHeightHeadingXlarge: MultipleFontLineHeightSemanticTokens { Self.mockThemeMultipleFontLineHeightTokens } - override open var fontLineHeightHeadingLarge: MultipleFontLineHeightSemanticTokens { Self.mockThemeMultipleFontLineHeightTokens } - override open var fontLineHeightHeadingMedium: MultipleFontLineHeightSemanticTokens { Self.mockThemeMultipleFontLineHeightTokens } - override open var fontLineHeightHeadingSmall: MultipleFontLineHeightSemanticTokens { Self.mockThemeMultipleFontLineHeightTokens } - override open var fontLineHeightBodyLarge: MultipleFontLineHeightSemanticTokens { Self.mockThemeMultipleFontLineHeightTokens } - override open var fontLineHeightBodyMedium: MultipleFontLineHeightSemanticTokens { Self.mockThemeMultipleFontLineHeightTokens } - override open var fontLineHeightBodySmall: MultipleFontLineHeightSemanticTokens { Self.mockThemeMultipleFontLineHeightTokens } - override open var fontLineHeightLabelXlarge: FontLineHeightSemanticToken { Self.mockThemeFontLineHeightRawToken } - override open var fontLineHeightLabelLarge: FontLineHeightSemanticToken { Self.mockThemeFontLineHeightRawToken } - override open var fontLineHeightLabelMedium: FontLineHeightSemanticToken { Self.mockThemeFontLineHeightRawToken } - override open var fontLineHeightLabelSmall: FontLineHeightSemanticToken { Self.mockThemeFontLineHeightRawToken } - override open var fontLineHeightCodeMedium: FontLineHeightSemanticToken { Self.mockThemeFontLineHeightRawToken } - - // MARK: - Semantic token - Typography - Font - Letter spacing - - override open var fontLetterSpacingDisplayLarge: MultipleFontLetterSpacingSemanticTokens { Self.mockThemeMultipleFontLetterSpacingTokens } - override open var fontLetterSpacingDisplayMedium: MultipleFontLetterSpacingSemanticTokens { Self.mockThemeMultipleFontLetterSpacingTokens } - override open var fontLetterSpacingDisplaySmall: MultipleFontLetterSpacingSemanticTokens { Self.mockThemeMultipleFontLetterSpacingTokens } - override open var fontLetterSpacingHeadingXlarge: MultipleFontLetterSpacingSemanticTokens { Self.mockThemeMultipleFontLetterSpacingTokens } - override open var fontLetterSpacingHeadingLarge: MultipleFontLetterSpacingSemanticTokens { Self.mockThemeMultipleFontLetterSpacingTokens } - override open var fontLetterSpacingHeadingMedium: MultipleFontLetterSpacingSemanticTokens { Self.mockThemeMultipleFontLetterSpacingTokens } - override open var fontLetterSpacingHeadingSmall: MultipleFontLetterSpacingSemanticTokens { Self.mockThemeMultipleFontLetterSpacingTokens } - override open var fontLetterSpacingBodyLarge: MultipleFontLetterSpacingSemanticTokens { Self.mockThemeMultipleFontLetterSpacingTokens } - override open var fontLetterSpacingBodyMedium: MultipleFontLetterSpacingSemanticTokens { Self.mockThemeMultipleFontLetterSpacingTokens } - override open var fontLetterSpacingBodySmall: MultipleFontLetterSpacingSemanticTokens { Self.mockThemeMultipleFontLetterSpacingTokens } - override open var fontLetterSpacingLabelXlarge: FontLetterSpacingSemanticToken { Self.mockThemeFontLetterSpacingRawToken } - override open var fontLetterSpacingLabelLarge: FontLetterSpacingSemanticToken { Self.mockThemeFontLetterSpacingRawToken } - override open var fontLetterSpacingLabelMedium: FontLetterSpacingSemanticToken { Self.mockThemeFontLetterSpacingRawToken } - override open var fontLetterSpacingLabelSmall: FontLetterSpacingSemanticToken { Self.mockThemeFontLetterSpacingRawToken } - override open var fontLetterSpacingCodeMedium: FontLetterSpacingSemanticToken { Self.mockThemeFontLetterSpacingRawToken } - - // MARK: - Semantic token - Typography - Pure semantic - - // MARK: Semantic token - Typography - Font - Size - - override open var fontSizeDisplayLargeMobile: FontSizeRawToken { Self.mockThemeFontSizeRawToken } - override open var fontSizeDisplayLargeTablet: FontSizeRawToken { Self.mockThemeFontSizeRawToken } - override open var fontSizeDisplayMediumMobile: FontSizeRawToken { Self.mockThemeFontSizeRawToken } - override open var fontSizeDisplayMediumTablet: FontSizeRawToken { Self.mockThemeFontSizeRawToken } - override open var fontSizeDisplaySmallMobile: FontSizeRawToken { Self.mockThemeFontSizeRawToken } - override open var fontSizeDisplaySmallTablet: FontSizeRawToken { Self.mockThemeFontSizeRawToken } - override open var fontSizeHeadingXlargeMobile: FontSizeRawToken { Self.mockThemeFontSizeRawToken } - override open var fontSizeHeadingXlargeTablet: FontSizeRawToken { Self.mockThemeFontSizeRawToken } - override open var fontSizeHeadingLargeMobile: FontSizeRawToken { Self.mockThemeFontSizeRawToken } - override open var fontSizeHeadingLargeTablet: FontSizeRawToken { Self.mockThemeFontSizeRawToken } - override open var fontSizeHeadingMediumMobile: FontSizeRawToken { Self.mockThemeFontSizeRawToken } - override open var fontSizeHeadingMediumTablet: FontSizeRawToken { Self.mockThemeFontSizeRawToken } - override open var fontSizeHeadingSmallMobile: FontSizeRawToken { Self.mockThemeFontSizeRawToken } - override open var fontSizeHeadingSmallTablet: FontSizeRawToken { Self.mockThemeFontSizeRawToken } - override open var fontSizeBodyLargeMobile: FontSizeRawToken { Self.mockThemeFontSizeRawToken } - override open var fontSizeBodyLargeTablet: FontSizeRawToken { Self.mockThemeFontSizeRawToken } - override open var fontSizeBodyMediumMobile: FontSizeRawToken { Self.mockThemeFontSizeRawToken } - override open var fontSizeBodyMediumTablet: FontSizeRawToken { Self.mockThemeFontSizeRawToken } - override open var fontSizeBodySmallMobile: FontSizeRawToken { Self.mockThemeFontSizeRawToken } - override open var fontSizeBodySmallTablet: FontSizeRawToken { Self.mockThemeFontSizeRawToken } - - // MARK: - Semantic token - Typography - Font - Line height - - override open var fontLineHeightDisplayLargeMobile: FontLineHeightRawToken { Self.mockThemeFontLineHeightRawToken } - override open var fontLineHeightDisplayLargeTablet: FontLineHeightRawToken { Self.mockThemeFontLineHeightRawToken } - override open var fontLineHeightDisplayMediumMobile: FontLineHeightRawToken { Self.mockThemeFontLineHeightRawToken } - override open var fontLineHeightDisplayMediumTablet: FontLineHeightRawToken { Self.mockThemeFontLineHeightRawToken } - override open var fontLineHeightDisplaySmallMobile: FontLineHeightRawToken { Self.mockThemeFontLineHeightRawToken } - override open var fontLineHeightDisplaySmallTablet: FontLineHeightRawToken { Self.mockThemeFontLineHeightRawToken } - override open var fontLineHeightHeadingXlargeMobile: FontLineHeightRawToken { Self.mockThemeFontLineHeightRawToken } - override open var fontLineHeightHeadingXlargeTablet: FontLineHeightRawToken { Self.mockThemeFontLineHeightRawToken } - override open var fontLineHeightHeadingLargeMobile: FontLineHeightRawToken { Self.mockThemeFontLineHeightRawToken } - override open var fontLineHeightHeadingLargeTablet: FontLineHeightRawToken { Self.mockThemeFontLineHeightRawToken } - override open var fontLineHeightHeadingMediumMobile: FontLineHeightRawToken { Self.mockThemeFontLineHeightRawToken } - override open var fontLineHeightHeadingMediumTablet: FontLineHeightRawToken { Self.mockThemeFontLineHeightRawToken } - override open var fontLineHeightHeadingSmallMobile: FontLineHeightRawToken { Self.mockThemeFontLineHeightRawToken } - override open var fontLineHeightHeadingSmallTablet: FontLineHeightRawToken { Self.mockThemeFontLineHeightRawToken } - override open var fontLineHeightBodyLargeMobile: FontLineHeightRawToken { Self.mockThemeFontLineHeightRawToken } - override open var fontLineHeightBodyLargeTablet: FontLineHeightRawToken { Self.mockThemeFontLineHeightRawToken } - override open var fontLineHeightBodyMediumMobile: FontLineHeightRawToken { Self.mockThemeFontLineHeightRawToken } - override open var fontLineHeightBodyMediumTablet: FontLineHeightRawToken { Self.mockThemeFontLineHeightRawToken } - override open var fontLineHeightBodySmallMobile: FontLineHeightRawToken { Self.mockThemeFontLineHeightRawToken } - override open var fontLineHeightBodySmallTablet: FontLineHeightRawToken { Self.mockThemeFontLineHeightRawToken } - - // MARK: - Semantic token - Typography - Font - Letter spacing - - override open var fontLetterSpacingDisplayLargeMobile: FontLetterSpacingSemanticToken { Self.mockThemeFontLetterSpacingRawToken } - override open var fontLetterSpacingDisplayLargeTablet: FontLetterSpacingSemanticToken { Self.mockThemeFontLetterSpacingRawToken } - override open var fontLetterSpacingDisplayMediumMobile: FontLetterSpacingSemanticToken { Self.mockThemeFontLetterSpacingRawToken } - override open var fontLetterSpacingDisplayMediumTablet: FontLetterSpacingSemanticToken { Self.mockThemeFontLetterSpacingRawToken } - override open var fontLetterSpacingDisplaySmallMobile: FontLetterSpacingSemanticToken { Self.mockThemeFontLetterSpacingRawToken } - override open var fontLetterSpacingDisplaySmallTablet: FontLetterSpacingSemanticToken { Self.mockThemeFontLetterSpacingRawToken } - override open var fontLetterSpacingHeadingXlargeMobile: FontLetterSpacingSemanticToken { Self.mockThemeFontLetterSpacingRawToken } - override open var fontLetterSpacingHeadingXlargeTablet: FontLetterSpacingSemanticToken { Self.mockThemeFontLetterSpacingRawToken } - override open var fontLetterSpacingHeadingLargeMobile: FontLetterSpacingSemanticToken { Self.mockThemeFontLetterSpacingRawToken } - override open var fontLetterSpacingHeadingLargeTablet: FontLetterSpacingSemanticToken { Self.mockThemeFontLetterSpacingRawToken } - override open var fontLetterSpacingHeadingMediumMobile: FontLetterSpacingSemanticToken { Self.mockThemeFontLetterSpacingRawToken } - override open var fontLetterSpacingHeadingMediumTablet: FontLetterSpacingSemanticToken { Self.mockThemeFontLetterSpacingRawToken } - override open var fontLetterSpacingHeadingSmallMobile: FontLetterSpacingSemanticToken { Self.mockThemeFontLetterSpacingRawToken } - override open var fontLetterSpacingHeadingSmallTablet: FontLetterSpacingSemanticToken { Self.mockThemeFontLetterSpacingRawToken } - override open var fontLetterSpacingBodyLargeMobile: FontLetterSpacingSemanticToken { Self.mockThemeFontLetterSpacingRawToken } - override open var fontLetterSpacingBodyLargeTablet: FontLetterSpacingSemanticToken { Self.mockThemeFontLetterSpacingRawToken } - override open var fontLetterSpacingBodyMediumMobile: FontLetterSpacingSemanticToken { Self.mockThemeFontLetterSpacingRawToken } - override open var fontLetterSpacingBodyMediumTablet: FontLetterSpacingSemanticToken { Self.mockThemeFontLetterSpacingRawToken } - override open var fontLetterSpacingBodySmallMobile: FontLetterSpacingSemanticToken { Self.mockThemeFontLetterSpacingRawToken } - override open var fontLetterSpacingBodySmallTablet: FontLetterSpacingSemanticToken { Self.mockThemeFontLetterSpacingRawToken } -} diff --git a/OUDS/Core/OUDS/Tests/OUDSTheme/MockThemes/MockTheme.swift b/OUDS/Core/OUDS/Tests/OUDSTheme/MockThemes/MockTheme.swift index df9fc65f98..f6c50335de 100644 --- a/OUDS/Core/OUDS/Tests/OUDSTheme/MockThemes/MockTheme.swift +++ b/OUDS/Core/OUDS/Tests/OUDSTheme/MockThemes/MockTheme.swift @@ -35,6 +35,7 @@ open class MockTheme: OUDSTheme, @unchecked Sendable { opacities: MockThemeOpacitySemanticTokensWrapper(), colors: colors, elevations: MockThemeElevationSemanticTokensWrapper(), + fonts: MockThemeFontSemanticTokensWrapper(), customFontFamily: nil) } @@ -43,6 +44,7 @@ open class MockTheme: OUDSTheme, @unchecked Sendable { opacities: MockThemeOpacitySemanticTokensWrapper(), colors: MockThemeColorSemanticTokensWrapper(), elevations: MockThemeElevationSemanticTokensWrapper(), + fonts: MockThemeFontSemanticTokensWrapper(), customFontFamily: customFont) } diff --git a/OUDS/Core/OUDS/Tests/OUDSTheme/TestThemeOverrideOfFontCompositeSemanticTokens.swift b/OUDS/Core/OUDS/Tests/OUDSTheme/TestThemeOverrideOfFontCompositeSemanticTokens.swift index aa62dab82e..b56614f00f 100644 --- a/OUDS/Core/OUDS/Tests/OUDSTheme/TestThemeOverrideOfFontCompositeSemanticTokens.swift +++ b/OUDS/Core/OUDS/Tests/OUDSTheme/TestThemeOverrideOfFontCompositeSemanticTokens.swift @@ -37,126 +37,126 @@ final class TestThemeOverrideOfFontCompositeSemanticTokens: XCTestCase { // MARK: - Semantic tokens - Typography - Composites - Display func testInheritedThemeCanOverrideSemanticTokenTypeDisplayLarge() throws { - XCTAssertNotEqual(inheritedTheme.typeDisplayLarge, abstractTheme.typeDisplayLarge) - XCTAssertTrue(inheritedTheme.typeDisplayLarge == MockTheme.mockThemeMultipleFontCompositeRawTokens) + XCTAssertNotEqual(inheritedTheme.fonts.typeDisplayLarge, abstractTheme.fonts.typeDisplayLarge) + XCTAssertTrue(inheritedTheme.fonts.typeDisplayLarge == MockThemeFontSemanticTokensWrapper.mockThemeMultipleFontCompositeRawTokens) } func testInheritedThemeCanOverrideSemanticTokenTypeDisplayMedium() throws { - XCTAssertNotEqual(inheritedTheme.typeDisplayMedium, abstractTheme.typeDisplayMedium) - XCTAssertTrue(inheritedTheme.typeDisplayMedium == MockTheme.mockThemeMultipleFontCompositeRawTokens) + XCTAssertNotEqual(inheritedTheme.fonts.typeDisplayMedium, abstractTheme.fonts.typeDisplayMedium) + XCTAssertTrue(inheritedTheme.fonts.typeDisplayMedium == MockThemeFontSemanticTokensWrapper.mockThemeMultipleFontCompositeRawTokens) } func testInheritedThemeCanOverrideSemanticTokenTypeDisplaySmal() throws { - XCTAssertNotEqual(inheritedTheme.typeDisplaySmall, abstractTheme.typeDisplaySmall) - XCTAssertTrue(inheritedTheme.typeDisplaySmall == MockTheme.mockThemeMultipleFontCompositeRawTokens) + XCTAssertNotEqual(inheritedTheme.fonts.typeDisplaySmall, abstractTheme.fonts.typeDisplaySmall) + XCTAssertTrue(inheritedTheme.fonts.typeDisplaySmall == MockThemeFontSemanticTokensWrapper.mockThemeMultipleFontCompositeRawTokens) } // MARK: - Semantic tokens - Typography - Composites - Heading func testInheritedThemeCanOverrideSemanticTokenTypeHeadingXLarge() throws { - XCTAssertNotEqual(inheritedTheme.typeHeadingXLarge, abstractTheme.typeHeadingXLarge) - XCTAssertTrue(inheritedTheme.typeHeadingXLarge == MockTheme.mockThemeMultipleFontCompositeRawTokens) + XCTAssertNotEqual(inheritedTheme.fonts.typeHeadingXLarge, abstractTheme.fonts.typeHeadingXLarge) + XCTAssertTrue(inheritedTheme.fonts.typeHeadingXLarge == MockThemeFontSemanticTokensWrapper.mockThemeMultipleFontCompositeRawTokens) } func testInheritedThemeCanOverrideSemanticTokenTypeHeadingLarge() throws { - XCTAssertNotEqual(inheritedTheme.typeHeadingLarge, abstractTheme.typeHeadingLarge) - XCTAssertTrue(inheritedTheme.typeHeadingLarge == MockTheme.mockThemeMultipleFontCompositeRawTokens) + XCTAssertNotEqual(inheritedTheme.fonts.typeHeadingLarge, abstractTheme.fonts.typeHeadingLarge) + XCTAssertTrue(inheritedTheme.fonts.typeHeadingLarge == MockThemeFontSemanticTokensWrapper.mockThemeMultipleFontCompositeRawTokens) } func testInheritedThemeCanOverrideSemanticTokenTypeHeadingMedium() throws { - XCTAssertNotEqual(inheritedTheme.typeHeadingMedium, abstractTheme.typeHeadingMedium) - XCTAssertTrue(inheritedTheme.typeHeadingMedium == MockTheme.mockThemeMultipleFontCompositeRawTokens) + XCTAssertNotEqual(inheritedTheme.fonts.typeHeadingMedium, abstractTheme.fonts.typeHeadingMedium) + XCTAssertTrue(inheritedTheme.fonts.typeHeadingMedium == MockThemeFontSemanticTokensWrapper.mockThemeMultipleFontCompositeRawTokens) } func testInheritedThemeCanOverrideSemanticTokenTypeHeadingSmall() throws { - XCTAssertNotEqual(inheritedTheme.typeHeadingSmall, abstractTheme.typeHeadingSmall) - XCTAssertTrue(inheritedTheme.typeHeadingSmall == MockTheme.mockThemeMultipleFontCompositeRawTokens) + XCTAssertNotEqual(inheritedTheme.fonts.typeHeadingSmall, abstractTheme.fonts.typeHeadingSmall) + XCTAssertTrue(inheritedTheme.fonts.typeHeadingSmall == MockThemeFontSemanticTokensWrapper.mockThemeMultipleFontCompositeRawTokens) } // MARK: - Semantic tokens - Typography - Composites - Body func testInheritedThemeCanOverrideSemanticTokenTypeDefaultLarge() throws { - XCTAssertNotEqual(inheritedTheme.typeBodyDefaultLarge, abstractTheme.typeBodyDefaultLarge) - XCTAssertTrue(inheritedTheme.typeBodyDefaultLarge == MockTheme.mockThemeMultipleFontCompositeRawTokens) + XCTAssertNotEqual(inheritedTheme.fonts.typeBodyDefaultLarge, abstractTheme.fonts.typeBodyDefaultLarge) + XCTAssertTrue(inheritedTheme.fonts.typeBodyDefaultLarge == MockThemeFontSemanticTokensWrapper.mockThemeMultipleFontCompositeRawTokens) } func testInheritedThemeCanOverrideSemanticTokenTypeDefaultMedium() throws { - XCTAssertNotEqual(inheritedTheme.typeBodyDefaultMedium, abstractTheme.typeBodyDefaultMedium) - XCTAssertTrue(inheritedTheme.typeBodyDefaultMedium == MockTheme.mockThemeMultipleFontCompositeRawTokens) + XCTAssertNotEqual(inheritedTheme.fonts.typeBodyDefaultMedium, abstractTheme.fonts.typeBodyDefaultMedium) + XCTAssertTrue(inheritedTheme.fonts.typeBodyDefaultMedium == MockThemeFontSemanticTokensWrapper.mockThemeMultipleFontCompositeRawTokens) } func testInheritedThemeCanOverrideSemanticTokenTypeDefaultSmall() throws { - XCTAssertNotEqual(inheritedTheme.typeBodyDefaultSmall, abstractTheme.typeBodyDefaultSmall) - XCTAssertTrue(inheritedTheme.typeBodyDefaultSmall == MockTheme.mockThemeMultipleFontCompositeRawTokens) + XCTAssertNotEqual(inheritedTheme.fonts.typeBodyDefaultSmall, abstractTheme.fonts.typeBodyDefaultSmall) + XCTAssertTrue(inheritedTheme.fonts.typeBodyDefaultSmall == MockThemeFontSemanticTokensWrapper.mockThemeMultipleFontCompositeRawTokens) } func testInheritedThemeCanOverrideSemanticTokenTypeStrongLarge() throws { - XCTAssertNotEqual(inheritedTheme.typeBodyStrongLarge, abstractTheme.typeBodyStrongLarge) - XCTAssertTrue(inheritedTheme.typeBodyStrongLarge == MockTheme.mockThemeMultipleFontCompositeRawTokens) + XCTAssertNotEqual(inheritedTheme.fonts.typeBodyStrongLarge, abstractTheme.fonts.typeBodyStrongLarge) + XCTAssertTrue(inheritedTheme.fonts.typeBodyStrongLarge == MockThemeFontSemanticTokensWrapper.mockThemeMultipleFontCompositeRawTokens) } func testInheritedThemeCanOverrideSemanticTokenTypeStrongMedium() throws { - XCTAssertNotEqual(inheritedTheme.typeBodyStrongMedium, abstractTheme.typeBodyStrongMedium) - XCTAssertTrue(inheritedTheme.typeBodyStrongMedium == MockTheme.mockThemeMultipleFontCompositeRawTokens) + XCTAssertNotEqual(inheritedTheme.fonts.typeBodyStrongMedium, abstractTheme.fonts.typeBodyStrongMedium) + XCTAssertTrue(inheritedTheme.fonts.typeBodyStrongMedium == MockThemeFontSemanticTokensWrapper.mockThemeMultipleFontCompositeRawTokens) } func testInheritedThemeCanOverrideSemanticTokenTypeStrongSmall() throws { - XCTAssertNotEqual(inheritedTheme.typeBodyStrongSmall, abstractTheme.typeBodyStrongSmall) - XCTAssertTrue(inheritedTheme.typeBodyStrongSmall == MockTheme.mockThemeMultipleFontCompositeRawTokens) + XCTAssertNotEqual(inheritedTheme.fonts.typeBodyStrongSmall, abstractTheme.fonts.typeBodyStrongSmall) + XCTAssertTrue(inheritedTheme.fonts.typeBodyStrongSmall == MockThemeFontSemanticTokensWrapper.mockThemeMultipleFontCompositeRawTokens) } // MARK: - Semantic tokens - Typography - Composites - Label func testInheritedThemeCanOverrideSemanticTokenTypeLabelDefaultXLarge() throws { - XCTAssertNotEqual(inheritedTheme.typeLabelDefaultXLarge, abstractTheme.typeLabelDefaultXLarge) - XCTAssertTrue(inheritedTheme.typeLabelDefaultXLarge == MockTheme.mockThemeMultipleFontCompositeRawTokens) + XCTAssertNotEqual(inheritedTheme.fonts.typeLabelDefaultXLarge, abstractTheme.fonts.typeLabelDefaultXLarge) + XCTAssertTrue(inheritedTheme.fonts.typeLabelDefaultXLarge == MockThemeFontSemanticTokensWrapper.mockThemeMultipleFontCompositeRawTokens) } func testInheritedThemeCanOverrideSemanticTokenTypeLabelDefaultLarge() throws { - XCTAssertNotEqual(inheritedTheme.typeLabelDefaultLarge, abstractTheme.typeLabelDefaultLarge) - XCTAssertTrue(inheritedTheme.typeLabelDefaultLarge == MockTheme.mockThemeMultipleFontCompositeRawTokens) + XCTAssertNotEqual(inheritedTheme.fonts.typeLabelDefaultLarge, abstractTheme.fonts.typeLabelDefaultLarge) + XCTAssertTrue(inheritedTheme.fonts.typeLabelDefaultLarge == MockThemeFontSemanticTokensWrapper.mockThemeMultipleFontCompositeRawTokens) } func testInheritedThemeCanOverrideSemanticTokenTypeLabelDefaultMedium() throws { - XCTAssertNotEqual(inheritedTheme.typeLabelDefaultMedium, abstractTheme.typeLabelDefaultMedium) - XCTAssertTrue(inheritedTheme.typeLabelDefaultMedium == MockTheme.mockThemeMultipleFontCompositeRawTokens) + XCTAssertNotEqual(inheritedTheme.fonts.typeLabelDefaultMedium, abstractTheme.fonts.typeLabelDefaultMedium) + XCTAssertTrue(inheritedTheme.fonts.typeLabelDefaultMedium == MockThemeFontSemanticTokensWrapper.mockThemeMultipleFontCompositeRawTokens) } func testInheritedThemeCanOverrideSemanticTokenTypeLabelDefaultSmall() throws { - XCTAssertNotEqual(inheritedTheme.typeLabelDefaultSmall, abstractTheme.typeLabelDefaultSmall) - XCTAssertTrue(inheritedTheme.typeLabelDefaultSmall == MockTheme.mockThemeMultipleFontCompositeRawTokens) + XCTAssertNotEqual(inheritedTheme.fonts.typeLabelDefaultSmall, abstractTheme.fonts.typeLabelDefaultSmall) + XCTAssertTrue(inheritedTheme.fonts.typeLabelDefaultSmall == MockThemeFontSemanticTokensWrapper.mockThemeMultipleFontCompositeRawTokens) } func testInheritedThemeCanOverrideSemanticTokenTypeLabelStrongXLarge() throws { - XCTAssertNotEqual(inheritedTheme.typeLabelStrongXLarge, abstractTheme.typeLabelStrongXLarge) - XCTAssertTrue(inheritedTheme.typeLabelStrongXLarge == MockTheme.mockThemeMultipleFontCompositeRawTokens) + XCTAssertNotEqual(inheritedTheme.fonts.typeLabelStrongXLarge, abstractTheme.fonts.typeLabelStrongXLarge) + XCTAssertTrue(inheritedTheme.fonts.typeLabelStrongXLarge == MockThemeFontSemanticTokensWrapper.mockThemeMultipleFontCompositeRawTokens) } func testInheritedThemeCanOverrideSemanticTokenTypeLabelStrongLarge() throws { - XCTAssertNotEqual(inheritedTheme.typeLabelStrongLarge, abstractTheme.typeLabelStrongLarge) - XCTAssertTrue(inheritedTheme.typeLabelStrongLarge == MockTheme.mockThemeMultipleFontCompositeRawTokens) + XCTAssertNotEqual(inheritedTheme.fonts.typeLabelStrongLarge, abstractTheme.fonts.typeLabelStrongLarge) + XCTAssertTrue(inheritedTheme.fonts.typeLabelStrongLarge == MockThemeFontSemanticTokensWrapper.mockThemeMultipleFontCompositeRawTokens) } func testInheritedThemeCanOverrideSemanticTokenTypeLabelStrongMedium() throws { - XCTAssertNotEqual(inheritedTheme.typeLabelStrongMedium, abstractTheme.typeLabelStrongMedium) - XCTAssertTrue(inheritedTheme.typeLabelStrongMedium == MockTheme.mockThemeMultipleFontCompositeRawTokens) + XCTAssertNotEqual(inheritedTheme.fonts.typeLabelStrongMedium, abstractTheme.fonts.typeLabelStrongMedium) + XCTAssertTrue(inheritedTheme.fonts.typeLabelStrongMedium == MockThemeFontSemanticTokensWrapper.mockThemeMultipleFontCompositeRawTokens) } func testInheritedThemeCanOverrideSemanticTokenTypeLabelStrongSmall() throws { - XCTAssertNotEqual(inheritedTheme.typeLabelStrongSmall, abstractTheme.typeLabelStrongSmall) - XCTAssertTrue(inheritedTheme.typeLabelStrongSmall == MockTheme.mockThemeMultipleFontCompositeRawTokens) + XCTAssertNotEqual(inheritedTheme.fonts.typeLabelStrongSmall, abstractTheme.fonts.typeLabelStrongSmall) + XCTAssertTrue(inheritedTheme.fonts.typeLabelStrongSmall == MockThemeFontSemanticTokensWrapper.mockThemeMultipleFontCompositeRawTokens) } // MARK: - Semantic tokens - Typography - Composites - Code func testInheritedThemeCanOverrideSemanticTokenTypeCodeMedium() throws { - XCTAssertNotEqual(inheritedTheme.typeCodeMedium, abstractTheme.typeCodeMedium) - XCTAssertTrue(inheritedTheme.typeCodeMedium == MockTheme.mockThemeMultipleFontCompositeRawTokens) + XCTAssertNotEqual(inheritedTheme.fonts.typeCodeMedium, abstractTheme.fonts.typeCodeMedium) + XCTAssertTrue(inheritedTheme.fonts.typeCodeMedium == MockThemeFontSemanticTokensWrapper.mockThemeMultipleFontCompositeRawTokens) } func testInheritedThemeCanOverrideSemanticTokenTypeCodeSmall() throws { - XCTAssertNotEqual(inheritedTheme.typeCodeSmall, abstractTheme.typeCodeSmall) - XCTAssertTrue(inheritedTheme.typeCodeSmall == MockTheme.mockThemeMultipleFontCompositeRawTokens) + XCTAssertNotEqual(inheritedTheme.fonts.typeCodeSmall, abstractTheme.fonts.typeCodeSmall) + XCTAssertTrue(inheritedTheme.fonts.typeCodeSmall == MockThemeFontSemanticTokensWrapper.mockThemeMultipleFontCompositeRawTokens) } } diff --git a/OUDS/Core/OUDS/Tests/OUDSTheme/TestThemeOverrideOfFontMultipleSemanticTokens.swift b/OUDS/Core/OUDS/Tests/OUDSTheme/TestThemeOverrideOfFontMultipleSemanticTokens.swift index f937ff3482..68de4f2415 100644 --- a/OUDS/Core/OUDS/Tests/OUDSTheme/TestThemeOverrideOfFontMultipleSemanticTokens.swift +++ b/OUDS/Core/OUDS/Tests/OUDSTheme/TestThemeOverrideOfFontMultipleSemanticTokens.swift @@ -37,157 +37,157 @@ final class TestThemeOverrideOfFontMultipleSemanticTokens: XCTestCase { // MARK: - Semantic token - Typography - Font - Size func testInheritedThemeCanOverrideSemanticTokenFontSizeDisplayLarge() throws { - XCTAssertNotEqual(inheritedTheme.fontSizeDisplayLarge, abstractTheme.fontSizeDisplayLarge) - XCTAssertTrue(inheritedTheme.fontSizeDisplayLarge == MockTheme.mockThemeMultipleFontSizeTokens) + XCTAssertNotEqual(inheritedTheme.fonts.fontSizeDisplayLarge, abstractTheme.fonts.fontSizeDisplayLarge) + XCTAssertTrue(inheritedTheme.fonts.fontSizeDisplayLarge == MockThemeFontSemanticTokensWrapper.mockThemeMultipleFontSizeTokens) } func testInheritedThemeCanOverrideSemanticTokenFontSizeDisplayMedium() throws { - XCTAssertNotEqual(inheritedTheme.fontSizeDisplayMedium, abstractTheme.fontSizeDisplayMedium) - XCTAssertTrue(inheritedTheme.fontSizeDisplayMedium == MockTheme.mockThemeMultipleFontSizeTokens) + XCTAssertNotEqual(inheritedTheme.fonts.fontSizeDisplayMedium, abstractTheme.fonts.fontSizeDisplayMedium) + XCTAssertTrue(inheritedTheme.fonts.fontSizeDisplayMedium == MockThemeFontSemanticTokensWrapper.mockThemeMultipleFontSizeTokens) } func testInheritedThemeCanOverrideSemanticTokenFontSizeDisplaySmall() throws { - XCTAssertNotEqual(inheritedTheme.fontSizeDisplaySmall, abstractTheme.fontSizeDisplaySmall) - XCTAssertTrue(inheritedTheme.fontSizeDisplaySmall == MockTheme.mockThemeMultipleFontSizeTokens) + XCTAssertNotEqual(inheritedTheme.fonts.fontSizeDisplaySmall, abstractTheme.fonts.fontSizeDisplaySmall) + XCTAssertTrue(inheritedTheme.fonts.fontSizeDisplaySmall == MockThemeFontSemanticTokensWrapper.mockThemeMultipleFontSizeTokens) } func testInheritedThemeCanOverrideSemanticTokenFontSizeHeadingXlarge() throws { - XCTAssertNotEqual(inheritedTheme.fontSizeHeadingXlarge, abstractTheme.fontSizeHeadingXlarge) - XCTAssertTrue(inheritedTheme.fontSizeHeadingXlarge == MockTheme.mockThemeMultipleFontSizeTokens) + XCTAssertNotEqual(inheritedTheme.fonts.fontSizeHeadingXlarge, abstractTheme.fonts.fontSizeHeadingXlarge) + XCTAssertTrue(inheritedTheme.fonts.fontSizeHeadingXlarge == MockThemeFontSemanticTokensWrapper.mockThemeMultipleFontSizeTokens) } func testInheritedThemeCanOverrideSemanticTokenFontSizeHeadingLarge() throws { - XCTAssertNotEqual(inheritedTheme.fontSizeHeadingLarge, abstractTheme.fontSizeHeadingLarge) - XCTAssertTrue(inheritedTheme.fontSizeHeadingLarge == MockTheme.mockThemeMultipleFontSizeTokens) + XCTAssertNotEqual(inheritedTheme.fonts.fontSizeHeadingLarge, abstractTheme.fonts.fontSizeHeadingLarge) + XCTAssertTrue(inheritedTheme.fonts.fontSizeHeadingLarge == MockThemeFontSemanticTokensWrapper.mockThemeMultipleFontSizeTokens) } func testInheritedThemeCanOverrideSemanticTokenFontSizeHeadingMedium() throws { - XCTAssertNotEqual(inheritedTheme.fontSizeHeadingMedium, abstractTheme.fontSizeHeadingMedium) - XCTAssertTrue(inheritedTheme.fontSizeHeadingMedium == MockTheme.mockThemeMultipleFontSizeTokens) + XCTAssertNotEqual(inheritedTheme.fonts.fontSizeHeadingMedium, abstractTheme.fonts.fontSizeHeadingMedium) + XCTAssertTrue(inheritedTheme.fonts.fontSizeHeadingMedium == MockThemeFontSemanticTokensWrapper.mockThemeMultipleFontSizeTokens) } func testInheritedThemeCanOverrideSemanticTokenFontSizeHeadingSmall() throws { - XCTAssertNotEqual(inheritedTheme.fontSizeHeadingSmall, abstractTheme.fontSizeHeadingSmall) - XCTAssertTrue(inheritedTheme.fontSizeHeadingSmall == MockTheme.mockThemeMultipleFontSizeTokens) + XCTAssertNotEqual(inheritedTheme.fonts.fontSizeHeadingSmall, abstractTheme.fonts.fontSizeHeadingSmall) + XCTAssertTrue(inheritedTheme.fonts.fontSizeHeadingSmall == MockThemeFontSemanticTokensWrapper.mockThemeMultipleFontSizeTokens) } func testInheritedThemeCanOverrideSemanticTokenFontSizeBodyLarge() throws { - XCTAssertNotEqual(inheritedTheme.fontSizeBodyLarge, abstractTheme.fontSizeBodyLarge) - XCTAssertTrue(inheritedTheme.fontSizeBodyLarge == MockTheme.mockThemeMultipleFontSizeTokens) + XCTAssertNotEqual(inheritedTheme.fonts.fontSizeBodyLarge, abstractTheme.fonts.fontSizeBodyLarge) + XCTAssertTrue(inheritedTheme.fonts.fontSizeBodyLarge == MockThemeFontSemanticTokensWrapper.mockThemeMultipleFontSizeTokens) } func testInheritedThemeCanOverrideSemanticTokenFontSizeBodyMedium() throws { - XCTAssertNotEqual(inheritedTheme.fontSizeBodyMedium, abstractTheme.fontSizeBodyMedium) - XCTAssertTrue(inheritedTheme.fontSizeBodyMedium == MockTheme.mockThemeMultipleFontSizeTokens) + XCTAssertNotEqual(inheritedTheme.fonts.fontSizeBodyMedium, abstractTheme.fonts.fontSizeBodyMedium) + XCTAssertTrue(inheritedTheme.fonts.fontSizeBodyMedium == MockThemeFontSemanticTokensWrapper.mockThemeMultipleFontSizeTokens) } func testInheritedThemeCanOverrideSemanticTokenFontSizeBodySmall() throws { - XCTAssertNotEqual(inheritedTheme.fontSizeBodySmall, abstractTheme.fontSizeBodySmall) - XCTAssertTrue(inheritedTheme.fontSizeBodySmall == MockTheme.mockThemeMultipleFontSizeTokens) + XCTAssertNotEqual(inheritedTheme.fonts.fontSizeBodySmall, abstractTheme.fonts.fontSizeBodySmall) + XCTAssertTrue(inheritedTheme.fonts.fontSizeBodySmall == MockThemeFontSemanticTokensWrapper.mockThemeMultipleFontSizeTokens) } // MARK: - Semantic token - Typography - Font - Letter spacing func testInheritedThemeCanOverrideSemanticTokenfontLetterSpacingDisplayLarge() throws { - XCTAssertNotEqual(inheritedTheme.fontLetterSpacingDisplayLarge, abstractTheme.fontLetterSpacingDisplayLarge) - XCTAssertTrue(inheritedTheme.fontLetterSpacingDisplayLarge == MockTheme.mockThemeMultipleFontLetterSpacingTokens) + XCTAssertNotEqual(inheritedTheme.fonts.fontLetterSpacingDisplayLarge, abstractTheme.fonts.fontLetterSpacingDisplayLarge) + XCTAssertTrue(inheritedTheme.fonts.fontLetterSpacingDisplayLarge == MockThemeFontSemanticTokensWrapper.mockThemeMultipleFontLetterSpacingTokens) } func testInheritedThemeCanOverrideSemanticTokenFontLetterSpacingDisplayMedium() throws { - XCTAssertNotEqual(inheritedTheme.fontLetterSpacingDisplayMedium, abstractTheme.fontLetterSpacingDisplayMedium) - XCTAssertTrue(inheritedTheme.fontLetterSpacingDisplayMedium == MockTheme.mockThemeMultipleFontLetterSpacingTokens) + XCTAssertNotEqual(inheritedTheme.fonts.fontLetterSpacingDisplayMedium, abstractTheme.fonts.fontLetterSpacingDisplayMedium) + XCTAssertTrue(inheritedTheme.fonts.fontLetterSpacingDisplayMedium == MockThemeFontSemanticTokensWrapper.mockThemeMultipleFontLetterSpacingTokens) } func testInheritedThemeCanOverrideSemanticTokenFontLetterSpacingDisplaySmall() throws { - XCTAssertNotEqual(inheritedTheme.fontLetterSpacingDisplaySmall, abstractTheme.fontLetterSpacingDisplaySmall) - XCTAssertTrue(inheritedTheme.fontLetterSpacingDisplaySmall == MockTheme.mockThemeMultipleFontLetterSpacingTokens) + XCTAssertNotEqual(inheritedTheme.fonts.fontLetterSpacingDisplaySmall, abstractTheme.fonts.fontLetterSpacingDisplaySmall) + XCTAssertTrue(inheritedTheme.fonts.fontLetterSpacingDisplaySmall == MockThemeFontSemanticTokensWrapper.mockThemeMultipleFontLetterSpacingTokens) } func testInheritedThemeCanOverrideSemanticTokenFontLetterSpacingHeadingXlarge() throws { - XCTAssertNotEqual(inheritedTheme.fontLetterSpacingHeadingXlarge, abstractTheme.fontLetterSpacingHeadingXlarge) - XCTAssertTrue(inheritedTheme.fontLetterSpacingHeadingXlarge == MockTheme.mockThemeMultipleFontLetterSpacingTokens) + XCTAssertNotEqual(inheritedTheme.fonts.fontLetterSpacingHeadingXlarge, abstractTheme.fonts.fontLetterSpacingHeadingXlarge) + XCTAssertTrue(inheritedTheme.fonts.fontLetterSpacingHeadingXlarge == MockThemeFontSemanticTokensWrapper.mockThemeMultipleFontLetterSpacingTokens) } func testInheritedThemeCanOverrideSemanticTokenFontLetterSpacingHeadingLarge() throws { - XCTAssertNotEqual(inheritedTheme.fontLetterSpacingHeadingLarge, abstractTheme.fontLetterSpacingHeadingLarge) - XCTAssertTrue(inheritedTheme.fontLetterSpacingHeadingLarge == MockTheme.mockThemeMultipleFontLetterSpacingTokens) + XCTAssertNotEqual(inheritedTheme.fonts.fontLetterSpacingHeadingLarge, abstractTheme.fonts.fontLetterSpacingHeadingLarge) + XCTAssertTrue(inheritedTheme.fonts.fontLetterSpacingHeadingLarge == MockThemeFontSemanticTokensWrapper.mockThemeMultipleFontLetterSpacingTokens) } func testInheritedThemeCanOverrideSemanticTokenFontLetterSpacingHeadingMedium() throws { - XCTAssertNotEqual(inheritedTheme.fontLetterSpacingHeadingMedium, abstractTheme.fontLetterSpacingHeadingMedium) - XCTAssertTrue(inheritedTheme.fontLetterSpacingHeadingMedium == MockTheme.mockThemeMultipleFontLetterSpacingTokens) + XCTAssertNotEqual(inheritedTheme.fonts.fontLetterSpacingHeadingMedium, abstractTheme.fonts.fontLetterSpacingHeadingMedium) + XCTAssertTrue(inheritedTheme.fonts.fontLetterSpacingHeadingMedium == MockThemeFontSemanticTokensWrapper.mockThemeMultipleFontLetterSpacingTokens) } func testInheritedThemeCanOverrideSemanticTokenFontLetterSpacingHeadingSmall() throws { - XCTAssertNotEqual(inheritedTheme.fontLetterSpacingHeadingSmall, abstractTheme.fontLetterSpacingHeadingSmall) - XCTAssertTrue(inheritedTheme.fontLetterSpacingHeadingSmall == MockTheme.mockThemeMultipleFontLetterSpacingTokens) + XCTAssertNotEqual(inheritedTheme.fonts.fontLetterSpacingHeadingSmall, abstractTheme.fonts.fontLetterSpacingHeadingSmall) + XCTAssertTrue(inheritedTheme.fonts.fontLetterSpacingHeadingSmall == MockThemeFontSemanticTokensWrapper.mockThemeMultipleFontLetterSpacingTokens) } func testInheritedThemeCanOverrideSemanticTokenFontLetterSpacingBodyLarge() throws { - XCTAssertNotEqual(inheritedTheme.fontLetterSpacingBodyLarge, abstractTheme.fontLetterSpacingBodyLarge) - XCTAssertTrue(inheritedTheme.fontLetterSpacingBodyLarge == MockTheme.mockThemeMultipleFontLetterSpacingTokens) + XCTAssertNotEqual(inheritedTheme.fonts.fontLetterSpacingBodyLarge, abstractTheme.fonts.fontLetterSpacingBodyLarge) + XCTAssertTrue(inheritedTheme.fonts.fontLetterSpacingBodyLarge == MockThemeFontSemanticTokensWrapper.mockThemeMultipleFontLetterSpacingTokens) } func testInheritedThemeCanOverrideSemanticTokenFontLetterSpacingBodyMedium() throws { - XCTAssertNotEqual(inheritedTheme.fontLetterSpacingBodyMedium, abstractTheme.fontLetterSpacingBodyMedium) - XCTAssertTrue(inheritedTheme.fontLetterSpacingBodyMedium == MockTheme.mockThemeMultipleFontLetterSpacingTokens) + XCTAssertNotEqual(inheritedTheme.fonts.fontLetterSpacingBodyMedium, abstractTheme.fonts.fontLetterSpacingBodyMedium) + XCTAssertTrue(inheritedTheme.fonts.fontLetterSpacingBodyMedium == MockThemeFontSemanticTokensWrapper.mockThemeMultipleFontLetterSpacingTokens) } func testInheritedThemeCanOverrideSemanticTokenFontLetterSpacingBodySmall() throws { - XCTAssertNotEqual(inheritedTheme.fontLetterSpacingBodySmall, abstractTheme.fontLetterSpacingBodySmall) - XCTAssertTrue(inheritedTheme.fontLetterSpacingBodySmall == MockTheme.mockThemeMultipleFontLetterSpacingTokens) + XCTAssertNotEqual(inheritedTheme.fonts.fontLetterSpacingBodySmall, abstractTheme.fonts.fontLetterSpacingBodySmall) + XCTAssertTrue(inheritedTheme.fonts.fontLetterSpacingBodySmall == MockThemeFontSemanticTokensWrapper.mockThemeMultipleFontLetterSpacingTokens) } // MARK: - Semantic token - Typography - Font - Line height func testInheritedThemeCanOverrideSemanticTokenFontLineHeightDisplayLarge() throws { - XCTAssertNotEqual(inheritedTheme.fontLineHeightDisplayLarge, abstractTheme.fontLineHeightDisplayLarge) - XCTAssertTrue(inheritedTheme.fontLineHeightDisplayLarge == MockTheme.mockThemeMultipleFontLineHeightTokens) + XCTAssertNotEqual(inheritedTheme.fonts.fontLineHeightDisplayLarge, abstractTheme.fonts.fontLineHeightDisplayLarge) + XCTAssertTrue(inheritedTheme.fonts.fontLineHeightDisplayLarge == MockThemeFontSemanticTokensWrapper.mockThemeMultipleFontLineHeightTokens) } func testInheritedThemeCanOverrideSemanticTokenFontLineHeightDisplayMedium() throws { - XCTAssertNotEqual(inheritedTheme.fontLineHeightDisplayMedium, abstractTheme.fontLineHeightDisplayMedium) - XCTAssertTrue(inheritedTheme.fontLineHeightDisplayMedium == MockTheme.mockThemeMultipleFontLineHeightTokens) + XCTAssertNotEqual(inheritedTheme.fonts.fontLineHeightDisplayMedium, abstractTheme.fonts.fontLineHeightDisplayMedium) + XCTAssertTrue(inheritedTheme.fonts.fontLineHeightDisplayMedium == MockThemeFontSemanticTokensWrapper.mockThemeMultipleFontLineHeightTokens) } func testInheritedThemeCanOverrideSemanticTokenFontLineHeightDisplaySmall() throws { - XCTAssertNotEqual(inheritedTheme.fontLineHeightDisplaySmall, abstractTheme.fontLineHeightDisplaySmall) - XCTAssertTrue(inheritedTheme.fontLineHeightDisplaySmall == MockTheme.mockThemeMultipleFontLineHeightTokens) + XCTAssertNotEqual(inheritedTheme.fonts.fontLineHeightDisplaySmall, abstractTheme.fonts.fontLineHeightDisplaySmall) + XCTAssertTrue(inheritedTheme.fonts.fontLineHeightDisplaySmall == MockThemeFontSemanticTokensWrapper.mockThemeMultipleFontLineHeightTokens) } func testInheritedThemeCanOverrideSemanticTokenFontLineHeightHeadingXlarge() throws { - XCTAssertNotEqual(inheritedTheme.fontLineHeightHeadingXlarge, abstractTheme.fontLineHeightHeadingXlarge) - XCTAssertTrue(inheritedTheme.fontLineHeightHeadingXlarge == MockTheme.mockThemeMultipleFontLineHeightTokens) + XCTAssertNotEqual(inheritedTheme.fonts.fontLineHeightHeadingXlarge, abstractTheme.fonts.fontLineHeightHeadingXlarge) + XCTAssertTrue(inheritedTheme.fonts.fontLineHeightHeadingXlarge == MockThemeFontSemanticTokensWrapper.mockThemeMultipleFontLineHeightTokens) } func testInheritedThemeCanOverrideSemanticTokenFontLineHeightHeadingLarge() throws { - XCTAssertNotEqual(inheritedTheme.fontLineHeightHeadingLarge, abstractTheme.fontLineHeightHeadingLarge) - XCTAssertTrue(inheritedTheme.fontLineHeightHeadingLarge == MockTheme.mockThemeMultipleFontLineHeightTokens) + XCTAssertNotEqual(inheritedTheme.fonts.fontLineHeightHeadingLarge, abstractTheme.fonts.fontLineHeightHeadingLarge) + XCTAssertTrue(inheritedTheme.fonts.fontLineHeightHeadingLarge == MockThemeFontSemanticTokensWrapper.mockThemeMultipleFontLineHeightTokens) } func testInheritedThemeCanOverrideSemanticTokenFontLineHeightHeadingMedium() throws { - XCTAssertNotEqual(inheritedTheme.fontLineHeightHeadingMedium, abstractTheme.fontLineHeightHeadingMedium) - XCTAssertTrue(inheritedTheme.fontLineHeightHeadingMedium == MockTheme.mockThemeMultipleFontLineHeightTokens) + XCTAssertNotEqual(inheritedTheme.fonts.fontLineHeightHeadingMedium, abstractTheme.fonts.fontLineHeightHeadingMedium) + XCTAssertTrue(inheritedTheme.fonts.fontLineHeightHeadingMedium == MockThemeFontSemanticTokensWrapper.mockThemeMultipleFontLineHeightTokens) } func testInheritedThemeCanOverrideSemanticTokenFontLineHeightHeadingSmall() throws { - XCTAssertNotEqual(inheritedTheme.fontLineHeightHeadingSmall, abstractTheme.fontLineHeightHeadingSmall) - XCTAssertTrue(inheritedTheme.fontLineHeightHeadingSmall == MockTheme.mockThemeMultipleFontLineHeightTokens) + XCTAssertNotEqual(inheritedTheme.fonts.fontLineHeightHeadingSmall, abstractTheme.fonts.fontLineHeightHeadingSmall) + XCTAssertTrue(inheritedTheme.fonts.fontLineHeightHeadingSmall == MockThemeFontSemanticTokensWrapper.mockThemeMultipleFontLineHeightTokens) } func testInheritedThemeCanOverrideSemanticTokenFontLineHeightBodyLarge() throws { - XCTAssertNotEqual(inheritedTheme.fontLineHeightBodyLarge, abstractTheme.fontLineHeightBodyLarge) - XCTAssertTrue(inheritedTheme.fontLineHeightBodyLarge == MockTheme.mockThemeMultipleFontLineHeightTokens) + XCTAssertNotEqual(inheritedTheme.fonts.fontLineHeightBodyLarge, abstractTheme.fonts.fontLineHeightBodyLarge) + XCTAssertTrue(inheritedTheme.fonts.fontLineHeightBodyLarge == MockThemeFontSemanticTokensWrapper.mockThemeMultipleFontLineHeightTokens) } func testInheritedThemeCanOverrideSemanticTokenFontLineHeightBodyMedium() throws { - XCTAssertNotEqual(inheritedTheme.fontLineHeightBodyMedium, abstractTheme.fontLineHeightBodyMedium) - XCTAssertTrue(inheritedTheme.fontLineHeightBodyMedium == MockTheme.mockThemeMultipleFontLineHeightTokens) + XCTAssertNotEqual(inheritedTheme.fonts.fontLineHeightBodyMedium, abstractTheme.fonts.fontLineHeightBodyMedium) + XCTAssertTrue(inheritedTheme.fonts.fontLineHeightBodyMedium == MockThemeFontSemanticTokensWrapper.mockThemeMultipleFontLineHeightTokens) } func testInheritedThemeCanOverrideSemanticTokenFontLineHeightBodySmall() throws { - XCTAssertNotEqual(inheritedTheme.fontLineHeightBodySmall, abstractTheme.fontLineHeightBodySmall) - XCTAssertTrue(inheritedTheme.fontLineHeightBodySmall == MockTheme.mockThemeMultipleFontLineHeightTokens) + XCTAssertNotEqual(inheritedTheme.fonts.fontLineHeightBodySmall, abstractTheme.fonts.fontLineHeightBodySmall) + XCTAssertTrue(inheritedTheme.fonts.fontLineHeightBodySmall == MockThemeFontSemanticTokensWrapper.mockThemeMultipleFontLineHeightTokens) } } diff --git a/OUDS/Core/OUDS/Tests/OUDSTheme/TestThemeOverrideOfFontSemanticTokens.swift b/OUDS/Core/OUDS/Tests/OUDSTheme/TestThemeOverrideOfFontSemanticTokens.swift index c46ddf5d30..300324ef9f 100644 --- a/OUDS/Core/OUDS/Tests/OUDSTheme/TestThemeOverrideOfFontSemanticTokens.swift +++ b/OUDS/Core/OUDS/Tests/OUDSTheme/TestThemeOverrideOfFontSemanticTokens.swift @@ -37,406 +37,406 @@ final class TestThemeOverrideOfFontSemanticTokens: XCTestCase { // MARK: - Semantic token - Typography - Font - Family func testInheritedThemeCanOverrideSemanticTokenFontFamily() throws { - XCTAssertNotEqual(inheritedTheme.fontFamily, abstractTheme.fontFamily) - XCTAssertTrue(inheritedTheme.fontFamily == MockTheme.mockThemeFontFamilyRawToken) + XCTAssertNotEqual(inheritedTheme.fonts.fontFamily, abstractTheme.fonts.fontFamily) + XCTAssertTrue(inheritedTheme.fonts.fontFamily == MockThemeFontSemanticTokensWrapper.mockThemeFontFamilyRawToken) } // MARK: - Semantic token - Typography - Font - Weight func testInheritedThemeCanOverrideSemanticTokenFontWeightDefault() throws { - XCTAssertNotEqual(inheritedTheme.fontWeightDefault, abstractTheme.fontWeightDefault) - XCTAssertTrue(inheritedTheme.fontWeightDefault == MockTheme.mockThemeFontWeightRawToken) + XCTAssertNotEqual(inheritedTheme.fonts.fontWeightDefault, abstractTheme.fonts.fontWeightDefault) + XCTAssertTrue(inheritedTheme.fonts.fontWeightDefault == MockThemeFontSemanticTokensWrapper.mockThemeFontWeightRawToken) } func testInheritedThemeCanOverrideSemanticTokenFontWeightCode() throws { - XCTAssertNotEqual(inheritedTheme.fontWeightCode, abstractTheme.fontWeightCode) - XCTAssertTrue(inheritedTheme.fontWeightCode == MockTheme.mockThemeFontWeightRawToken) + XCTAssertNotEqual(inheritedTheme.fonts.fontWeightCode, abstractTheme.fonts.fontWeightCode) + XCTAssertTrue(inheritedTheme.fonts.fontWeightCode == MockThemeFontSemanticTokensWrapper.mockThemeFontWeightRawToken) } func testInheritedThemeCanOverrideSemanticTokenFontWeightStrong() throws { - XCTAssertNotEqual(inheritedTheme.fontWeightStrong, abstractTheme.fontWeightStrong) - XCTAssertTrue(inheritedTheme.fontWeightStrong == MockTheme.mockThemeFontWeightRawToken) + XCTAssertNotEqual(inheritedTheme.fonts.fontWeightStrong, abstractTheme.fonts.fontWeightStrong) + XCTAssertTrue(inheritedTheme.fonts.fontWeightStrong == MockThemeFontSemanticTokensWrapper.mockThemeFontWeightRawToken) } func testInheritedThemeCanOverrideSemanticTokenFontWeightDisplay() throws { - XCTAssertNotEqual(inheritedTheme.fontWeightDisplay, abstractTheme.fontWeightDisplay) - XCTAssertTrue(inheritedTheme.fontWeightDisplay == MockTheme.mockThemeFontWeightRawToken) + XCTAssertNotEqual(inheritedTheme.fonts.fontWeightDisplay, abstractTheme.fonts.fontWeightDisplay) + XCTAssertTrue(inheritedTheme.fonts.fontWeightDisplay == MockThemeFontSemanticTokensWrapper.mockThemeFontWeightRawToken) } func testInheritedThemeCanOverrideSemanticTokenFontWeightHeading() throws { - XCTAssertNotEqual(inheritedTheme.fontWeightHeading, abstractTheme.fontWeightHeading) - XCTAssertTrue(inheritedTheme.fontWeightHeading == MockTheme.mockThemeFontWeightRawToken) + XCTAssertNotEqual(inheritedTheme.fonts.fontWeightHeading, abstractTheme.fonts.fontWeightHeading) + XCTAssertTrue(inheritedTheme.fonts.fontWeightHeading == MockThemeFontSemanticTokensWrapper.mockThemeFontWeightRawToken) } func testInheritedThemeCanOverrideSemanticTokenFontWeightBodyDefault() throws { - XCTAssertNotEqual(inheritedTheme.fontWeightBodyDefault, abstractTheme.fontWeightBodyDefault) - XCTAssertTrue(inheritedTheme.fontWeightBodyDefault == MockTheme.mockThemeFontWeightRawToken) + XCTAssertNotEqual(inheritedTheme.fonts.fontWeightBodyDefault, abstractTheme.fonts.fontWeightBodyDefault) + XCTAssertTrue(inheritedTheme.fonts.fontWeightBodyDefault == MockThemeFontSemanticTokensWrapper.mockThemeFontWeightRawToken) } func testInheritedThemeCanOverrideSemanticTokenFontWeightBodyStrong() throws { - XCTAssertNotEqual(inheritedTheme.fontWeightBodyStrong, abstractTheme.fontWeightBodyStrong) - XCTAssertTrue(inheritedTheme.fontWeightBodyStrong == MockTheme.mockThemeFontWeightRawToken) + XCTAssertNotEqual(inheritedTheme.fonts.fontWeightBodyStrong, abstractTheme.fonts.fontWeightBodyStrong) + XCTAssertTrue(inheritedTheme.fonts.fontWeightBodyStrong == MockThemeFontSemanticTokensWrapper.mockThemeFontWeightRawToken) } func testInheritedThemeCanOverrideSemanticTokenFontWeightLabelDefault() throws { - XCTAssertNotEqual(inheritedTheme.fontWeightLabelDefault, abstractTheme.fontWeightLabelDefault) - XCTAssertTrue(inheritedTheme.fontWeightLabelDefault == MockTheme.mockThemeFontWeightRawToken) + XCTAssertNotEqual(inheritedTheme.fonts.fontWeightLabelDefault, abstractTheme.fonts.fontWeightLabelDefault) + XCTAssertTrue(inheritedTheme.fonts.fontWeightLabelDefault == MockThemeFontSemanticTokensWrapper.mockThemeFontWeightRawToken) } func testInheritedThemeCanOverrideSemanticTokenFontWeightLabelStrong() throws { - XCTAssertNotEqual(inheritedTheme.fontWeightLabelStrong, abstractTheme.fontWeightLabelStrong) - XCTAssertTrue(inheritedTheme.fontWeightLabelStrong == MockTheme.mockThemeFontWeightRawToken) + XCTAssertNotEqual(inheritedTheme.fonts.fontWeightLabelStrong, abstractTheme.fonts.fontWeightLabelStrong) + XCTAssertTrue(inheritedTheme.fonts.fontWeightLabelStrong == MockThemeFontSemanticTokensWrapper.mockThemeFontWeightRawToken) } // MARK: - Semantic token - Typography - Font - Size func testInheritedThemeCanOverrideSemanticTokenFontSizeLabelXlarge() throws { - XCTAssertNotEqual(inheritedTheme.fontSizeLabelXlarge, abstractTheme.fontSizeLabelXlarge) - XCTAssertTrue(inheritedTheme.fontSizeLabelXlarge == MockTheme.mockThemeFontSizeRawToken) + XCTAssertNotEqual(inheritedTheme.fonts.fontSizeLabelXlarge, abstractTheme.fonts.fontSizeLabelXlarge) + XCTAssertTrue(inheritedTheme.fonts.fontSizeLabelXlarge == MockThemeFontSemanticTokensWrapper.mockThemeFontSizeRawToken) } func testInheritedThemeCanOverrideSemanticTokenFontSizeLabelLarge() throws { - XCTAssertNotEqual(inheritedTheme.fontSizeLabelLarge, abstractTheme.fontSizeLabelLarge) - XCTAssertTrue(inheritedTheme.fontSizeLabelLarge == MockTheme.mockThemeFontSizeRawToken) + XCTAssertNotEqual(inheritedTheme.fonts.fontSizeLabelLarge, abstractTheme.fonts.fontSizeLabelLarge) + XCTAssertTrue(inheritedTheme.fonts.fontSizeLabelLarge == MockThemeFontSemanticTokensWrapper.mockThemeFontSizeRawToken) } func testInheritedThemeCanOverrideSemanticTokenFontSizeLabelMedium() throws { - XCTAssertNotEqual(inheritedTheme.fontSizeLabelMedium, abstractTheme.fontSizeLabelMedium) - XCTAssertTrue(inheritedTheme.fontSizeLabelMedium == MockTheme.mockThemeFontSizeRawToken) + XCTAssertNotEqual(inheritedTheme.fonts.fontSizeLabelMedium, abstractTheme.fonts.fontSizeLabelMedium) + XCTAssertTrue(inheritedTheme.fonts.fontSizeLabelMedium == MockThemeFontSemanticTokensWrapper.mockThemeFontSizeRawToken) } func testInheritedThemeCanOverrideSemanticTokenFontSizeLabelSmall() throws { - XCTAssertNotEqual(inheritedTheme.fontSizeLabelSmall, abstractTheme.fontSizeLabelSmall) - XCTAssertTrue(inheritedTheme.fontSizeLabelSmall == MockTheme.mockThemeFontSizeRawToken) + XCTAssertNotEqual(inheritedTheme.fonts.fontSizeLabelSmall, abstractTheme.fonts.fontSizeLabelSmall) + XCTAssertTrue(inheritedTheme.fonts.fontSizeLabelSmall == MockThemeFontSemanticTokensWrapper.mockThemeFontSizeRawToken) } func testInheritedThemeCanOverrideSemanticTokenFontSizeCodeMedium() throws { - XCTAssertNotEqual(inheritedTheme.fontSizeCodeMedium, abstractTheme.fontSizeCodeMedium) - XCTAssertTrue(inheritedTheme.fontSizeCodeMedium == MockTheme.mockThemeFontSizeRawToken) + XCTAssertNotEqual(inheritedTheme.fonts.fontSizeCodeMedium, abstractTheme.fonts.fontSizeCodeMedium) + XCTAssertTrue(inheritedTheme.fonts.fontSizeCodeMedium == MockThemeFontSemanticTokensWrapper.mockThemeFontSizeRawToken) } func testInheritedThemeCanOverrideSemanticTokenFontSizeDisplayLargeMobile() throws { - XCTAssertNotEqual(inheritedTheme.fontSizeDisplayLargeMobile, abstractTheme.fontSizeDisplayLargeMobile) - XCTAssertTrue(inheritedTheme.fontSizeDisplayLargeMobile == MockTheme.mockThemeFontSizeRawToken) + XCTAssertNotEqual(inheritedTheme.fonts.fontSizeDisplayLargeMobile, abstractTheme.fonts.fontSizeDisplayLargeMobile) + XCTAssertTrue(inheritedTheme.fonts.fontSizeDisplayLargeMobile == MockThemeFontSemanticTokensWrapper.mockThemeFontSizeRawToken) } func testInheritedThemeCanOverrideSemanticTokenFontSizeDisplayLargeTablet() throws { - XCTAssertNotEqual(inheritedTheme.fontSizeDisplayLargeTablet, abstractTheme.fontSizeDisplayLargeTablet) - XCTAssertTrue(inheritedTheme.fontSizeDisplayLargeTablet == MockTheme.mockThemeFontSizeRawToken) + XCTAssertNotEqual(inheritedTheme.fonts.fontSizeDisplayLargeTablet, abstractTheme.fonts.fontSizeDisplayLargeTablet) + XCTAssertTrue(inheritedTheme.fonts.fontSizeDisplayLargeTablet == MockThemeFontSemanticTokensWrapper.mockThemeFontSizeRawToken) } func testInheritedThemeCanOverrideSemanticTokenFontSizeDisplayMediumMobile() throws { - XCTAssertNotEqual(inheritedTheme.fontSizeDisplayMediumMobile, abstractTheme.fontSizeDisplayMediumMobile) - XCTAssertTrue(inheritedTheme.fontSizeDisplayMediumMobile == MockTheme.mockThemeFontSizeRawToken) + XCTAssertNotEqual(inheritedTheme.fonts.fontSizeDisplayMediumMobile, abstractTheme.fonts.fontSizeDisplayMediumMobile) + XCTAssertTrue(inheritedTheme.fonts.fontSizeDisplayMediumMobile == MockThemeFontSemanticTokensWrapper.mockThemeFontSizeRawToken) } func testInheritedThemeCanOverrideSemanticTokenFontSizeDisplayMediumTablet() throws { - XCTAssertNotEqual(inheritedTheme.fontSizeDisplayMediumTablet, abstractTheme.fontSizeDisplayMediumTablet) - XCTAssertTrue(inheritedTheme.fontSizeDisplayMediumTablet == MockTheme.mockThemeFontSizeRawToken) + XCTAssertNotEqual(inheritedTheme.fonts.fontSizeDisplayMediumTablet, abstractTheme.fonts.fontSizeDisplayMediumTablet) + XCTAssertTrue(inheritedTheme.fonts.fontSizeDisplayMediumTablet == MockThemeFontSemanticTokensWrapper.mockThemeFontSizeRawToken) } func testInheritedThemeCanOverrideSemanticTokenFontSizeDisplaySmallMobile() throws { - XCTAssertNotEqual(inheritedTheme.fontSizeDisplaySmallMobile, abstractTheme.fontSizeDisplaySmallMobile) - XCTAssertTrue(inheritedTheme.fontSizeDisplaySmallMobile == MockTheme.mockThemeFontSizeRawToken) + XCTAssertNotEqual(inheritedTheme.fonts.fontSizeDisplaySmallMobile, abstractTheme.fonts.fontSizeDisplaySmallMobile) + XCTAssertTrue(inheritedTheme.fonts.fontSizeDisplaySmallMobile == MockThemeFontSemanticTokensWrapper.mockThemeFontSizeRawToken) } func testInheritedThemeCanOverrideSemanticTokenFontSizeDisplaySmallTablet() throws { - XCTAssertNotEqual(inheritedTheme.fontSizeDisplaySmallTablet, abstractTheme.fontSizeDisplaySmallTablet) - XCTAssertTrue(inheritedTheme.fontSizeDisplaySmallTablet == MockTheme.mockThemeFontSizeRawToken) + XCTAssertNotEqual(inheritedTheme.fonts.fontSizeDisplaySmallTablet, abstractTheme.fonts.fontSizeDisplaySmallTablet) + XCTAssertTrue(inheritedTheme.fonts.fontSizeDisplaySmallTablet == MockThemeFontSemanticTokensWrapper.mockThemeFontSizeRawToken) } func testInheritedThemeCanOverrideSemanticTokenFontSizeHeadingLargeMobile() throws { - XCTAssertNotEqual(inheritedTheme.fontSizeHeadingLargeMobile, abstractTheme.fontSizeHeadingLargeMobile) - XCTAssertTrue(inheritedTheme.fontSizeHeadingLargeMobile == MockTheme.mockThemeFontSizeRawToken) + XCTAssertNotEqual(inheritedTheme.fonts.fontSizeHeadingLargeMobile, abstractTheme.fonts.fontSizeHeadingLargeMobile) + XCTAssertTrue(inheritedTheme.fonts.fontSizeHeadingLargeMobile == MockThemeFontSemanticTokensWrapper.mockThemeFontSizeRawToken) } func testInheritedThemeCanOverrideSemanticTokenFontSizeHeadingLargeTablet() throws { - XCTAssertNotEqual(inheritedTheme.fontSizeHeadingLargeTablet, abstractTheme.fontSizeHeadingLargeTablet) - XCTAssertTrue(inheritedTheme.fontSizeHeadingLargeTablet == MockTheme.mockThemeFontSizeRawToken) + XCTAssertNotEqual(inheritedTheme.fonts.fontSizeHeadingLargeTablet, abstractTheme.fonts.fontSizeHeadingLargeTablet) + XCTAssertTrue(inheritedTheme.fonts.fontSizeHeadingLargeTablet == MockThemeFontSemanticTokensWrapper.mockThemeFontSizeRawToken) } func testInheritedThemeCanOverrideSemanticTokenFontSizeHeadingMediumMobile() throws { - XCTAssertNotEqual(inheritedTheme.fontSizeHeadingMediumMobile, abstractTheme.fontSizeHeadingMediumMobile) - XCTAssertTrue(inheritedTheme.fontSizeHeadingMediumMobile == MockTheme.mockThemeFontSizeRawToken) + XCTAssertNotEqual(inheritedTheme.fonts.fontSizeHeadingMediumMobile, abstractTheme.fonts.fontSizeHeadingMediumMobile) + XCTAssertTrue(inheritedTheme.fonts.fontSizeHeadingMediumMobile == MockThemeFontSemanticTokensWrapper.mockThemeFontSizeRawToken) } func testInheritedThemeCanOverrideSemanticTokenFontSizeHeadingMediumTablet() throws { - XCTAssertNotEqual(inheritedTheme.fontSizeHeadingMediumTablet, abstractTheme.fontSizeHeadingMediumTablet) - XCTAssertTrue(inheritedTheme.fontSizeHeadingMediumTablet == MockTheme.mockThemeFontSizeRawToken) + XCTAssertNotEqual(inheritedTheme.fonts.fontSizeHeadingMediumTablet, abstractTheme.fonts.fontSizeHeadingMediumTablet) + XCTAssertTrue(inheritedTheme.fonts.fontSizeHeadingMediumTablet == MockThemeFontSemanticTokensWrapper.mockThemeFontSizeRawToken) } func testInheritedThemeCanOverrideSemanticTokenFontSizeHeadingSmallMobile() throws { - XCTAssertNotEqual(inheritedTheme.fontSizeHeadingSmallMobile, abstractTheme.fontSizeHeadingSmallMobile) - XCTAssertTrue(inheritedTheme.fontSizeHeadingSmallMobile == MockTheme.mockThemeFontSizeRawToken) + XCTAssertNotEqual(inheritedTheme.fonts.fontSizeHeadingSmallMobile, abstractTheme.fonts.fontSizeHeadingSmallMobile) + XCTAssertTrue(inheritedTheme.fonts.fontSizeHeadingSmallMobile == MockThemeFontSemanticTokensWrapper.mockThemeFontSizeRawToken) } func testInheritedThemeCanOverrideSemanticTokenFontSizeHeadingSmallTablet() throws { - XCTAssertNotEqual(inheritedTheme.fontSizeHeadingSmallTablet, abstractTheme.fontSizeHeadingSmallTablet) - XCTAssertTrue(inheritedTheme.fontSizeHeadingSmallTablet == MockTheme.mockThemeFontSizeRawToken) + XCTAssertNotEqual(inheritedTheme.fonts.fontSizeHeadingSmallTablet, abstractTheme.fonts.fontSizeHeadingSmallTablet) + XCTAssertTrue(inheritedTheme.fonts.fontSizeHeadingSmallTablet == MockThemeFontSemanticTokensWrapper.mockThemeFontSizeRawToken) } func testInheritedThemeCanOverrideSemanticTokenFontSizeBodyLargeMobile() throws { - XCTAssertNotEqual(inheritedTheme.fontSizeBodyLargeMobile, abstractTheme.fontSizeBodyLargeMobile) - XCTAssertTrue(inheritedTheme.fontSizeBodyLargeMobile == MockTheme.mockThemeFontSizeRawToken) + XCTAssertNotEqual(inheritedTheme.fonts.fontSizeBodyLargeMobile, abstractTheme.fonts.fontSizeBodyLargeMobile) + XCTAssertTrue(inheritedTheme.fonts.fontSizeBodyLargeMobile == MockThemeFontSemanticTokensWrapper.mockThemeFontSizeRawToken) } func testInheritedThemeCanOverrideSemanticTokenFontSizeBodyLargeTablet() throws { - XCTAssertNotEqual(inheritedTheme.fontSizeBodyLargeTablet, abstractTheme.fontSizeBodyLargeTablet) - XCTAssertTrue(inheritedTheme.fontSizeBodyLargeTablet == MockTheme.mockThemeFontSizeRawToken) + XCTAssertNotEqual(inheritedTheme.fonts.fontSizeBodyLargeTablet, abstractTheme.fonts.fontSizeBodyLargeTablet) + XCTAssertTrue(inheritedTheme.fonts.fontSizeBodyLargeTablet == MockThemeFontSemanticTokensWrapper.mockThemeFontSizeRawToken) } func testInheritedThemeCanOverrideSemanticTokenFontSizeBodyMediumMobile() throws { - XCTAssertNotEqual(inheritedTheme.fontSizeBodyMediumMobile, abstractTheme.fontSizeBodyMediumMobile) - XCTAssertTrue(inheritedTheme.fontSizeBodyMediumMobile == MockTheme.mockThemeFontSizeRawToken) + XCTAssertNotEqual(inheritedTheme.fonts.fontSizeBodyMediumMobile, abstractTheme.fonts.fontSizeBodyMediumMobile) + XCTAssertTrue(inheritedTheme.fonts.fontSizeBodyMediumMobile == MockThemeFontSemanticTokensWrapper.mockThemeFontSizeRawToken) } func testInheritedThemeCanOverrideSemanticTokenFontSizeBodyMediumTablet() throws { - XCTAssertNotEqual(inheritedTheme.fontSizeBodyMediumTablet, abstractTheme.fontSizeBodyMediumTablet) - XCTAssertTrue(inheritedTheme.fontSizeBodyMediumTablet == MockTheme.mockThemeFontSizeRawToken) + XCTAssertNotEqual(inheritedTheme.fonts.fontSizeBodyMediumTablet, abstractTheme.fonts.fontSizeBodyMediumTablet) + XCTAssertTrue(inheritedTheme.fonts.fontSizeBodyMediumTablet == MockThemeFontSemanticTokensWrapper.mockThemeFontSizeRawToken) } func testInheritedThemeCanOverrideSemanticTokenFontSizeBodySmallMobile() throws { - XCTAssertNotEqual(inheritedTheme.fontSizeBodySmallMobile, abstractTheme.fontSizeBodySmallMobile) - XCTAssertTrue(inheritedTheme.fontSizeBodySmallMobile == MockTheme.mockThemeFontSizeRawToken) + XCTAssertNotEqual(inheritedTheme.fonts.fontSizeBodySmallMobile, abstractTheme.fonts.fontSizeBodySmallMobile) + XCTAssertTrue(inheritedTheme.fonts.fontSizeBodySmallMobile == MockThemeFontSemanticTokensWrapper.mockThemeFontSizeRawToken) } func testInheritedThemeCanOverrideSemanticTokenFontSizeBodySmallTablet() throws { - XCTAssertNotEqual(inheritedTheme.fontSizeBodySmallTablet, abstractTheme.fontSizeBodySmallTablet) - XCTAssertTrue(inheritedTheme.fontSizeBodySmallTablet == MockTheme.mockThemeFontSizeRawToken) + XCTAssertNotEqual(inheritedTheme.fonts.fontSizeBodySmallTablet, abstractTheme.fonts.fontSizeBodySmallTablet) + XCTAssertTrue(inheritedTheme.fonts.fontSizeBodySmallTablet == MockThemeFontSemanticTokensWrapper.mockThemeFontSizeRawToken) } // MARK: - Semantic token - Typography - Font - Letter spacing func testInheritedThemeCanOverrideSemanticTokenFontLetterSpacingLabelLarge() throws { - XCTAssertNotEqual(inheritedTheme.fontLetterSpacingLabelLarge, abstractTheme.fontLetterSpacingLabelLarge) - XCTAssertTrue(inheritedTheme.fontLetterSpacingLabelLarge == MockTheme.mockThemeFontLetterSpacingRawToken) + XCTAssertNotEqual(inheritedTheme.fonts.fontLetterSpacingLabelLarge, abstractTheme.fonts.fontLetterSpacingLabelLarge) + XCTAssertTrue(inheritedTheme.fonts.fontLetterSpacingLabelLarge == MockThemeFontSemanticTokensWrapper.mockThemeFontLetterSpacingRawToken) } func testInheritedThemeCanOverrideSemanticTokenFontLetterSpacingLabelXlarge() throws { - XCTAssertNotEqual(inheritedTheme.fontLetterSpacingLabelXlarge, abstractTheme.fontLetterSpacingLabelXlarge) - XCTAssertTrue(inheritedTheme.fontLetterSpacingLabelXlarge == MockTheme.mockThemeFontLetterSpacingRawToken) + XCTAssertNotEqual(inheritedTheme.fonts.fontLetterSpacingLabelXlarge, abstractTheme.fonts.fontLetterSpacingLabelXlarge) + XCTAssertTrue(inheritedTheme.fonts.fontLetterSpacingLabelXlarge == MockThemeFontSemanticTokensWrapper.mockThemeFontLetterSpacingRawToken) } func testInheritedThemeCanOverrideSemanticTokenFontLetterSpacingLabelMedium() throws { - XCTAssertNotEqual(inheritedTheme.fontLetterSpacingLabelMedium, abstractTheme.fontLetterSpacingLabelMedium) - XCTAssertTrue(inheritedTheme.fontLetterSpacingLabelMedium == MockTheme.mockThemeFontLetterSpacingRawToken) + XCTAssertNotEqual(inheritedTheme.fonts.fontLetterSpacingLabelMedium, abstractTheme.fonts.fontLetterSpacingLabelMedium) + XCTAssertTrue(inheritedTheme.fonts.fontLetterSpacingLabelMedium == MockThemeFontSemanticTokensWrapper.mockThemeFontLetterSpacingRawToken) } func testInheritedThemeCanOverrideSemanticTokenFontLetterSpacingLabelSmall() throws { - XCTAssertNotEqual(inheritedTheme.fontLetterSpacingLabelSmall, abstractTheme.fontLetterSpacingLabelSmall) - XCTAssertTrue(inheritedTheme.fontLetterSpacingLabelSmall == MockTheme.mockThemeFontLetterSpacingRawToken) + XCTAssertNotEqual(inheritedTheme.fonts.fontLetterSpacingLabelSmall, abstractTheme.fonts.fontLetterSpacingLabelSmall) + XCTAssertTrue(inheritedTheme.fonts.fontLetterSpacingLabelSmall == MockThemeFontSemanticTokensWrapper.mockThemeFontLetterSpacingRawToken) } func testInheritedThemeCanOverrideSemanticTokenFontLetterSpacingCodeMedium() throws { - XCTAssertNotEqual(inheritedTheme.fontLetterSpacingCodeMedium, abstractTheme.fontLetterSpacingCodeMedium) - XCTAssertTrue(inheritedTheme.fontLetterSpacingCodeMedium == MockTheme.mockThemeFontLetterSpacingRawToken) + XCTAssertNotEqual(inheritedTheme.fonts.fontLetterSpacingCodeMedium, abstractTheme.fonts.fontLetterSpacingCodeMedium) + XCTAssertTrue(inheritedTheme.fonts.fontLetterSpacingCodeMedium == MockThemeFontSemanticTokensWrapper.mockThemeFontLetterSpacingRawToken) } func testInheritedThemeCanOverrideSemanticTokenFontLetterSpacingDisplayLargeMobile() throws { - XCTAssertNotEqual(inheritedTheme.fontLetterSpacingDisplayLargeMobile, abstractTheme.fontLetterSpacingDisplayLargeMobile) - XCTAssertTrue(inheritedTheme.fontLetterSpacingDisplayLargeMobile == MockTheme.mockThemeFontLetterSpacingRawToken) + XCTAssertNotEqual(inheritedTheme.fonts.fontLetterSpacingDisplayLargeMobile, abstractTheme.fonts.fontLetterSpacingDisplayLargeMobile) + XCTAssertTrue(inheritedTheme.fonts.fontLetterSpacingDisplayLargeMobile == MockThemeFontSemanticTokensWrapper.mockThemeFontLetterSpacingRawToken) } func testInheritedThemeCanOverrideSemanticTokenFontLetterSpacingDisplayLargeTablet() throws { - XCTAssertNotEqual(inheritedTheme.fontLetterSpacingDisplayLargeTablet, abstractTheme.fontLetterSpacingDisplayLargeTablet) - XCTAssertTrue(inheritedTheme.fontLetterSpacingDisplayLargeTablet == MockTheme.mockThemeFontLetterSpacingRawToken) + XCTAssertNotEqual(inheritedTheme.fonts.fontLetterSpacingDisplayLargeTablet, abstractTheme.fonts.fontLetterSpacingDisplayLargeTablet) + XCTAssertTrue(inheritedTheme.fonts.fontLetterSpacingDisplayLargeTablet == MockThemeFontSemanticTokensWrapper.mockThemeFontLetterSpacingRawToken) } func testInheritedThemeCanOverrideSemanticTokenFontLetterSpacingDisplayMediumMobile() throws { - XCTAssertNotEqual(inheritedTheme.fontLetterSpacingDisplayMediumMobile, abstractTheme.fontLetterSpacingDisplayMediumMobile) - XCTAssertTrue(inheritedTheme.fontLetterSpacingDisplayMediumMobile == MockTheme.mockThemeFontLetterSpacingRawToken) + XCTAssertNotEqual(inheritedTheme.fonts.fontLetterSpacingDisplayMediumMobile, abstractTheme.fonts.fontLetterSpacingDisplayMediumMobile) + XCTAssertTrue(inheritedTheme.fonts.fontLetterSpacingDisplayMediumMobile == MockThemeFontSemanticTokensWrapper.mockThemeFontLetterSpacingRawToken) } func testInheritedThemeCanOverrideSemanticTokenFontLetterSpacingDisplayMediumTablet() throws { - XCTAssertNotEqual(inheritedTheme.fontLetterSpacingDisplayMediumTablet, abstractTheme.fontLetterSpacingDisplayMediumTablet) - XCTAssertTrue(inheritedTheme.fontLetterSpacingDisplayMediumTablet == MockTheme.mockThemeFontLetterSpacingRawToken) + XCTAssertNotEqual(inheritedTheme.fonts.fontLetterSpacingDisplayMediumTablet, abstractTheme.fonts.fontLetterSpacingDisplayMediumTablet) + XCTAssertTrue(inheritedTheme.fonts.fontLetterSpacingDisplayMediumTablet == MockThemeFontSemanticTokensWrapper.mockThemeFontLetterSpacingRawToken) } func testInheritedThemeCanOverrideSemanticTokenFontLetterSpacingDisplaySmallMobile() throws { - XCTAssertNotEqual(inheritedTheme.fontLetterSpacingDisplaySmallMobile, abstractTheme.fontLetterSpacingDisplaySmallMobile) - XCTAssertTrue(inheritedTheme.fontLetterSpacingDisplaySmallMobile == MockTheme.mockThemeFontLetterSpacingRawToken) + XCTAssertNotEqual(inheritedTheme.fonts.fontLetterSpacingDisplaySmallMobile, abstractTheme.fonts.fontLetterSpacingDisplaySmallMobile) + XCTAssertTrue(inheritedTheme.fonts.fontLetterSpacingDisplaySmallMobile == MockThemeFontSemanticTokensWrapper.mockThemeFontLetterSpacingRawToken) } func testInheritedThemeCanOverrideSemanticTokenFontLetterSpacingDisplaySmallTablet() throws { - XCTAssertNotEqual(inheritedTheme.fontLetterSpacingDisplaySmallTablet, abstractTheme.fontLetterSpacingDisplaySmallTablet) - XCTAssertTrue(inheritedTheme.fontLetterSpacingDisplaySmallTablet == MockTheme.mockThemeFontLetterSpacingRawToken) + XCTAssertNotEqual(inheritedTheme.fonts.fontLetterSpacingDisplaySmallTablet, abstractTheme.fonts.fontLetterSpacingDisplaySmallTablet) + XCTAssertTrue(inheritedTheme.fonts.fontLetterSpacingDisplaySmallTablet == MockThemeFontSemanticTokensWrapper.mockThemeFontLetterSpacingRawToken) } func testInheritedThemeCanOverrideSemanticTokenFontLetterSpacingHeadingLargeMobile() throws { - XCTAssertNotEqual(inheritedTheme.fontLetterSpacingHeadingLargeMobile, abstractTheme.fontLetterSpacingHeadingLargeMobile) - XCTAssertTrue(inheritedTheme.fontLetterSpacingHeadingLargeMobile == MockTheme.mockThemeFontLetterSpacingRawToken) + XCTAssertNotEqual(inheritedTheme.fonts.fontLetterSpacingHeadingLargeMobile, abstractTheme.fonts.fontLetterSpacingHeadingLargeMobile) + XCTAssertTrue(inheritedTheme.fonts.fontLetterSpacingHeadingLargeMobile == MockThemeFontSemanticTokensWrapper.mockThemeFontLetterSpacingRawToken) } func testInheritedThemeCanOverrideSemanticTokenFontLetterSpacingHeadingLargeTablet() throws { - XCTAssertNotEqual(inheritedTheme.fontLetterSpacingHeadingLargeTablet, abstractTheme.fontLetterSpacingHeadingLargeTablet) - XCTAssertTrue(inheritedTheme.fontLetterSpacingHeadingLargeTablet == MockTheme.mockThemeFontLetterSpacingRawToken) + XCTAssertNotEqual(inheritedTheme.fonts.fontLetterSpacingHeadingLargeTablet, abstractTheme.fonts.fontLetterSpacingHeadingLargeTablet) + XCTAssertTrue(inheritedTheme.fonts.fontLetterSpacingHeadingLargeTablet == MockThemeFontSemanticTokensWrapper.mockThemeFontLetterSpacingRawToken) } func testInheritedThemeCanOverrideSemanticTokenFontLetterSpacingHeadingMediumMobile() throws { - XCTAssertNotEqual(inheritedTheme.fontLetterSpacingHeadingMediumMobile, abstractTheme.fontLetterSpacingHeadingMediumMobile) - XCTAssertTrue(inheritedTheme.fontLetterSpacingHeadingMediumMobile == MockTheme.mockThemeFontLetterSpacingRawToken) + XCTAssertNotEqual(inheritedTheme.fonts.fontLetterSpacingHeadingMediumMobile, abstractTheme.fonts.fontLetterSpacingHeadingMediumMobile) + XCTAssertTrue(inheritedTheme.fonts.fontLetterSpacingHeadingMediumMobile == MockThemeFontSemanticTokensWrapper.mockThemeFontLetterSpacingRawToken) } func testInheritedThemeCanOverrideSemanticTokenFontLetterSpacingHeadingMediumTablet() throws { - XCTAssertNotEqual(inheritedTheme.fontLetterSpacingHeadingMediumTablet, abstractTheme.fontLetterSpacingHeadingMediumTablet) - XCTAssertTrue(inheritedTheme.fontLetterSpacingHeadingMediumTablet == MockTheme.mockThemeFontLetterSpacingRawToken) + XCTAssertNotEqual(inheritedTheme.fonts.fontLetterSpacingHeadingMediumTablet, abstractTheme.fonts.fontLetterSpacingHeadingMediumTablet) + XCTAssertTrue(inheritedTheme.fonts.fontLetterSpacingHeadingMediumTablet == MockThemeFontSemanticTokensWrapper.mockThemeFontLetterSpacingRawToken) } func testInheritedThemeCanOverrideSemanticTokenFontLetterSpacingHeadingSmallMobile() throws { - XCTAssertNotEqual(inheritedTheme.fontLetterSpacingHeadingSmallMobile, abstractTheme.fontLetterSpacingHeadingSmallMobile) - XCTAssertTrue(inheritedTheme.fontLetterSpacingHeadingSmallMobile == MockTheme.mockThemeFontLetterSpacingRawToken) + XCTAssertNotEqual(inheritedTheme.fonts.fontLetterSpacingHeadingSmallMobile, abstractTheme.fonts.fontLetterSpacingHeadingSmallMobile) + XCTAssertTrue(inheritedTheme.fonts.fontLetterSpacingHeadingSmallMobile == MockThemeFontSemanticTokensWrapper.mockThemeFontLetterSpacingRawToken) } func testInheritedThemeCanOverrideSemanticTokenFontLetterSpacingHeadingSmallTablet() throws { - XCTAssertNotEqual(inheritedTheme.fontLetterSpacingHeadingSmallTablet, abstractTheme.fontLetterSpacingHeadingSmallTablet) - XCTAssertTrue(inheritedTheme.fontLetterSpacingHeadingSmallTablet == MockTheme.mockThemeFontLetterSpacingRawToken) + XCTAssertNotEqual(inheritedTheme.fonts.fontLetterSpacingHeadingSmallTablet, abstractTheme.fonts.fontLetterSpacingHeadingSmallTablet) + XCTAssertTrue(inheritedTheme.fonts.fontLetterSpacingHeadingSmallTablet == MockThemeFontSemanticTokensWrapper.mockThemeFontLetterSpacingRawToken) } func testInheritedThemeCanOverrideSemanticTokenFontLetterSpacingBodyLargeMobile() throws { - XCTAssertNotEqual(inheritedTheme.fontLetterSpacingBodyLargeMobile, abstractTheme.fontLetterSpacingBodyLargeMobile) - XCTAssertTrue(inheritedTheme.fontLetterSpacingBodyLargeMobile == MockTheme.mockThemeFontLetterSpacingRawToken) + XCTAssertNotEqual(inheritedTheme.fonts.fontLetterSpacingBodyLargeMobile, abstractTheme.fonts.fontLetterSpacingBodyLargeMobile) + XCTAssertTrue(inheritedTheme.fonts.fontLetterSpacingBodyLargeMobile == MockThemeFontSemanticTokensWrapper.mockThemeFontLetterSpacingRawToken) } func testInheritedThemeCanOverrideSemanticTokenFontLetterSpacingBodyLargeTablet() throws { - XCTAssertNotEqual(inheritedTheme.fontLetterSpacingBodyLargeTablet, abstractTheme.fontLetterSpacingBodyLargeTablet) - XCTAssertTrue(inheritedTheme.fontLetterSpacingBodyLargeTablet == MockTheme.mockThemeFontLetterSpacingRawToken) + XCTAssertNotEqual(inheritedTheme.fonts.fontLetterSpacingBodyLargeTablet, abstractTheme.fonts.fontLetterSpacingBodyLargeTablet) + XCTAssertTrue(inheritedTheme.fonts.fontLetterSpacingBodyLargeTablet == MockThemeFontSemanticTokensWrapper.mockThemeFontLetterSpacingRawToken) } func testInheritedThemeCanOverrideSemanticTokenFontLetterSpacingBodyMediumMobile() throws { - XCTAssertNotEqual(inheritedTheme.fontLetterSpacingBodyMediumMobile, abstractTheme.fontLetterSpacingBodyMediumMobile) - XCTAssertTrue(inheritedTheme.fontLetterSpacingBodyMediumMobile == MockTheme.mockThemeFontLetterSpacingRawToken) + XCTAssertNotEqual(inheritedTheme.fonts.fontLetterSpacingBodyMediumMobile, abstractTheme.fonts.fontLetterSpacingBodyMediumMobile) + XCTAssertTrue(inheritedTheme.fonts.fontLetterSpacingBodyMediumMobile == MockThemeFontSemanticTokensWrapper.mockThemeFontLetterSpacingRawToken) } func testInheritedThemeCanOverrideSemanticTokenFontLetterSpacingBodyMediumTablet() throws { - XCTAssertNotEqual(inheritedTheme.fontLetterSpacingBodyMediumTablet, abstractTheme.fontLetterSpacingBodyMediumTablet) - XCTAssertTrue(inheritedTheme.fontLetterSpacingBodyMediumTablet == MockTheme.mockThemeFontLetterSpacingRawToken) + XCTAssertNotEqual(inheritedTheme.fonts.fontLetterSpacingBodyMediumTablet, abstractTheme.fonts.fontLetterSpacingBodyMediumTablet) + XCTAssertTrue(inheritedTheme.fonts.fontLetterSpacingBodyMediumTablet == MockThemeFontSemanticTokensWrapper.mockThemeFontLetterSpacingRawToken) } func testInheritedThemeCanOverrideSemanticTokenFontLetterSpacingBodySmallMobile() throws { - XCTAssertNotEqual(inheritedTheme.fontLetterSpacingBodySmallMobile, abstractTheme.fontLetterSpacingBodySmallMobile) - XCTAssertTrue(inheritedTheme.fontLetterSpacingBodySmallMobile == MockTheme.mockThemeFontLetterSpacingRawToken) + XCTAssertNotEqual(inheritedTheme.fonts.fontLetterSpacingBodySmallMobile, abstractTheme.fonts.fontLetterSpacingBodySmallMobile) + XCTAssertTrue(inheritedTheme.fonts.fontLetterSpacingBodySmallMobile == MockThemeFontSemanticTokensWrapper.mockThemeFontLetterSpacingRawToken) } func testInheritedThemeCanOverrideSemanticTokenFontLetterSpacingBodySmallTablet() throws { - XCTAssertNotEqual(inheritedTheme.fontLetterSpacingBodySmallTablet, abstractTheme.fontLetterSpacingBodySmallTablet) - XCTAssertTrue(inheritedTheme.fontLetterSpacingBodySmallTablet == MockTheme.mockThemeFontLetterSpacingRawToken) + XCTAssertNotEqual(inheritedTheme.fonts.fontLetterSpacingBodySmallTablet, abstractTheme.fonts.fontLetterSpacingBodySmallTablet) + XCTAssertTrue(inheritedTheme.fonts.fontLetterSpacingBodySmallTablet == MockThemeFontSemanticTokensWrapper.mockThemeFontLetterSpacingRawToken) } // MARK: - Semantic token - Typography - Font - Line height func testInheritedThemeCanOverrideSemanticTokenFontLineHeightLabelXlarge() throws { - XCTAssertNotEqual(inheritedTheme.fontLineHeightLabelXlarge, abstractTheme.fontLineHeightLabelXlarge) - XCTAssertTrue(inheritedTheme.fontLineHeightLabelXlarge == MockTheme.mockThemeFontLineHeightRawToken) + XCTAssertNotEqual(inheritedTheme.fonts.fontLineHeightLabelXlarge, abstractTheme.fonts.fontLineHeightLabelXlarge) + XCTAssertTrue(inheritedTheme.fonts.fontLineHeightLabelXlarge == MockThemeFontSemanticTokensWrapper.mockThemeFontLineHeightRawToken) } func testInheritedThemeCanOverrideSemanticTokenFontLineHeightLabelLarge() throws { - XCTAssertNotEqual(inheritedTheme.fontLineHeightLabelLarge, abstractTheme.fontLineHeightLabelLarge) - XCTAssertTrue(inheritedTheme.fontLineHeightLabelLarge == MockTheme.mockThemeFontLineHeightRawToken) + XCTAssertNotEqual(inheritedTheme.fonts.fontLineHeightLabelLarge, abstractTheme.fonts.fontLineHeightLabelLarge) + XCTAssertTrue(inheritedTheme.fonts.fontLineHeightLabelLarge == MockThemeFontSemanticTokensWrapper.mockThemeFontLineHeightRawToken) } func testInheritedThemeCanOverrideSemanticTokenFontLineHeightLabelMedium() throws { - XCTAssertNotEqual(inheritedTheme.fontLineHeightLabelMedium, abstractTheme.fontLineHeightLabelMedium) - XCTAssertTrue(inheritedTheme.fontLineHeightLabelMedium == MockTheme.mockThemeFontLineHeightRawToken) + XCTAssertNotEqual(inheritedTheme.fonts.fontLineHeightLabelMedium, abstractTheme.fonts.fontLineHeightLabelMedium) + XCTAssertTrue(inheritedTheme.fonts.fontLineHeightLabelMedium == MockThemeFontSemanticTokensWrapper.mockThemeFontLineHeightRawToken) } func testInheritedThemeCanOverrideSemanticTokenFontLineHeightLabelSmall() throws { - XCTAssertNotEqual(inheritedTheme.fontLineHeightLabelSmall, abstractTheme.fontLineHeightLabelSmall) - XCTAssertTrue(inheritedTheme.fontLineHeightLabelSmall == MockTheme.mockThemeFontLineHeightRawToken) + XCTAssertNotEqual(inheritedTheme.fonts.fontLineHeightLabelSmall, abstractTheme.fonts.fontLineHeightLabelSmall) + XCTAssertTrue(inheritedTheme.fonts.fontLineHeightLabelSmall == MockThemeFontSemanticTokensWrapper.mockThemeFontLineHeightRawToken) } func testInheritedThemeCanOverrideSemanticTokenFontLineHeightCodeMedium() throws { - XCTAssertNotEqual(inheritedTheme.fontLineHeightCodeMedium, abstractTheme.fontLineHeightCodeMedium) - XCTAssertTrue(inheritedTheme.fontLineHeightCodeMedium == MockTheme.mockThemeFontLineHeightRawToken) + XCTAssertNotEqual(inheritedTheme.fonts.fontLineHeightCodeMedium, abstractTheme.fonts.fontLineHeightCodeMedium) + XCTAssertTrue(inheritedTheme.fonts.fontLineHeightCodeMedium == MockThemeFontSemanticTokensWrapper.mockThemeFontLineHeightRawToken) } func testInheritedThemeCanOverrideSemanticTokenFontLineHeightDisplayLargeMobile() throws { - XCTAssertNotEqual(inheritedTheme.fontLineHeightDisplayLargeMobile, abstractTheme.fontLineHeightDisplayLargeMobile) - XCTAssertTrue(inheritedTheme.fontLineHeightDisplayLargeMobile == MockTheme.mockThemeFontLineHeightRawToken) + XCTAssertNotEqual(inheritedTheme.fonts.fontLineHeightDisplayLargeMobile, abstractTheme.fonts.fontLineHeightDisplayLargeMobile) + XCTAssertTrue(inheritedTheme.fonts.fontLineHeightDisplayLargeMobile == MockThemeFontSemanticTokensWrapper.mockThemeFontLineHeightRawToken) } func testInheritedThemeCanOverrideSemanticTokenFontLineHeightDisplayLargeTablet() throws { - XCTAssertNotEqual(inheritedTheme.fontLineHeightDisplayLargeTablet, abstractTheme.fontLineHeightDisplayLargeTablet) - XCTAssertTrue(inheritedTheme.fontLineHeightDisplayLargeTablet == MockTheme.mockThemeFontLineHeightRawToken) + XCTAssertNotEqual(inheritedTheme.fonts.fontLineHeightDisplayLargeTablet, abstractTheme.fonts.fontLineHeightDisplayLargeTablet) + XCTAssertTrue(inheritedTheme.fonts.fontLineHeightDisplayLargeTablet == MockThemeFontSemanticTokensWrapper.mockThemeFontLineHeightRawToken) } func testInheritedThemeCanOverrideSemanticTokenFontLineHeightDisplayMediumMobile() throws { - XCTAssertNotEqual(inheritedTheme.fontLineHeightDisplayMediumMobile, abstractTheme.fontLineHeightDisplayMediumMobile) - XCTAssertTrue(inheritedTheme.fontLineHeightDisplayMediumMobile == MockTheme.mockThemeFontLineHeightRawToken) + XCTAssertNotEqual(inheritedTheme.fonts.fontLineHeightDisplayMediumMobile, abstractTheme.fonts.fontLineHeightDisplayMediumMobile) + XCTAssertTrue(inheritedTheme.fonts.fontLineHeightDisplayMediumMobile == MockThemeFontSemanticTokensWrapper.mockThemeFontLineHeightRawToken) } func testInheritedThemeCanOverrideSemanticTokenFontLineHeightDisplayMediumTablet() throws { - XCTAssertNotEqual(inheritedTheme.fontLineHeightDisplayMediumTablet, abstractTheme.fontLineHeightDisplayMediumTablet) - XCTAssertTrue(inheritedTheme.fontLineHeightDisplayMediumTablet == MockTheme.mockThemeFontLineHeightRawToken) + XCTAssertNotEqual(inheritedTheme.fonts.fontLineHeightDisplayMediumTablet, abstractTheme.fonts.fontLineHeightDisplayMediumTablet) + XCTAssertTrue(inheritedTheme.fonts.fontLineHeightDisplayMediumTablet == MockThemeFontSemanticTokensWrapper.mockThemeFontLineHeightRawToken) } func testInheritedThemeCanOverrideSemanticTokenFontLineHeightDisplaySmallMobile() throws { - XCTAssertNotEqual(inheritedTheme.fontLineHeightDisplaySmallMobile, abstractTheme.fontLineHeightDisplaySmallMobile) - XCTAssertTrue(inheritedTheme.fontLineHeightDisplaySmallMobile == MockTheme.mockThemeFontLineHeightRawToken) + XCTAssertNotEqual(inheritedTheme.fonts.fontLineHeightDisplaySmallMobile, abstractTheme.fonts.fontLineHeightDisplaySmallMobile) + XCTAssertTrue(inheritedTheme.fonts.fontLineHeightDisplaySmallMobile == MockThemeFontSemanticTokensWrapper.mockThemeFontLineHeightRawToken) } func testInheritedThemeCanOverrideSemanticTokenFontLineHeightDisplaySmallTablet() throws { - XCTAssertNotEqual(inheritedTheme.fontLineHeightDisplaySmallTablet, abstractTheme.fontLineHeightDisplaySmallTablet) - XCTAssertTrue(inheritedTheme.fontLineHeightDisplaySmallTablet == MockTheme.mockThemeFontLineHeightRawToken) + XCTAssertNotEqual(inheritedTheme.fonts.fontLineHeightDisplaySmallTablet, abstractTheme.fonts.fontLineHeightDisplaySmallTablet) + XCTAssertTrue(inheritedTheme.fonts.fontLineHeightDisplaySmallTablet == MockThemeFontSemanticTokensWrapper.mockThemeFontLineHeightRawToken) } func testInheritedThemeCanOverrideSemanticTokenFontLineHeightHeadingLargeMobile() throws { - XCTAssertNotEqual(inheritedTheme.fontLineHeightHeadingLargeMobile, abstractTheme.fontLineHeightHeadingLargeMobile) - XCTAssertTrue(inheritedTheme.fontLineHeightHeadingLargeMobile == MockTheme.mockThemeFontLineHeightRawToken) + XCTAssertNotEqual(inheritedTheme.fonts.fontLineHeightHeadingLargeMobile, abstractTheme.fonts.fontLineHeightHeadingLargeMobile) + XCTAssertTrue(inheritedTheme.fonts.fontLineHeightHeadingLargeMobile == MockThemeFontSemanticTokensWrapper.mockThemeFontLineHeightRawToken) } func testInheritedThemeCanOverrideSemanticTokenFontLineHeightHeadingLargeTablet() throws { - XCTAssertNotEqual(inheritedTheme.fontLineHeightHeadingLargeTablet, abstractTheme.fontLineHeightHeadingLargeTablet) - XCTAssertTrue(inheritedTheme.fontLineHeightHeadingLargeTablet == MockTheme.mockThemeFontLineHeightRawToken) + XCTAssertNotEqual(inheritedTheme.fonts.fontLineHeightHeadingLargeTablet, abstractTheme.fonts.fontLineHeightHeadingLargeTablet) + XCTAssertTrue(inheritedTheme.fonts.fontLineHeightHeadingLargeTablet == MockThemeFontSemanticTokensWrapper.mockThemeFontLineHeightRawToken) } func testInheritedThemeCanOverrideSemanticTokenFontLineHeightHeadingMediumMobile() throws { - XCTAssertNotEqual(inheritedTheme.fontLineHeightHeadingMediumMobile, abstractTheme.fontLineHeightHeadingMediumMobile) - XCTAssertTrue(inheritedTheme.fontLineHeightHeadingMediumMobile == MockTheme.mockThemeFontLineHeightRawToken) + XCTAssertNotEqual(inheritedTheme.fonts.fontLineHeightHeadingMediumMobile, abstractTheme.fonts.fontLineHeightHeadingMediumMobile) + XCTAssertTrue(inheritedTheme.fonts.fontLineHeightHeadingMediumMobile == MockThemeFontSemanticTokensWrapper.mockThemeFontLineHeightRawToken) } func testInheritedThemeCanOverrideSemanticTokenFontLineHeightHeadingMediumTablet() throws { - XCTAssertNotEqual(inheritedTheme.fontLineHeightHeadingMediumTablet, abstractTheme.fontLineHeightHeadingMediumTablet) - XCTAssertTrue(inheritedTheme.fontLineHeightHeadingMediumTablet == MockTheme.mockThemeFontLineHeightRawToken) + XCTAssertNotEqual(inheritedTheme.fonts.fontLineHeightHeadingMediumTablet, abstractTheme.fonts.fontLineHeightHeadingMediumTablet) + XCTAssertTrue(inheritedTheme.fonts.fontLineHeightHeadingMediumTablet == MockThemeFontSemanticTokensWrapper.mockThemeFontLineHeightRawToken) } func testInheritedThemeCanOverrideSemanticTokenFontLineHeightHeadingSmallMobile() throws { - XCTAssertNotEqual(inheritedTheme.fontLineHeightHeadingSmallMobile, abstractTheme.fontLineHeightHeadingSmallMobile) - XCTAssertTrue(inheritedTheme.fontLineHeightHeadingSmallMobile == MockTheme.mockThemeFontLineHeightRawToken) + XCTAssertNotEqual(inheritedTheme.fonts.fontLineHeightHeadingSmallMobile, abstractTheme.fonts.fontLineHeightHeadingSmallMobile) + XCTAssertTrue(inheritedTheme.fonts.fontLineHeightHeadingSmallMobile == MockThemeFontSemanticTokensWrapper.mockThemeFontLineHeightRawToken) } func testInheritedThemeCanOverrideSemanticTokenFontLineHeightHeadingSmallTablet() throws { - XCTAssertNotEqual(inheritedTheme.fontLineHeightHeadingSmallTablet, abstractTheme.fontLineHeightHeadingSmallTablet) - XCTAssertTrue(inheritedTheme.fontLineHeightHeadingSmallTablet == MockTheme.mockThemeFontLineHeightRawToken) + XCTAssertNotEqual(inheritedTheme.fonts.fontLineHeightHeadingSmallTablet, abstractTheme.fonts.fontLineHeightHeadingSmallTablet) + XCTAssertTrue(inheritedTheme.fonts.fontLineHeightHeadingSmallTablet == MockThemeFontSemanticTokensWrapper.mockThemeFontLineHeightRawToken) } func testInheritedThemeCanOverrideSemanticTokenFontLineHeightBodyLargeMobile() throws { - XCTAssertNotEqual(inheritedTheme.fontLineHeightBodyLargeMobile, abstractTheme.fontLineHeightBodyLargeMobile) - XCTAssertTrue(inheritedTheme.fontLineHeightBodyLargeMobile == MockTheme.mockThemeFontLineHeightRawToken) + XCTAssertNotEqual(inheritedTheme.fonts.fontLineHeightBodyLargeMobile, abstractTheme.fonts.fontLineHeightBodyLargeMobile) + XCTAssertTrue(inheritedTheme.fonts.fontLineHeightBodyLargeMobile == MockThemeFontSemanticTokensWrapper.mockThemeFontLineHeightRawToken) } func testInheritedThemeCanOverrideSemanticTokenFontLineHeightBodyLargeTablet() throws { - XCTAssertNotEqual(inheritedTheme.fontLineHeightBodyLargeTablet, abstractTheme.fontLineHeightBodyLargeTablet) - XCTAssertTrue(inheritedTheme.fontLineHeightBodyLargeTablet == MockTheme.mockThemeFontLineHeightRawToken) + XCTAssertNotEqual(inheritedTheme.fonts.fontLineHeightBodyLargeTablet, abstractTheme.fonts.fontLineHeightBodyLargeTablet) + XCTAssertTrue(inheritedTheme.fonts.fontLineHeightBodyLargeTablet == MockThemeFontSemanticTokensWrapper.mockThemeFontLineHeightRawToken) } func testInheritedThemeCanOverrideSemanticTokenFontLineHeightBodyMediumMobile() throws { - XCTAssertNotEqual(inheritedTheme.fontLineHeightBodyMediumMobile, abstractTheme.fontLineHeightBodyMediumMobile) - XCTAssertTrue(inheritedTheme.fontLineHeightBodyMediumMobile == MockTheme.mockThemeFontLineHeightRawToken) + XCTAssertNotEqual(inheritedTheme.fonts.fontLineHeightBodyMediumMobile, abstractTheme.fonts.fontLineHeightBodyMediumMobile) + XCTAssertTrue(inheritedTheme.fonts.fontLineHeightBodyMediumMobile == MockThemeFontSemanticTokensWrapper.mockThemeFontLineHeightRawToken) } func testInheritedThemeCanOverrideSemanticTokenFontLineHeightBodyMediumTablet() throws { - XCTAssertNotEqual(inheritedTheme.fontLineHeightBodyMediumTablet, abstractTheme.fontLineHeightBodyMediumTablet) - XCTAssertTrue(inheritedTheme.fontLineHeightBodyMediumTablet == MockTheme.mockThemeFontLineHeightRawToken) + XCTAssertNotEqual(inheritedTheme.fonts.fontLineHeightBodyMediumTablet, abstractTheme.fonts.fontLineHeightBodyMediumTablet) + XCTAssertTrue(inheritedTheme.fonts.fontLineHeightBodyMediumTablet == MockThemeFontSemanticTokensWrapper.mockThemeFontLineHeightRawToken) } func testInheritedThemeCanOverrideSemanticTokenFontLineHeightBodySmallMobile() throws { - XCTAssertNotEqual(inheritedTheme.fontLineHeightBodySmallMobile, abstractTheme.fontLineHeightBodySmallMobile) - XCTAssertTrue(inheritedTheme.fontLineHeightBodySmallMobile == MockTheme.mockThemeFontLineHeightRawToken) + XCTAssertNotEqual(inheritedTheme.fonts.fontLineHeightBodySmallMobile, abstractTheme.fonts.fontLineHeightBodySmallMobile) + XCTAssertTrue(inheritedTheme.fonts.fontLineHeightBodySmallMobile == MockThemeFontSemanticTokensWrapper.mockThemeFontLineHeightRawToken) } func testInheritedThemeCanOverrideSemanticTokenFontLineHeightBodySmallTablet() throws { - XCTAssertNotEqual(inheritedTheme.fontLineHeightBodySmallTablet, abstractTheme.fontLineHeightBodySmallTablet) - XCTAssertTrue(inheritedTheme.fontLineHeightBodySmallTablet == MockTheme.mockThemeFontLineHeightRawToken) + XCTAssertNotEqual(inheritedTheme.fonts.fontLineHeightBodySmallTablet, abstractTheme.fonts.fontLineHeightBodySmallTablet) + XCTAssertTrue(inheritedTheme.fonts.fontLineHeightBodySmallTablet == MockThemeFontSemanticTokensWrapper.mockThemeFontLineHeightRawToken) } } diff --git a/OUDS/Core/Themes/Orange/Sources/OrangeTheme.swift b/OUDS/Core/Themes/Orange/Sources/OrangeTheme.swift index dbd15c260f..9ea6c49c0f 100644 --- a/OUDS/Core/Themes/Orange/Sources/OrangeTheme.swift +++ b/OUDS/Core/Themes/Orange/Sources/OrangeTheme.swift @@ -40,14 +40,17 @@ open class OrangeTheme: OUDSTheme, @unchecked Sendable { /// - opacities: An object providing all the opacity semantic tokens, as `OpacitySemanticTokens` implementation /// - colors: An object providing all the color semantic tokens, as `AllColorSemanticTokens` implementation /// - elevations: An object providing all the elevation semantic tokens, by default `AllElevationSemanticTokens` + /// - fonts: An object providing all the font semantic tokens, by default `AllFontemanticTokens` override public init(borders: AllBorderSemanticTokens, opacities: AllOpacitySemanticTokens, colors: AllColorSemanticTokens, - elevations: AllElevationSemanticTokens) { + elevations: AllElevationSemanticTokens, + fonts: AllFontSemanticTokens) { super.init(borders: borders, opacities: opacities, colors: colors, - elevations: elevations) + elevations: elevations, + fonts: fonts) } deinit { } diff --git a/OUDS/Core/Tokens/SemanticTokens/Sources/Wrappers/OUDSFontSemanticTokensWrapper.swift b/OUDS/Core/Tokens/SemanticTokens/Sources/Wrappers/OUDSFontSemanticTokensWrapper.swift new file mode 100644 index 0000000000..18e5c9bb08 --- /dev/null +++ b/OUDS/Core/Tokens/SemanticTokens/Sources/Wrappers/OUDSFontSemanticTokensWrapper.swift @@ -0,0 +1,31 @@ +// +// Software Name: OUDS iOS +// SPDX-FileCopyrightText: Copyright (c) Orange SA +// SPDX-License-Identifier: MIT +// +// This software is distributed under the MIT license, +// the text of which is available at https://opensource.org/license/MIT/ +// or see the "LICENSE" file for more details. +// +// Authors: See CONTRIBUTORS.txt +// Software description: A SwiftUI components library with code examples for Orange Unified Design System +// + +/// A class which wraps all **font semantic tokens**, *multiple*, *composite* or not, and expose them. +/// This wrapper should be integrated as a ``AllFontSemanticTokens`` implementation inside `OUDSTheme` so as to provide +/// all tokens to the users. +open class OUDSFontSemanticTokensWrapper { + + /// Intializes the wrapper + public init() { } + + deinit{ } + + // ଘ( ・ω・)_/゚・:*:・。☆ + // Note: So as to help the integration of generated code produced by the tokenator + // the implemention of FontSemanticTokens, FontCompositeSemanticTokens, FontMultipleSemanticTokens are not here + // but in OUDS/OUDSTheme/OUDSTheme+SemanticTokens/OUDSTheme+FontSemanticTokens.swift, + // in OUDS/OUDSTheme/OUDSTheme+SemanticTokens/OUDSTheme+FontCompositeSemanticTokens.swift, + // and in OUDS/OUDSTheme/OUDSTheme+SemanticTokens/OUDSTheme+FontMultipleSemanticTokens.swift. + // This declaration of OUDSFontSemanticTokensWrapper is here to allow to write documentation. +} diff --git a/OUDS/Core/Tokens/SemanticTokens/Sources/Wrappers/SemanticTokensWrappers+TypeAliases.swift b/OUDS/Core/Tokens/SemanticTokens/Sources/Wrappers/SemanticTokensWrappers+TypeAliases.swift index cd276451b7..66b6066f2a 100644 --- a/OUDS/Core/Tokens/SemanticTokens/Sources/Wrappers/SemanticTokensWrappers+TypeAliases.swift +++ b/OUDS/Core/Tokens/SemanticTokens/Sources/Wrappers/SemanticTokensWrappers+TypeAliases.swift @@ -28,3 +28,8 @@ public typealias AllColorSemanticTokens = ColorSemanticTokens & ColorMultipleSem /// It helps in the end to define a wrapper for all the semantic tokens of elevations, multiple or not, generated or not. /// For example ``OUDSElevationSemanticTokensWrapper`` uses this type alias. public typealias AllElevationSemanticTokens = ElevationSemanticTokens & ElevationCompositeSemanticTokens & ElevationMultipleSemanticTokens + +/// A type alias which merges ``FontSemanticTokens``, ``FontCompositeSemanticTokens`` and ``FontMultipleSemanticTokens``. +/// It helps in the end to define a wrapper for all the semantic tokens of fonts, multiple, composite, or not, generated or not. +/// For example ``OUDSFontSemanticTokensWrapper`` uses this type alias. +public typealias AllFontSemanticTokens = FontSemanticTokens & FontCompositeSemanticTokens & FontMultipleSemanticTokens diff --git a/Showcase/Showcase/Pages/Tokens/Font/NamedFont/NamedFont.swift b/Showcase/Showcase/Pages/Tokens/Font/NamedFont/NamedFont.swift index 21d3819407..92981c91e3 100644 --- a/Showcase/Showcase/Pages/Tokens/Font/NamedFont/NamedFont.swift +++ b/Showcase/Showcase/Pages/Tokens/Font/NamedFont/NamedFont.swift @@ -47,51 +47,51 @@ enum NamedFont: String, CaseIterable { func token(from theme: OUDSTheme) -> MultipleFontCompositeRawTokens { switch self { case .displayLarge: - return theme.typeDisplayLarge + return theme.fonts.typeDisplayLarge case .displayMedium: - return theme.typeDisplayMedium + return theme.fonts.typeDisplayMedium case .displaySmall: - return theme.typeDisplaySmall + return theme.fonts.typeDisplaySmall case .headingXLarge: - return theme.typeHeadingXLarge + return theme.fonts.typeHeadingXLarge case .headingLarge: - return theme.typeHeadingLarge + return theme.fonts.typeHeadingLarge case .headingMedium: - return theme.typeHeadingMedium + return theme.fonts.typeHeadingMedium case .headingSmall: - return theme.typeHeadingSmall + return theme.fonts.typeHeadingSmall case .bodyDefaultLarge: - return theme.typeBodyDefaultLarge + return theme.fonts.typeBodyDefaultLarge case .bodyDefaultMedium: - return theme.typeBodyDefaultMedium + return theme.fonts.typeBodyDefaultMedium case .bodyDefaultSmall: - return theme.typeBodyDefaultSmall + return theme.fonts.typeBodyDefaultSmall case .bodyStrongLarge: - return theme.typeBodyStrongLarge + return theme.fonts.typeBodyStrongLarge case .bodyStrongMedium: - return theme.typeBodyStrongMedium + return theme.fonts.typeBodyStrongMedium case .bodyStrongSmall: - return theme.typeBodyStrongSmall + return theme.fonts.typeBodyStrongSmall case .labelDefaultXLarge: - return theme.typeLabelDefaultXLarge + return theme.fonts.typeLabelDefaultXLarge case .labelDefaultLarge: - return theme.typeLabelDefaultLarge + return theme.fonts.typeLabelDefaultLarge case .labelDefaultMedium: - return theme.typeLabelDefaultMedium + return theme.fonts.typeLabelDefaultMedium case .labelDefaultSmall: - return theme.typeLabelDefaultSmall + return theme.fonts.typeLabelDefaultSmall case .labelStrongXLarge: - return theme.typeLabelStrongXLarge + return theme.fonts.typeLabelStrongXLarge case .labelStrongLarge: - return theme.typeLabelStrongLarge + return theme.fonts.typeLabelStrongLarge case .labelStrongMedium: - return theme.typeLabelStrongMedium + return theme.fonts.typeLabelStrongMedium case .labelStrongSmall: - return theme.typeLabelStrongSmall + return theme.fonts.typeLabelStrongSmall case .codeSmall: - return theme.typeCodeSmall + return theme.fonts.typeCodeSmall case .codeMedium: - return theme.typeCodeMedium + return theme.fonts.typeCodeMedium } } }