diff --git a/tests/screenshot/apps/components/ActionGuide.js b/tests/screenshot/apps/components/ActionGuide.js index da57c8339..57f64389b 100644 --- a/tests/screenshot/apps/components/ActionGuide.js +++ b/tests/screenshot/apps/components/ActionGuide.js @@ -1,6 +1,6 @@ import ActionGuide from '../../../../ActionGuide'; -import {withConfig} from './utils'; +import {withConfig, withTallglyphLocale} from './utils'; const actionGuideSmokeTests = [ This is some text, @@ -10,7 +10,7 @@ const actionGuideSmokeTests = [ const ActionGuideTests = [ ...actionGuideSmokeTests, - ...withConfig({locale: 'vi-VN'}, actionGuideSmokeTests), // Tallglyph validation + ...withTallglyphLocale(actionGuideSmokeTests), ...withConfig({locale: 'ar-SA'}, actionGuideSmokeTests), ...withConfig({skinVariants: ['largeText']}, actionGuideSmokeTests) // Large Text ]; diff --git a/tests/screenshot/apps/components/Alert.js b/tests/screenshot/apps/components/Alert.js index b0c5a372f..233a4ab0c 100644 --- a/tests/screenshot/apps/components/Alert.js +++ b/tests/screenshot/apps/components/Alert.js @@ -9,7 +9,7 @@ import Scroller from '../../../../Scroller'; import img from '../../images/300x300.png'; -import {withConfig, withProps, LoremString} from './utils'; +import {withConfig, withProps, withTallglyphLocale, LoremString} from './utils'; import css from './Alert.module.less'; @@ -311,7 +311,7 @@ const alertPortraitTests = [ const AlertTests = [ ...alertQwtcTests, ...alertExtendedTests, - ...withConfig({locale: 'vi-VN'}, alertTallglyphTests), + ...withTallglyphLocale(alertTallglyphTests), ...withConfig({locale: 'ar-SA'}, alertRtlTests), ...withConfig({portrait: true}, alertPortraitTests) ]; diff --git a/tests/screenshot/apps/components/BodyText.js b/tests/screenshot/apps/components/BodyText.js index 4bc09a17c..fca4e604f 100644 --- a/tests/screenshot/apps/components/BodyText.js +++ b/tests/screenshot/apps/components/BodyText.js @@ -1,6 +1,6 @@ import BodyText from '../../../../BodyText'; -import {withConfig, LoremString} from './utils'; +import {withConfig, withTallglyphLocale, LoremString} from './utils'; const bodyTextSmokeTests = [ This is some text, // [QWTC - 2022] @@ -31,15 +31,17 @@ const bodyTextLocaleSmokeTests = [ This is some text // [QWTC - 2026] ]; +const bodyTextTallglyphTests = [ + RTL sample, // [QWTC - 2022] + RTL sample small // [QWTC - 2023] +]; + const BodyTextTests = [ ...bodyTextSmokeTests, ...bodyTextQwtcTests, // Tallglyph validation - ...withConfig({locale: 'vi-VN'}, [ - RTL sample, // [QWTC - 2022] - RTL sample small // [QWTC - 2023] - ]), + ...withTallglyphLocale(bodyTextTallglyphTests), ...withConfig({locale: 'ar-SA'}, bodyTextLocaleSmokeTests), ...withConfig({skinVariants: ['largeText']}, bodyTextLocaleSmokeTests) diff --git a/tests/screenshot/apps/components/Button.js b/tests/screenshot/apps/components/Button.js index 1b9759edb..1964987b5 100644 --- a/tests/screenshot/apps/components/Button.js +++ b/tests/screenshot/apps/components/Button.js @@ -1,6 +1,6 @@ import Button from '../../../../Button'; -import {withConfig, withProps} from './utils'; +import {withConfig, withProps, withTallglyphLocale, TallglyphKhmer, TallglyphLatin, TallglyphMultiScript} from './utils'; import css from './Button.module.less'; @@ -32,7 +32,7 @@ const buttonSmokeTests = [ ]; -const buttonCommentedTests = [ +const buttonExtendedTests = [ // iconPosition = before (Default) + small (default) + large // Leaving size small here as example, but it is not required since it is the default. , @@ -162,10 +162,10 @@ const buttonQwtcTests = [ , // [QWTC-1837] - , - , + , + , , - , + , // end [QWTC-1837] , // [QWTC-1828] @@ -228,33 +228,29 @@ const buttonRtlTests = [ ]; +const buttonTallglyphViTests = [ + , + , + , + +]; + +const buttonTallglyphKmTests = [ + , + , + +]; + const ButtonTests = [ ...buttonSmokeTests, ...buttonQwtcTests, - ...buttonCommentedTests, + ...buttonExtendedTests, ...withConfig({focus: true, wrapper: {light: true, padded: true}}, buttonFocusTests), - // ************************************************************* - // Tallglyph validation - // locale = 'vi-VN' - // ************************************************************* - ...withConfig({locale: 'vi-VN'}, [ - , - , - , - - ]), - - // ************************************************************* // Tallglyph validation - // locale = 'km-KH' - // ************************************************************* - ...withConfig({locale: 'km-KH'}, [ - , - , - - ]), + ...withTallglyphLocale(buttonTallglyphViTests), + ...withConfig({locale: 'km-KH'}, buttonTallglyphKmTests), // ************************************************************* // RTL diff --git a/tests/screenshot/apps/components/Card.js b/tests/screenshot/apps/components/Card.js index a18a90fa5..74eb67107 100644 --- a/tests/screenshot/apps/components/Card.js +++ b/tests/screenshot/apps/components/Card.js @@ -2,7 +2,7 @@ import Card from '../../../../Card'; import Icon from '../../../../Icon'; import Image from '../../../../Image'; -import {withConfig, withProps} from './utils'; +import {withConfig, withProps, withTallglyphLocale, TallglyphLatin, TallglyphMultiScript} from './utils'; import img from '../../images/600x600.png'; @@ -81,7 +81,7 @@ const cardSmokeTests = [ ...defaultCardTests.slice(36, 41) ]; -const cardCommentedTests = [ +const cardExtendedTests = [ // Disabled ...withProps({disabled: true}, defaultCardTests), @@ -110,12 +110,18 @@ const cardLargeTextTests = [ ...withConfig({skinVariants: ['largeText']}, defaultCardTests) ]; +const cardTallglyphTests = [ + {TallglyphMultiScript}, + {TallglyphLatin} +]; + const CardTests = [ ...defaultCardTests, ...newTypeCardTests, - ...cardCommentedTests, + ...cardExtendedTests, ...cardFocusTests, - ...cardLargeTextTests + ...cardLargeTextTests, + ...withTallglyphLocale(cardTallglyphTests) ]; export default CardTests; diff --git a/tests/screenshot/apps/components/CheckboxItem.js b/tests/screenshot/apps/components/CheckboxItem.js index 123e77d9d..643307a3e 100644 --- a/tests/screenshot/apps/components/CheckboxItem.js +++ b/tests/screenshot/apps/components/CheckboxItem.js @@ -1,7 +1,7 @@ import Icon from '../../../../Icon'; import CheckboxItem from '../../../../CheckboxItem'; -import {withConfig} from './utils'; +import {withConfig, withTallglyphLocale, TallglyphLatin, TallglyphMultiScript} from './utils'; const checkboxItemSmokeTests = [ , @@ -110,21 +110,27 @@ const checkboxItemRtlTests = [ CheckboxItem Checked ]; -const checkboxItemCommentedTests = [ +const checkboxItemExtendedTests = [ ...checkboxItemFormCheckboxTests, ...checkboxItemIconSlotBeforeTests, ...checkboxItemCenteredTests, ...checkboxItemLabelPositionTests ]; +const checkboxItemTallglyphTests = [ + {TallglyphMultiScript}, + {TallglyphLatin} +]; + const CheckboxItemTests = [ ...checkboxItemSmokeTests, ...checkboxItemQwtcTests, - ...checkboxItemCommentedTests, + ...checkboxItemExtendedTests, ...withConfig({focus: true}, checkboxItemFocusTests), ...withConfig({textSize: 'large'}, checkboxItemLargeTextTests), ...withConfig({locale: 'ar-SA'}, checkboxItemRtlTests), - ...withConfig({locale: 'ar-SA'}, checkboxItemCenteredRtlTests) + ...withConfig({locale: 'ar-SA'}, checkboxItemCenteredRtlTests), + ...withTallglyphLocale(checkboxItemTallglyphTests) ]; export default CheckboxItemTests; diff --git a/tests/screenshot/apps/components/Chip.js b/tests/screenshot/apps/components/Chip.js index 3cadf2f2f..7048f58c7 100644 --- a/tests/screenshot/apps/components/Chip.js +++ b/tests/screenshot/apps/components/Chip.js @@ -1,7 +1,7 @@ import {Chip} from '../../../../Chips'; import gameHomeIcon from '../../images/icon_app_game.png'; -import {withConfig} from './utils'; +import {withConfig, withTallglyphLocale, TallglyphLatin, TallglyphMultiScript} from './utils'; const chipSmokeTests = [ Default Chip, @@ -49,10 +49,16 @@ const chipLargeTextTests = [ Chip with Delete Button (Right) ]; +const chipTallglyphTests = [ + {TallglyphMultiScript}, + {TallglyphLatin} +]; + const ChipTests = [ ...chipSmokeTests, ...withConfig({focus: true}, chipFocusTests), - ...withConfig({skinVariants: ['largeText']}, chipLargeTextTests) + ...withConfig({skinVariants: ['largeText']}, chipLargeTextTests), + ...withTallglyphLocale(chipTallglyphTests) ]; export default ChipTests; diff --git a/tests/screenshot/apps/components/Chips.js b/tests/screenshot/apps/components/Chips.js index 887ba7c19..27e8d7c38 100644 --- a/tests/screenshot/apps/components/Chips.js +++ b/tests/screenshot/apps/components/Chips.js @@ -1,7 +1,7 @@ import Chips, {Chip} from '../../../../Chips'; import gameHomeIcon from '../../images/icon_app_game.png'; -import {withConfig} from './utils'; +import {withConfig, withTallglyphLocale, TallglyphLatin, TallglyphMultiScript} from './utils'; const chipsSmokeTests = [ @@ -54,9 +54,17 @@ const chipsFocusTests = [ ]; +const chipsTallglyphTests = [ + + {TallglyphMultiScript} + {TallglyphLatin} + +]; + const ChipsTests = [ ...chipsSmokeTests, - ...withConfig({focus: true}, chipsFocusTests) + ...withConfig({focus: true}, chipsFocusTests), + ...withTallglyphLocale(chipsTallglyphTests) ]; export default ChipsTests; diff --git a/tests/screenshot/apps/components/ContextualPopupDecorator.js b/tests/screenshot/apps/components/ContextualPopupDecorator.js index f28df60c5..c1dc74ad4 100644 --- a/tests/screenshot/apps/components/ContextualPopupDecorator.js +++ b/tests/screenshot/apps/components/ContextualPopupDecorator.js @@ -68,7 +68,7 @@ const contextualPopupRtlTests = [ ]; -const contextualPopupCommentedTests = [ +const contextualPopupExtendedTests = [ // ************************************************************* // Test auto swapping side at boundaries // ************************************************************* @@ -97,7 +97,7 @@ const contextualPopupCommentedTests = [ const ContextualPopupDecoratorTests = [ , ...withConfig({wrapper}, contextualPopupSmokeTests), - ...contextualPopupCommentedTests, + ...contextualPopupExtendedTests, ...withConfig({wrapper, locale: 'ar-SA'}, contextualPopupRtlTests) ]; diff --git a/tests/screenshot/apps/components/Dropdown.js b/tests/screenshot/apps/components/Dropdown.js index 8afb745e1..079e729ee 100644 --- a/tests/screenshot/apps/components/Dropdown.js +++ b/tests/screenshot/apps/components/Dropdown.js @@ -2,7 +2,7 @@ import {scaleToRem} from '@enact/ui/resolution'; import Dropdown from '../../../../Dropdown'; -import {withProps} from './utils'; +import {withProps, withTallglyphLocale, TallglyphLatin, TallglyphMultiScript} from './utils'; const children = (itemCount) => (new Array(itemCount)).fill().map((i, index) => `Option ${index + 1}`); @@ -39,7 +39,7 @@ const dropdownQwtcTests = [ ...withProps({size: 'small'}, Widths) ]; -const dropdownCommentedTests = [ +const dropdownExtendedTests = [ // open with number type width {children(5)} @@ -81,12 +81,18 @@ const dropdownRtlTests = [ } ]; +const dropdownTallglyphTests = [ + , + +]; + const DropdownTests = [ ...dropdownSmokeTests, ...dropdownQwtcTests, - ...dropdownCommentedTests, + ...dropdownExtendedTests, ...dropdownFocusTests, - ...dropdownRtlTests + ...dropdownRtlTests, + ...withTallglyphLocale(dropdownTallglyphTests) ]; export default DropdownTests; diff --git a/tests/screenshot/apps/components/FixedPopupPanels.js b/tests/screenshot/apps/components/FixedPopupPanels.js index 9b25fbbae..d22f66c5b 100644 --- a/tests/screenshot/apps/components/FixedPopupPanels.js +++ b/tests/screenshot/apps/components/FixedPopupPanels.js @@ -101,7 +101,7 @@ const fixedPopupPanelsSmokeTests = [ } ]; -const fixedPopupPanelsCommentedTests = [ +const fixedPopupPanelsExtendedTests = [ ...withProps( {fullHeight: true}, fixedPopupPanelsQwtcTests.map(o => ({...o, title: `${o.title} fullHeight`})) @@ -119,7 +119,7 @@ const fixedPopupPanelsRtlTests = [ const FixedPopupPanelsTests = [ ...fixedPopupPanelsSmokeTests, ...fixedPopupPanelsQwtcTests, - ...fixedPopupPanelsCommentedTests, + ...fixedPopupPanelsExtendedTests, ...fixedPopupPanelsRtlTests ]; diff --git a/tests/screenshot/apps/components/FlexiblePopupPanels.js b/tests/screenshot/apps/components/FlexiblePopupPanels.js index 560f240d1..49d0679c6 100644 --- a/tests/screenshot/apps/components/FlexiblePopupPanels.js +++ b/tests/screenshot/apps/components/FlexiblePopupPanels.js @@ -130,7 +130,7 @@ const flexiblePopupPanelsSmokeTests = [ } ]; -const flexiblePopupPanelsCommentedTests = [ +const flexiblePopupPanelsExtendedTests = [ ...withProps( {fullHeight: true}, flexiblePopupPanelsQwtcTests.map(o => ({...o, title: `${o.title} fullHeight`})) @@ -160,7 +160,7 @@ const flexiblePopupPanelsRtlTests = [ const FlexiblePopupPanelsTests = [ ...flexiblePopupPanelsSmokeTests, ...flexiblePopupPanelsQwtcTests, - ...flexiblePopupPanelsCommentedTests, + ...flexiblePopupPanelsExtendedTests, ...flexiblePopupPanelsRtlTests ]; diff --git a/tests/screenshot/apps/components/FormCheckboxItem.js b/tests/screenshot/apps/components/FormCheckboxItem.js index 32fa691b1..29033a4e5 100644 --- a/tests/screenshot/apps/components/FormCheckboxItem.js +++ b/tests/screenshot/apps/components/FormCheckboxItem.js @@ -1,7 +1,7 @@ import Icon from '../../../../Icon'; import FormCheckboxItem from '../../../../FormCheckboxItem'; -import {withConfig, withProps} from './utils'; +import {withConfig, withProps, withTallglyphLocale, TallglyphLatin, TallglyphMultiScript} from './utils'; const basicFormCheckboxItemTests = (prefix) => { const normalName = prefix + 'FormCheckboxItem'; @@ -67,7 +67,7 @@ const formCheckboxItemCenteredTests = [ ]) ]; -const formCheckboxItemCommentedTests = [ +const formCheckboxItemExtendedTests = [ ...formCheckboxItemSlotBeforeTests, ...formCheckboxItemCenteredTests ]; @@ -99,11 +99,17 @@ const formCheckboxItemRtlTests = [ } ]; +const formCheckboxItemTallglyphTests = [ + {TallglyphMultiScript}, + {TallglyphLatin} +]; + const FormCheckboxItemTests = [ ...formCheckboxItemSmokeTests, ...formCheckboxItemQwtcTests, - ...formCheckboxItemCommentedTests, - ...formCheckboxItemRtlTests + ...formCheckboxItemExtendedTests, + ...formCheckboxItemRtlTests, + ...withTallglyphLocale(formCheckboxItemTallglyphTests) ]; export default FormCheckboxItemTests; diff --git a/tests/screenshot/apps/components/Header.js b/tests/screenshot/apps/components/Header.js index a757b5c07..0c1d97c8e 100644 --- a/tests/screenshot/apps/components/Header.js +++ b/tests/screenshot/apps/components/Header.js @@ -3,7 +3,7 @@ import Button from '../../../../Button'; import Steps from '../../../../Steps'; import {Fragment} from 'react'; -import {LoremString, withConfig, withProps} from './utils'; +import {LoremString, withConfig, withProps, withTallglyphLocale, TallglyphMultiScriptQwtc} from './utils'; const baseTests = [
, @@ -52,9 +52,9 @@ const specificTests = [ // end of [QWTC-1887] // [QWTC-1879] -
, +
, // [QWTC-1878] -
, +
, // [QWTC-2224]
, // [QWTC-2225] @@ -141,6 +141,12 @@ const headerPortraitTests = [ ]) ]; +const headerTallglyphValidationTests = [ + ...withProps({type: 'standard'}, baseTests), + ...withProps({type: 'compact'}, baseTests), + ...withProps({type: 'wizard', centered: true}, baseTests) +]; + const HeaderTests = [ ...LtrTests, ...specificTests, @@ -148,12 +154,7 @@ const HeaderTests = [ ...withConfig({locale: 'ar-SA'}, headerLocaleSmokeTests), // Tallglyph Validation - ...withConfig({locale: 'vi-VN'}, [ - // Initial - ...withProps({type: 'standard'}, baseTests), - ...withProps({type: 'compact'}, baseTests), - ...withProps({type: 'wizard', centered: true}, baseTests) - ]), + ...withTallglyphLocale(headerTallglyphValidationTests), ...withConfig({portrait: true, wrapper: {full: true}}, headerPortraitTests) ]; diff --git a/tests/screenshot/apps/components/Heading.js b/tests/screenshot/apps/components/Heading.js index 12afb1718..1da98b6d0 100644 --- a/tests/screenshot/apps/components/Heading.js +++ b/tests/screenshot/apps/components/Heading.js @@ -1,6 +1,6 @@ import Heading from '../../../../Heading'; -import {withConfig, withProps} from './utils'; +import {withConfig, withProps, withTallglyphLocale, TallglyphHindi, TallglyphLatin, TallglyphMultiScriptQwtc} from './utils'; const bidirectionalHeading = [ Input Password for ABC جهاز, please, @@ -21,13 +21,13 @@ const headingSmokeTests = [ // QWTC-documented scenarios (kept explicitly for Jira traceability). const headingQwtcTests = [ // start of [QWTC-2276] - नरेंद्र मोदी, - ฟิ้ ไั ஒ த, - ÃÑÕÂÊÎÔÛÄËÏÖÜŸ + {TallglyphHindi}, + {TallglyphMultiScriptQwtc}, + {TallglyphLatin} // end of [QWTC-2276] ]; -const headingCommentedTests = [ +const headingExtendedTests = [ // Heading with no children , @@ -88,10 +88,11 @@ const bidirectionalTests = [ const HeadingTests = [ ...headingSmokeTests, ...headingQwtcTests, - ...headingCommentedTests, + ...headingExtendedTests, ...bidirectionalTests, ...withProps({forceDirection: 'locale'}, bidirectionalTests), - ...withConfig({skinVariants: ['largeText']}, headingLargeTextTests) + ...withConfig({skinVariants: ['largeText']}, headingLargeTextTests), + ...withTallglyphLocale(headingQwtcTests) ]; export default HeadingTests; diff --git a/tests/screenshot/apps/components/IconItem.js b/tests/screenshot/apps/components/IconItem.js index d07b1fff7..4485e8a76 100644 --- a/tests/screenshot/apps/components/IconItem.js +++ b/tests/screenshot/apps/components/IconItem.js @@ -1,6 +1,6 @@ import IconItem from '../../../../IconItem'; -import {withConfig, withProps} from './utils'; +import {withConfig, withProps, withTallglyphLocale, TallglyphLatin, TallglyphMultiScript} from './utils'; import img from '../../images/200x200.png'; @@ -48,7 +48,7 @@ const iconItemSmokeTests = [ defaultIconItemTests[22] ]; -const iconItemCommentedTests = [ +const iconItemExtendedTests = [ // Bordered ...withProps({bordered: true}, iconItemSmokeTests), @@ -64,9 +64,14 @@ const iconItemFocusTests = [ ...withConfig({focus: true, wrapper: {light: true, padded: true}}, iconItemSmokeTests) ]; +const iconItemTallglyphTests = [ + , + +]; + const IconItemTests = [ ...iconItemSmokeTests, - ...iconItemCommentedTests, + ...iconItemExtendedTests, ...iconItemFocusTests, ...withConfig({ focusRing: true, @@ -75,7 +80,8 @@ const IconItemTests = [ , ]), - ...withConfig({skinVariants: ['largeText']}, iconItemSmokeTests) + ...withConfig({skinVariants: ['largeText']}, iconItemSmokeTests), + ...withTallglyphLocale(iconItemTallglyphTests) ]; export default IconItemTests; diff --git a/tests/screenshot/apps/components/ImageItem.js b/tests/screenshot/apps/components/ImageItem.js index adf3fcdf8..15a3acc26 100644 --- a/tests/screenshot/apps/components/ImageItem.js +++ b/tests/screenshot/apps/components/ImageItem.js @@ -2,7 +2,7 @@ import ri from '@enact/ui/resolution'; import ImageItem from '../../../../ImageItem'; -import {withConfig, withProps} from './utils'; +import {withConfig, withProps, withTallglyphLocale, TallglyphMultiScript} from './utils'; import img from '../../images/600x600.png'; @@ -76,6 +76,11 @@ const imageItemFocusReps = withConfig({focus: true, wrapper: {light: true, padde imageItemFocusTests[9] ]); +const imageItemTallglyphTests = [ + Short, + {TallglyphMultiScript} +]; + const ImageItemTests = [ // base layout permutations + full focus coverage. ...imageItemBaseCases, @@ -104,7 +109,9 @@ const ImageItemTests = [ // RTL — base permutations + focus representatives. ...withConfig({locale: 'ar-SA'}, imageItemBaseCases), - ...withConfig({locale: 'ar-SA'}, imageItemFocusReps) + ...withConfig({locale: 'ar-SA'}, imageItemFocusReps), + + ...withTallglyphLocale(imageItemTallglyphTests) ]; export default ImageItemTests; diff --git a/tests/screenshot/apps/components/Input.js b/tests/screenshot/apps/components/Input.js index acf6960de..8ced47772 100644 --- a/tests/screenshot/apps/components/Input.js +++ b/tests/screenshot/apps/components/Input.js @@ -2,7 +2,7 @@ import Button from '../../../../Button'; import Input from '../../../../Input'; import Item from '../../../../Item'; -import {withConfig, withProps} from './utils'; +import {withConfig, withProps, withTallglyphLocale, TallglyphLatin, TallglyphMultiScript} from './utils'; const LoremString = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean ac tellus in velit ornare commodo. Nam dignissim fringilla nulla, sit amet hendrerit sapien laoreet quis."; @@ -81,7 +81,7 @@ const inputLargeTextTests = [ ...withProps({popupType: 'overlay'}, [overlayTestsNoTitleNoSubtitle[0]]) ]; -const inputCommentedTests = [ +const inputExtendedTests = [ ...inputLargeTests, ...inputDisabledTests ]; @@ -93,14 +93,20 @@ const inputPortraitTests = [ ]) ]; +const inputTallglyphTests = [ + , + +]; + const InputTests = [ ...inputSmokeTests, - ...inputCommentedTests, + ...inputExtendedTests, ...withProps({popupType: 'overlay'}, inputSmokeTests), ...withConfig({locale: 'ar-SA'}, inputRtlLargeTests), ...withConfig({locale: 'ar-SA'}, inputRtlOverlayTests), ...withConfig({textSize: 'large'}, inputLargeTextTests), - ...withConfig({portrait: true}, inputPortraitTests) + ...withConfig({portrait: true}, inputPortraitTests), + ...withTallglyphLocale(inputTallglyphTests) ]; export default InputTests; diff --git a/tests/screenshot/apps/components/InputField.js b/tests/screenshot/apps/components/InputField.js index effe0f77f..c40533212 100644 --- a/tests/screenshot/apps/components/InputField.js +++ b/tests/screenshot/apps/components/InputField.js @@ -1,7 +1,7 @@ import {InputField} from '../../../../Input'; import {useLayoutEffect} from 'react'; -import {LoremString, withConfig, withProps} from './utils'; +import {LoremString, withConfig, withProps, withTallglyphLocale, TallglyphHindi, TallglyphKhmer, TallglyphLatin, TallglyphMultiScript} from './utils'; const SelectionInput = props => { useLayoutEffect(() => { @@ -51,15 +51,15 @@ const inputFieldQwtcTests = [ // tallCharacters: Change 'size' dynamically - [QWTC-2164] // Note: text stays the same size, the InputField field becomes smaller - , - , - , - , + , + , + , + , // Testing default size 'large' - , - , - , - , + , + , + , + , // Change 'size' dynamically to 'small' - [QWTC-1971] , @@ -70,7 +70,7 @@ const inputFieldQwtcTests = [ ]; -const inputFieldCommentedTests = [ +const inputFieldExtendedTests = [ // Selection color ]; @@ -178,37 +178,37 @@ const inputFieldRtlTests = [ // Note: text stays the same size, the InputField field becomes smaller { locale: 'ar-SA', - component: + component: }, { locale: 'ar-SA', - component: + component: }, { locale: 'ar-SA', - component: + component: }, { locale: 'ar-SA', - component: + component: }, // Testing default size 'large' { locale: 'ar-SA', - component: + component: }, { locale: 'ar-SA', - component: + component: }, { locale: 'ar-SA', - component: + component: }, { locale: 'ar-SA', - component: + component: }, // Change 'size' dynamically to 'small' - [QWTC-1971] @@ -234,13 +234,20 @@ const inputFieldRtlTests = [ } ]; +const inputFieldTallglyphTests = [ + , + , + +]; + const InputFieldTests = [ ...inputFieldSmokeTests, ...inputFieldQwtcTests, - ...inputFieldCommentedTests, + ...inputFieldExtendedTests, ...inputFieldFocusTests, ...withConfig({textSize: 'large'}, inputFieldLargeTextTests), - ...inputFieldRtlTests + ...inputFieldRtlTests, + ...withTallglyphLocale(inputFieldTallglyphTests) ]; export default InputFieldTests; diff --git a/tests/screenshot/apps/components/Item.js b/tests/screenshot/apps/components/Item.js index 9121bc5bb..978ec2185 100644 --- a/tests/screenshot/apps/components/Item.js +++ b/tests/screenshot/apps/components/Item.js @@ -1,7 +1,7 @@ import Item from '../../../../Item'; import Icon from '../../../../Icon'; -import {withConfig, withProps, LoremString} from './utils'; +import {withConfig, withProps, withTallglyphLocale, LoremString, TallglyphLatin} from './utils'; import css from './Item.module.less'; @@ -43,9 +43,9 @@ for (const lang in rtlStrings) { } const tallglyphStrings = { - // hi: 'नरेंद्र मोदी', - // th: ' ฟิ้ ไั ஒ து', - vi: 'ÃÑÕÂÊÎÔÛÄËÏÖÜŸ' + // hi: TallglyphHindi, + // th: TallglyphMultiScript, + vi: TallglyphLatin }; // Define cases where the text could be affected by tallglyph languages @@ -123,7 +123,7 @@ const itemCustomStyleTests = [ ]) ]; -const itemCommentedTests = [ +const itemExtendedTests = [ // Long text ...longTextItemTests, ...rtlItemTests, @@ -189,14 +189,14 @@ const itemLargeTextTests = [ const ItemTests = [ ...itemSmokeTests, ...itemQwtcTests, - ...itemCommentedTests, + ...itemExtendedTests, ...withConfig({focus: true}, itemFocusTests), ...withConfig({focus: true, wrapper: {light: true, padded: true}}, itemFocusedLightWrapperTests), ...withConfig({textSize: 'large'}, itemLargeTextTests), ...withConfig({locale: 'ar-SA'}, itemRtlTests), ...withConfig({locale: 'ar-SA', textSize: 'large'}, itemRtlLargeTextTests), - ...withConfig({locale: 'vi-VN'}, itemTallglyphValidationTests), - ...withConfig({locale: 'vi-VN', textSize: 'large'}, itemTallglyphValidationLargeTextTests) + ...withTallglyphLocale(itemTallglyphValidationTests), + ...withTallglyphLocale(itemTallglyphValidationLargeTextTests, {textSize: 'large'}) ]; export default ItemTests; diff --git a/tests/screenshot/apps/components/KeyGuide.js b/tests/screenshot/apps/components/KeyGuide.js index e6e994141..13b5387a4 100644 --- a/tests/screenshot/apps/components/KeyGuide.js +++ b/tests/screenshot/apps/components/KeyGuide.js @@ -4,7 +4,7 @@ import img from '../../images/600x600.png'; import css from './KeyGuide.module.less'; -import {withConfig} from './utils'; +import {withConfig, withTallglyphLocale, TallglyphLatin, TallglyphMultiScript} from './utils'; const keyGuideSmokeTests = [ {[{icon: 'red', children: 'red', key: 'a'}]}, @@ -42,10 +42,16 @@ const keyGuideLargeTextTests = [ {{children: 'guide', imageSrc: img}} ]; +const keyGuideTallglyphTests = [ + {[{icon: 'plus', children: TallglyphMultiScript, key: 'a'}]}, + {{children: TallglyphLatin, imageSrc: img}} +]; + const KeyGuideTests = [ ...keyGuideSmokeTests, ...withConfig({locale: 'ar-SA'}, keyGuideRtlTests), - ...withConfig({skinVariants: ['largeText']}, keyGuideLargeTextTests) + ...withConfig({skinVariants: ['largeText']}, keyGuideLargeTextTests), + ...withTallglyphLocale(keyGuideTallglyphTests) ]; export default KeyGuideTests; diff --git a/tests/screenshot/apps/components/Marquee.js b/tests/screenshot/apps/components/Marquee.js index dc0ff3ef8..9afe2e499 100644 --- a/tests/screenshot/apps/components/Marquee.js +++ b/tests/screenshot/apps/components/Marquee.js @@ -1,17 +1,26 @@ import Marquee from '../../../../Marquee'; + +import {withTallglyphLocale, TallglyphLatin, TallglyphMultiScript} from './utils'; + import css from './Marquee.module.less'; const marqueeSmokeTests = [ ]; -const marqueeCommentedTests = [ +const marqueeExtendedTests = [
Text
]; +const marqueeTallglyphTests = [ +
{TallglyphMultiScript}
, +
{TallglyphLatin}
+]; + const MarqueeTests = [ ...marqueeSmokeTests, - ...marqueeCommentedTests + ...marqueeExtendedTests, + ...withTallglyphLocale(marqueeTallglyphTests) ]; export default MarqueeTests; diff --git a/tests/screenshot/apps/components/PageViews.js b/tests/screenshot/apps/components/PageViews.js index 6068899a6..1f16a46ff 100644 --- a/tests/screenshot/apps/components/PageViews.js +++ b/tests/screenshot/apps/components/PageViews.js @@ -50,7 +50,7 @@ const pageViewsSmokeTests = [ ]; -const pageViewsCommentedTests = [ +const pageViewsExtendedTests = [ { component: {panelHeader}{PageComponents}, wrapper: {full: true}, @@ -107,12 +107,12 @@ const pageViewsRtlTests = [ // locale = 'ar-SA' — smoke representatives pageViewsSmokeTests[1], pageViewsSmokeTests[3], - pageViewsCommentedTests[0] + pageViewsExtendedTests[0] ]; const PageViewsTests = [ ...pageViewsSmokeTests, - ...pageViewsCommentedTests, + ...pageViewsExtendedTests, ...withConfig({locale: 'ar-SA'}, pageViewsRtlTests) ]; diff --git a/tests/screenshot/apps/components/Picker.js b/tests/screenshot/apps/components/Picker.js index f629d772b..c5b4e475a 100644 --- a/tests/screenshot/apps/components/Picker.js +++ b/tests/screenshot/apps/components/Picker.js @@ -1,15 +1,15 @@ import Picker from '../../../../Picker'; -import {withConfig} from './utils'; +import {withConfig, withTallglyphLocale, TallglyphHindi, TallglyphKhmer, TallglyphLatin, TallglyphMultiScript} from './utils'; import css from './Picker.module.less'; const pickerList = { tall: [ - 'नरेंद्र मोदी', - ' ฟิ้ ไั ஒ து', - 'ÃÑÕÂÊÎÔÛÄËÏÖÜŸ', - 'តន្ត្រី' + TallglyphHindi, + TallglyphMultiScript, + TallglyphLatin, + TallglyphKhmer ], vegetables: [ 'Celery', @@ -52,10 +52,12 @@ const pickerSmokeTests = [ const pickerQwtcTests = [ // Locale Font Displays on Picker - [QWTC-2214] {pickerList.tall}, - { - locale: 'th-TH', - component: {pickerList.tall} - }, + ...withConfig({locale: 'th-TH'}, [ + {pickerList.tall} + ]), + ...withTallglyphLocale([ + {pickerList.tall} + ]), // end of [QWTC-2214] // tallCharacters: Change 'width', 'wrap', 'joined', 'changedBy', 'noAnimation', 'disabled', 'incrementIcon', 'decrementIcon' dynamically - [QWTC-2215] @@ -265,7 +267,7 @@ const pickerRtlAllTests = [ const pickerRtlFocusTests = pickerFocusTests; -const pickerCommentedTests = [ +const pickerExtendedTests = [ ...pickerVegetablesTests, ...pickerVerticalTests ]; @@ -273,7 +275,7 @@ const pickerCommentedTests = [ const PickerTests = [ ...pickerSmokeTests, ...pickerQwtcTests, - ...pickerCommentedTests, + ...pickerExtendedTests, ...withConfig({focus: true}, pickerFocusTests), ...withConfig({locale: 'ar-SA'}, pickerRtlAllTests), ...withConfig({focus: true, locale: 'ar-SA'}, pickerRtlFocusTests), diff --git a/tests/screenshot/apps/components/Popup.js b/tests/screenshot/apps/components/Popup.js index 23598768e..1889f2872 100644 --- a/tests/screenshot/apps/components/Popup.js +++ b/tests/screenshot/apps/components/Popup.js @@ -1,5 +1,5 @@ import Popup from '../../../../Popup'; -import {withConfig, withProps} from './utils'; +import {withConfig, withProps, withTallglyphLocale, TallglyphLatin, TallglyphMultiScript} from './utils'; const popupPositionTests = [ // [QWTC-1904] @@ -28,7 +28,7 @@ const popupQwtcTests = [ ...withProps({scrimType: 'translucent'}, popupPositionTests) ]; -const popupCommentedTests = [ +const popupExtendedTests = [ ...withProps({scrimType: 'transparent'}, popupBaseTests), ...withProps({scrimType: 'none'}, popupBaseTests) ]; @@ -46,12 +46,18 @@ const popupRtlTests = [ ...withProps({scrimType: 'none'}, [Popup!]) ]; +const popupTallglyphTests = [ + {TallglyphMultiScript}, + {TallglyphLatin} +]; + const PopupTests = [ ...popupSmokeTests, ...popupQwtcTests, - ...popupCommentedTests, + ...popupExtendedTests, ...withConfig({locale: 'ar-SA'}, popupRtlTests), - ...withConfig({textSize: 'large'}, popupBaseTests) + ...withConfig({textSize: 'large'}, popupBaseTests), + ...withTallglyphLocale(popupTallglyphTests) ]; export default withConfig({wrapper: {full: true}}, PopupTests); diff --git a/tests/screenshot/apps/components/ProgressButton.js b/tests/screenshot/apps/components/ProgressButton.js index 56d36d413..15cedfc94 100644 --- a/tests/screenshot/apps/components/ProgressButton.js +++ b/tests/screenshot/apps/components/ProgressButton.js @@ -1,6 +1,6 @@ import ProgressButton from '../../../../ProgressButton'; -import {withConfig} from './utils'; +import {withConfig, withTallglyphLocale, TallglyphLatin, TallglyphMultiScript} from './utils'; const progressButtonSmokeTests = [ Update, @@ -92,17 +92,23 @@ const progressButtonFocusTests = [ Focused Update ]; -const progressButtonCommentedTests = [ +const progressButtonExtendedTests = [ ...progressButtonSizeLargeTests, ...progressButtonOpaqueTests, ...progressButtonTransparentTests ]; +const progressButtonTallglyphTests = [ + {TallglyphMultiScript}, + {TallglyphLatin} +]; + const ProgressButtonTests = [ ...progressButtonSmokeTests, - ...progressButtonCommentedTests, + ...progressButtonExtendedTests, ...withConfig({focus: true}, progressButtonFocusTests), - ...withConfig({locale: 'ar-SA'}, progressButtonRtlTests) + ...withConfig({locale: 'ar-SA'}, progressButtonRtlTests), + ...withTallglyphLocale(progressButtonTallglyphTests) ]; export default ProgressButtonTests; diff --git a/tests/screenshot/apps/components/QuickGuidePanels.js b/tests/screenshot/apps/components/QuickGuidePanels.js index a74f89fcf..8302a50bc 100644 --- a/tests/screenshot/apps/components/QuickGuidePanels.js +++ b/tests/screenshot/apps/components/QuickGuidePanels.js @@ -1,6 +1,6 @@ import QuickGuidePanels, {Panel as QuickGuidePanel} from '../../../../QuickGuidePanels'; -import {withConfig} from './utils'; +import {withConfig, withTallglyphLocale} from './utils'; const quickGuideSmokeTests = [ @@ -25,9 +25,7 @@ const quickGuideSmokeTests = [ const QuickGuidePanelsTests = [ ...withConfig({wrapper: {full: true}}, quickGuideSmokeTests), - // Tallglyph validation - ...withConfig({wrapper: {full: true}, locale: 'vi-VN'}, quickGuideSmokeTests), - // RTL validation + ...withTallglyphLocale(quickGuideSmokeTests, {wrapper: {full: true}}), ...withConfig({wrapper: {full: true}, locale: 'ar-SA'}, quickGuideSmokeTests) ]; diff --git a/tests/screenshot/apps/components/RadioItem.js b/tests/screenshot/apps/components/RadioItem.js index a2922d9cd..8ed87eb3a 100644 --- a/tests/screenshot/apps/components/RadioItem.js +++ b/tests/screenshot/apps/components/RadioItem.js @@ -1,7 +1,7 @@ import Icon from '../../../../Icon'; import RadioItem from '../../../../RadioItem'; -import {withConfig} from './utils'; +import {withConfig, withTallglyphLocale, TallglyphKhmer, TallglyphLatin, TallglyphMultiScript} from './utils'; const radioItemSmokeTests = [ RadioItem, @@ -18,23 +18,23 @@ const radioItemQwtcTests = [ // [QWTC-1851] مساء الخير, // [QWTC-1855] - ÃÑÕÂÊÎÔÛÄËÏÖÜŸ, + {TallglyphLatin}, // [QWTC-1855] - ÃÑÕÂÊÎÔÛÄËÏÖÜŸ, + {TallglyphLatin}, // [QWTC-1855] - តន្ត្រី, + {TallglyphKhmer}, // [QWTC-1855] - តន្ត្រី, + {TallglyphKhmer}, // [QWTC-1855] - ฟิ้ ไั ஒ து, + {TallglyphMultiScript}, // [QWTC-1852] - ฟิ้ ไั ஒ து, + {TallglyphMultiScript}, // [QWTC-1852] - ÃÑÕÂÊÎÔÛÄËÏÖÜŸ, + {TallglyphLatin}, // [QWTC-1852] - តន្ត្រី, + {TallglyphKhmer}, // [QWTC-1852] - ฟิ้ ไั ஒ து, + {TallglyphMultiScript}, // Selected - disabled // [QWTC-1843] RadioItem Checked, @@ -46,9 +46,9 @@ const radioItemQwtcTests = [ // Long text selected - LTR [QWTC-1849] -Lorem, - ÃÑÕÂÊÎÔÛÄËÏÖÜŸ, - តន្ត្រី, - ฟิ้ ไั ஒ து, + {TallglyphLatin}, + {TallglyphKhmer}, + {TallglyphMultiScript}, // Selected - disabled RadioItem Checked, // Selected - disabled - inline @@ -95,23 +95,23 @@ const radioItemLargeTextTests = [ // [QWTC-1851] مساء الخير, // [QWTC-1855] - ÃÑÕÂÊÎÔÛÄËÏÖÜŸ, + {TallglyphLatin}, // [QWTC-1855] - ÃÑÕÂÊÎÔÛÄËÏÖÜŸ, + {TallglyphLatin}, // [QWTC-1855] - តន្ត្រី, + {TallglyphKhmer}, // [QWTC-1855] - តន្ត្រី, + {TallglyphKhmer}, // [QWTC-1855] - ฟิ้ ไั ஒ து, + {TallglyphMultiScript}, // [QWTC-1852] - ฟิ้ ไั ஒ து, + {TallglyphMultiScript}, // [QWTC-1852] - ÃÑÕÂÊÎÔÛÄËÏÖÜŸ, + {TallglyphLatin}, // [QWTC-1852] - តន្ត្រី, + {TallglyphKhmer}, // [QWTC-1852] - ฟิ้ ไั ஒ து + {TallglyphMultiScript} ]; const radioItemRtlTests = [ @@ -122,17 +122,17 @@ const radioItemRtlTests = [ // [QWTC-1851] مساء الخير, // [QWTC-1851] - ÃÑÕÂÊÎÔÛÄËÏÖÜŸ, + {TallglyphLatin}, // [QWTC-1851] - តន្ត្រី, + {TallglyphKhmer}, // [QWTC-1852] - ฟิ้ ไั ஒ து, + {TallglyphMultiScript}, // [QWTC-1852] - ÃÑÕÂÊÎÔÛÄËÏÖÜŸ, + {TallglyphLatin}, // [QWTC-1852] - តន្ត្រី, + {TallglyphKhmer}, // [QWTC-1852] - ฟิ้ ไั ஒ து, + {TallglyphMultiScript}, // RadioItem* is selected - RTL [QWTC-1854] RadioItem Checked, // Selected - disabled @@ -149,17 +149,23 @@ const radioItemRtlTests = [ -Lorem ]; -const radioItemCommentedTests = [ +const radioItemExtendedTests = [ ...radioItemSlotBeforeTests ]; +const radioItemTallglyphTests = [ + {TallglyphMultiScript}, + {TallglyphLatin} +]; + const RadioItemTests = [ ...radioItemSmokeTests, ...radioItemQwtcTests, - ...radioItemCommentedTests, + ...radioItemExtendedTests, ...withConfig({focus: true}, radioItemFocusTests), ...withConfig({textSize: 'large'}, radioItemLargeTextTests), - ...withConfig({locale: 'ar-SA'}, radioItemRtlTests) + ...withConfig({locale: 'ar-SA'}, radioItemRtlTests), + ...withTallglyphLocale(radioItemTallglyphTests) ]; export default RadioItemTests; diff --git a/tests/screenshot/apps/components/RangePicker.js b/tests/screenshot/apps/components/RangePicker.js index ac39c24ce..695f3ab91 100644 --- a/tests/screenshot/apps/components/RangePicker.js +++ b/tests/screenshot/apps/components/RangePicker.js @@ -1,6 +1,6 @@ import RangePicker from '../../../../RangePicker'; -import {withConfig} from './utils'; +import {withConfig, withTallglyphLocale, TallglyphLatin, TallglyphMultiScript} from './utils'; import css from './Picker.module.less'; @@ -186,7 +186,7 @@ const rangePickerRtlFocusTests = [ ]; -const rangePickerCommentedTests = [ +const rangePickerExtendedTests = [ ...rangePickerDisabledTests, ...rangePickerWrapTests, ...rangePickerJoinedTests, @@ -195,15 +195,21 @@ const rangePickerCommentedTests = [ ...rangePickerTitleTests ]; +const rangePickerTallglyphTests = [ + , + +]; + const RangePickerTests = [ ...rangePickerSmokeTests, ...rangePickerQwtcTests, - ...rangePickerCommentedTests, + ...rangePickerExtendedTests, ...withConfig({focus: true}, rangePickerFocusTests), ...rangePickerLargeTextTests, ...withConfig({locale: 'ar-SA'}, rangePickerLargeTextTests), ...withConfig({locale: 'ar-SA'}, rangePickerRtlTests), - ...withConfig({focus: true, locale: 'ar-SA'}, rangePickerRtlFocusTests) + ...withConfig({focus: true, locale: 'ar-SA'}, rangePickerRtlFocusTests), + ...withTallglyphLocale(rangePickerTallglyphTests) ]; export default RangePickerTests; diff --git a/tests/screenshot/apps/components/Scroller.js b/tests/screenshot/apps/components/Scroller.js index c743ec7b7..3bc8d9286 100644 --- a/tests/screenshot/apps/components/Scroller.js +++ b/tests/screenshot/apps/components/Scroller.js @@ -76,7 +76,7 @@ const scrollerQwtcTests = [ ]; -const scrollerCommentedTests = [ +const scrollerExtendedTests = [ { wrapper: { tall: true @@ -117,7 +117,7 @@ const scrollerFocusTests = [ const ScrollerTests = [ ...scrollerSmokeTests, ...scrollerQwtcTests, - ...scrollerCommentedTests, + ...scrollerExtendedTests, ...withConfig({focus: true}, scrollerFocusTests) ]; diff --git a/tests/screenshot/apps/components/Slider.js b/tests/screenshot/apps/components/Slider.js index e8420d8b4..33033ad39 100644 --- a/tests/screenshot/apps/components/Slider.js +++ b/tests/screenshot/apps/components/Slider.js @@ -135,7 +135,7 @@ const sliderRtlTests = [ ]; -const sliderCommentedTests = [ +const sliderExtendedTests = [ ...sliderCustomizedStyleTests, ...sliderColorPickerTests, ...sliderTooltipTests, @@ -145,7 +145,7 @@ const sliderCommentedTests = [ const SliderTests = [ ...sliderSmokeTests, ...sliderQwtcTests, - ...sliderCommentedTests, + ...sliderExtendedTests, ...withConfig({locale: 'ar-SA'}, sliderRtlTests) ]; diff --git a/tests/screenshot/apps/components/Spinner.js b/tests/screenshot/apps/components/Spinner.js index a1a28debf..a79be25e7 100644 --- a/tests/screenshot/apps/components/Spinner.js +++ b/tests/screenshot/apps/components/Spinner.js @@ -26,7 +26,7 @@ const spinnerSmokeTests = [ spinnerWrapper() ]; -const spinnerCommentedTests = [ +const spinnerExtendedTests = [ spinnerWrapper(), spinnerWrapper(), spinnerWrapper(Loading content), @@ -36,7 +36,7 @@ const spinnerCommentedTests = [ const SpinnerTests = [ ...spinnerSmokeTests, - ...spinnerCommentedTests + ...spinnerExtendedTests ]; export default SpinnerTests; diff --git a/tests/screenshot/apps/components/Steps.js b/tests/screenshot/apps/components/Steps.js index 6e0e0a4e3..d1e291c18 100644 --- a/tests/screenshot/apps/components/Steps.js +++ b/tests/screenshot/apps/components/Steps.js @@ -14,7 +14,7 @@ const stepsSmokeTests = [ ]; -const stepsCommentedTests = [ +const stepsExtendedTests = [ , , , @@ -54,7 +54,7 @@ const stepsCommentedTests = [ const StepsTests = [ ...stepsSmokeTests, - ...stepsCommentedTests + ...stepsExtendedTests ]; export default StepsTests; diff --git a/tests/screenshot/apps/components/SwitchItem.js b/tests/screenshot/apps/components/SwitchItem.js index 484a69334..7ec84f5cc 100644 --- a/tests/screenshot/apps/components/SwitchItem.js +++ b/tests/screenshot/apps/components/SwitchItem.js @@ -1,7 +1,7 @@ import Icon from '../../../../Icon'; import SwitchItem from '../../../../SwitchItem'; -import {withConfig} from './utils'; +import {withConfig, withTallglyphLocale, TallglyphLatin, TallglyphMultiScript} from './utils'; const switchItemSmokeTests = [ , @@ -53,11 +53,17 @@ const switchItemRtlTests = [ SwitchItemhome ]; +const switchItemTallglyphTests = [ + {TallglyphMultiScript}, + {TallglyphLatin} +]; + const SwitchItemTests = [ ...switchItemSmokeTests, ...withConfig({focus: true}, switchItemFocusTests), ...withConfig({textSize: 'large'}, switchItemLargeTextTests), - ...withConfig({locale: 'ar-SA'}, switchItemRtlTests) + ...withConfig({locale: 'ar-SA'}, switchItemRtlTests), + ...withTallglyphLocale(switchItemTallglyphTests) ]; export default SwitchItemTests; diff --git a/tests/screenshot/apps/components/TabLayout.js b/tests/screenshot/apps/components/TabLayout.js index e776ca33e..6210542e7 100644 --- a/tests/screenshot/apps/components/TabLayout.js +++ b/tests/screenshot/apps/components/TabLayout.js @@ -1,7 +1,7 @@ import Button from '../../../../Button'; import {TabLayout, Tab} from '../../../../TabLayout'; -import {withConfig} from './utils'; +import {withConfig, withTallglyphLocale, TallglyphLatin, TallglyphMultiScript} from './utils'; const SimpleTab = (props) => ( @@ -263,11 +263,25 @@ const tabLayoutLargeTextTests = [ } ]; +const tabsTallglyph = [ + SimpleTab({title: TallglyphMultiScript}), + SimpleTab({title: TallglyphLatin}), + SimpleTab({title: 'Three'}) +]; + +const tabLayoutTallglyphTests = [ + { + component: {tabsTallglyph}, + wrapper: {full: true} + } +]; + const TabLayoutTests = [ ...tabLayoutSmokeTests, ...tabLayoutQwtcTests, ...tabLayoutLargeTextTests, - ...withConfig({locale: 'ar-SA'}, tabLayoutRtlTests) + ...withConfig({locale: 'ar-SA'}, tabLayoutRtlTests), + ...withTallglyphLocale(tabLayoutTallglyphTests) ]; export default TabLayoutTests; diff --git a/tests/screenshot/apps/components/Tooltip.js b/tests/screenshot/apps/components/Tooltip.js index ca7d6c157..b66f94b36 100644 --- a/tests/screenshot/apps/components/Tooltip.js +++ b/tests/screenshot/apps/components/Tooltip.js @@ -1,10 +1,10 @@ import {Tooltip} from '../../../../TooltipDecorator/TooltipDecorator'; -import {withConfig} from './utils'; +import {withConfig, withTallglyphLocale, TallglyphLatin, TallglyphMultiScript} from './utils'; const TooltipDisplay = (props) => (
- {`View ${props.type} ${props.direction} ${props.arrowAnchor}`} + {props.children || `View ${props.type} ${props.direction} ${props.arrowAnchor}`}
); @@ -18,7 +18,7 @@ const tooltipSmokeTests = [ TooltipDisplay({type: 'transparent', direction: 'left', arrowAnchor: 'middle'}) ]; -const tooltipCommentedTests = [ +const tooltipExtendedTests = [ // Custom width — smoke representatives TooltipDisplay({type: 'balloon', direction: 'above', arrowAnchor: 'center', tooltipWidth: 200}), TooltipDisplay({type: 'balloon', direction: 'left', arrowAnchor: 'middle', tooltipWidth: 200}), @@ -34,6 +34,11 @@ const tooltipLargeTextTests = [ {textSize: 'large', component: TooltipDisplay({type: 'balloon', direction: 'below', arrowAnchor: 'center'})} ]; +const tooltipTallglyphTests = [ + TooltipDisplay({type: 'balloon', direction: 'above', arrowAnchor: 'center', children: TallglyphMultiScript}), + TooltipDisplay({type: 'transparent', direction: 'below', arrowAnchor: 'center', children: TallglyphLatin}) +]; + const TooltipTests = [ ...withConfig({ wrapper: { @@ -41,9 +46,10 @@ const TooltipTests = [ } }, [ ...tooltipSmokeTests, - ...tooltipCommentedTests, + ...tooltipExtendedTests, ...tooltipLargeTextTests - ]) + ]), + ...withTallglyphLocale(tooltipTallglyphTests, {wrapper: {full: true}}) ]; export default TooltipTests; diff --git a/tests/screenshot/apps/components/WizardPanels.js b/tests/screenshot/apps/components/WizardPanels.js index 0cc46f3ee..c11d566c5 100644 --- a/tests/screenshot/apps/components/WizardPanels.js +++ b/tests/screenshot/apps/components/WizardPanels.js @@ -2,7 +2,7 @@ import BodyText from '../../../../BodyText'; import Button from '../../../../Button'; import WizardPanels, {Panel} from '../../../../WizardPanels'; -import {LongerLoremString, withConfig} from './utils'; +import {LongerLoremString, withConfig, withTallglyphLocale, TallglyphLatin, TallglyphMultiScript} from './utils'; const customPrevButton = (); const customNextButton = (); @@ -34,7 +34,7 @@ const wizardQwtcTests = [ ]; -const wizardCommentedTests = [ +const wizardExtendedTests = [ // Test to never show next/prev button on all the panels View 1 @@ -110,14 +110,23 @@ const wizardPortraitTests = [ ]; +const wizardTallglyphTests = [ + + {TallglyphMultiScript} + {TallglyphLatin} + +]; + const WizardPanelsTests = [ ...withConfig({wrapper}, [ ...wizardSmokeTests, ...wizardQwtcTests, - ...wizardCommentedTests, + ...wizardExtendedTests, ...wizardRtlTests ]), + ...withConfig({wrapper}, withTallglyphLocale(wizardTallglyphTests)), + // Portrait ...withConfig({portrait: true}, wizardPortraitTests) ]; diff --git a/tests/screenshot/apps/components/utils.js b/tests/screenshot/apps/components/utils.js index 297f5f856..59696e1e3 100644 --- a/tests/screenshot/apps/components/utils.js +++ b/tests/screenshot/apps/components/utils.js @@ -29,6 +29,52 @@ const withConfig = (config, tests) => { }); }; +/** + * Default tallglyph locale for screenshot tests. + * + * `vi-VN` activates `.enact-locale-vi` tallglyph CSS (font-size, line-height). + * It does not apply th/km/si rules — use {@link withConfig} with an explicit + * locale for those (e.g. Button `km-KH`, Picker QWTC-2214 `th-TH`). + */ +const TALLGLYPH_LOCALES = ['vi-VN']; + +/** + * Applies every {@link TALLGLYPH_LOCALES} entry to screenshot test cases via {@link withConfig}. + * + * @param {Array} tests - Test elements or `{component, ...config}` objects. + * @param {Object} [config={}] - Extra config merged with each locale (e.g. `{textSize: 'large'}`). + * @returns {Array} Flattened test cases, one entry per locale in {@link TALLGLYPH_LOCALES}. + * + * @example + * // All default tallglyph locales + * ...withTallglyphLocale(tests) + * + * @example + * // All default locales plus extra config + * ...withTallglyphLocale(tests, {textSize: 'large'}) + */ +const withTallglyphLocale = (tests, config = {}) => + TALLGLYPH_LOCALES.flatMap((locale) => withConfig({locale, ...config}, tests)); + +/** + * QWTC tallglyph sample: tall glyphs from multiple scripts (th, ta) in one string. + * Used with {@link withTallglyphLocale} to stress clipping/overflow; locale selects + * which `.enact-locale-*` CSS applies, not which characters appear in the string. + */ +const TallglyphMultiScript = 'ฟิ้ ไั ஒ து'; + +/** QWTC sample: multi-script string with truncated Tamil ending (Heading, Header). */ +const TallglyphMultiScriptQwtc = 'ฟิ้ ไั ஒ த'; + +/** Devanagari sample for tallglyph QWTC scenarios. */ +const TallglyphHindi = 'नरेंद्र मोदी'; + +/** Khmer sample for tallglyph QWTC scenarios and km-KH locale tests. */ +const TallglyphKhmer = 'តន្ត្រី'; + +/** Latin extended sample for vi tallglyph typography. */ +const TallglyphLatin = 'ÃÑÕÂÊÎÔÛÄËÏÖÜŸ'; + const LoremString = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean ac tellus in velit ornare commodo. Nam dignissim fringilla nulla, sit amet hendrerit sapien laoreet quis. Praesent quis tellus non diam viverra feugiat.'; @@ -37,6 +83,12 @@ const LongerLoremString = `Longer ${LoremString} ${LoremString} ${LoremString} $ export { LongerLoremString, LoremString, + TallglyphHindi, + TallglyphKhmer, + TallglyphLatin, + TallglyphMultiScript, + TallglyphMultiScriptQwtc, withConfig, - withProps + withProps, + withTallglyphLocale };