validate ut and partial update ut

Signed-off-by: s00912778 <shijiakai2@huawei.com>
Change-Id: I0ca6fc569f089149cac8084cd9db9e790c211877
This commit is contained in:
s00912778 2024-10-22 14:42:47 +08:00
parent b903090d53
commit dff927600e
4 changed files with 288 additions and 246 deletions

View File

@ -1,260 +1,260 @@
export const UT_PAGES: string[] = [
// 'import/import@CustomDialog',
// 'import/import@Observed',
// 'import/importAllEts',
// 'import/importEts',
// 'import/importExportEts',
// 'import/importExportNest',
// 'import/importSystemApi',
// 'import/importTs',
'import/import@CustomDialog',
'import/import@Observed',
'import/importAllEts',
'import/importEts',
'import/importExportEts',
'import/importExportNest',
'import/importSystemApi',
'import/importTs',
// 'inner_commponent_transform/$$_component/$$_component',
// 'inner_commponent_transform/custom_component/custom_component',
// 'inner_commponent_transform/gesture_component/longPressGesture',
// 'inner_commponent_transform/gesture_component/panGestrue',
// 'inner_commponent_transform/gesture_component/pinchGesture',
// 'inner_commponent_transform/gesture_component/rotationGesture',
// 'inner_commponent_transform/gesture_component/swipeGesture',
// 'inner_commponent_transform/gesture_component/tapGesture',
// 'inner_commponent_transform/render_component/forEach/forEach',
// 'inner_commponent_transform/render_component/forEach/forEachSecondFunction',
// 'inner_commponent_transform/render_component/forEach/forEachTwo',
// 'inner_commponent_transform/render_component/if/if',
// 'inner_commponent_transform/render_component/lazyForEach/lazyForEach',
// 'inner_commponent_transform/simple_component/button/button',
// 'inner_commponent_transform/transition_component/animateTo/animateTo',
// 'inner_commponent_transform/transition_component/pageTransition/pageTransition',
'inner_commponent_transform/$$_component/$$_component',
'inner_commponent_transform/custom_component/custom_component',
'inner_commponent_transform/gesture_component/longPressGesture',
'inner_commponent_transform/gesture_component/panGestrue',
'inner_commponent_transform/gesture_component/pinchGesture',
'inner_commponent_transform/gesture_component/rotationGesture',
'inner_commponent_transform/gesture_component/swipeGesture',
'inner_commponent_transform/gesture_component/tapGesture',
'inner_commponent_transform/render_component/forEach/forEach',
'inner_commponent_transform/render_component/forEach/forEachSecondFunction',
'inner_commponent_transform/render_component/forEach/forEachTwo',
'inner_commponent_transform/render_component/if/if',
'inner_commponent_transform/render_component/lazyForEach/lazyForEach',
'inner_commponent_transform/simple_component/button/button',
'inner_commponent_transform/transition_component/animateTo/animateTo',
'inner_commponent_transform/transition_component/pageTransition/pageTransition',
// 'render_decorator/@builder/@builder',
// 'render_decorator/@builder/@builderWithForEach',
// 'render_decorator/@builder/@builderWithLinkData',
// 'render_decorator/@builderParam/@builderParam',
// 'render_decorator/@customDialog/@customDialog',
// 'render_decorator/@extend/@extend',
// 'render_decorator/@preview/@preview',
// 'render_decorator/@styles/@styles',
// 'render_decorator/@styles/@stylesExport',
'render_decorator/@builder/@builder',
'render_decorator/@builder/@builderWithForEach',
'render_decorator/@builder/@builderWithLinkData',
'render_decorator/@builderParam/@builderParam',
'render_decorator/@customDialog/@customDialog',
'render_decorator/@extend/@extend',
'render_decorator/@preview/@preview',
'render_decorator/@styles/@styles',
'render_decorator/@styles/@stylesExport',
// 'ui_state_management/application_state_management/@storageLink/@storageLink',
// 'ui_state_management/application_state_management/@storageProp/@storageProp',
// 'ui_state_management/application_state_management/appStorage/appStorage',
// 'ui_state_management/application_state_management/localStorage/localStorage',
// 'ui_state_management/inner_struct_state_management/@link/@link',
// 'ui_state_management/inner_struct_state_management/@prop/@prop',
// 'ui_state_management/others/@consume_@provide/@consume_@provide',
// 'ui_state_management/others/@observed_@objectLink/@observed_@objectLink',
// 'ui_state_management/others/@watch/@watch'
'ui_state_management/application_state_management/@storageLink/@storageLink',
'ui_state_management/application_state_management/@storageProp/@storageProp',
'ui_state_management/application_state_management/appStorage/appStorage',
'ui_state_management/application_state_management/localStorage/localStorage',
'ui_state_management/inner_struct_state_management/@link/@link',
'ui_state_management/inner_struct_state_management/@prop/@prop',
'ui_state_management/others/@consume_@provide/@consume_@provide',
'ui_state_management/others/@observed_@objectLink/@observed_@objectLink',
'ui_state_management/others/@watch/@watch'
];
export const UT_PARTIAL_UPFATE_PAGES: string[] = [
// 'import/import@CustomDialog',
// 'import/import@Observed',
// 'import/importAllEts',
// 'import/importEts',
// 'import/importExportEts',
// 'import/importExportNest',
// 'import/importTs',
'import/import@CustomDialog',
'import/import@Observed',
'import/importAllEts',
'import/importEts',
'import/importExportEts',
'import/importExportNest',
'import/importTs',
// 'inner_component_transform/$$_component/$$_component',
// 'inner_component_transform/$$_component/$$_componentCheck1',
// 'inner_component_transform/$$_component/$$_componentCheck2',
// 'inner_component_transform/$$_component/$$_componentCheck3',
// 'inner_component_transform/$$_component/$$_componentCheck4',
// 'inner_component_transform/$$_component/$$_componentCheck5',
// 'inner_component_transform/$$_component/$$_componentCheck6',
// 'inner_component_transform/$$_component/$$_componentCheck7',
// 'inner_component_transform/$$_component/$$_componentCheck8',
// 'inner_component_transform/$$_component/$$_componentCheck9',
// 'inner_component_transform/$$_component/$$_if_elseIf_else',
// 'inner_component_transform/custom_component/component_object',
// 'inner_component_transform/custom_component/custom_component',
// 'inner_component_transform/gesture_component/GestureModeParallel',
// 'inner_component_transform/gesture_component/longPressGesture',
// 'inner_component_transform/gesture_component/panGestrue',
// 'inner_component_transform/gesture_component/pinchGesture',
// 'inner_component_transform/gesture_component/rotationGesture',
// 'inner_component_transform/gesture_component/swipeGesture',
// 'inner_component_transform/gesture_component/tapGesture',
// 'inner_component_transform/render_component/foreach/foreach',
// 'inner_component_transform/render_component/foreach/forEachSecondFunction',
// 'inner_component_transform/render_component/foreach/forEachThreeParam',
// 'inner_component_transform/render_component/foreach/forEachTwo',
// 'inner_component_transform/render_component/if/id_if',
// 'inner_component_transform/render_component/if/if',
// 'inner_component_transform/render_component/item/GridItem',
// 'inner_component_transform/render_component/item/ListItem',
// 'inner_component_transform/render_component/lazyforeach/lazyforeach',
// 'inner_component_transform/render_component/lazyforeach/lazyforEachThreeParam',
// 'inner_component_transform/render_component/repeat/repeat',
// 'inner_component_transform/render_component/repeat/repeatAttr',
// 'inner_component_transform/render_component/repeat/repeatVirtualScroll',
// 'inner_component_transform/render_component/tab/tab',
// 'inner_component_transform/simple_component/button/button',
// 'inner_component_transform/simple_component/xcomponent/XComponentContainer',
// 'inner_component_transform/transition_component/animateTo/animateTo',
// 'inner_component_transform/transition_component/navDestination_component/navDestination_component',
// 'inner_component_transform/transition_component/navigation/navigation_component',
// 'inner_component_transform/transition_component/pageTransition/pageTransition',
'inner_component_transform/$$_component/$$_component',
'inner_component_transform/$$_component/$$_componentCheck1',
'inner_component_transform/$$_component/$$_componentCheck2',
'inner_component_transform/$$_component/$$_componentCheck3',
'inner_component_transform/$$_component/$$_componentCheck4',
'inner_component_transform/$$_component/$$_componentCheck5',
'inner_component_transform/$$_component/$$_componentCheck6',
'inner_component_transform/$$_component/$$_componentCheck7',
'inner_component_transform/$$_component/$$_componentCheck8',
'inner_component_transform/$$_component/$$_componentCheck9',
'inner_component_transform/$$_component/$$_if_elseIf_else',
'inner_component_transform/custom_component/component_object',
'inner_component_transform/custom_component/custom_component',
'inner_component_transform/gesture_component/GestureModeParallel',
'inner_component_transform/gesture_component/longPressGesture',
'inner_component_transform/gesture_component/panGestrue',
'inner_component_transform/gesture_component/pinchGesture',
'inner_component_transform/gesture_component/rotationGesture',
'inner_component_transform/gesture_component/swipeGesture',
'inner_component_transform/gesture_component/tapGesture',
'inner_component_transform/render_component/foreach/foreach',
'inner_component_transform/render_component/foreach/forEachSecondFunction',
'inner_component_transform/render_component/foreach/forEachThreeParam',
'inner_component_transform/render_component/foreach/forEachTwo',
'inner_component_transform/render_component/if/id_if',
'inner_component_transform/render_component/if/if',
'inner_component_transform/render_component/item/GridItem',
'inner_component_transform/render_component/item/ListItem',
'inner_component_transform/render_component/lazyforeach/lazyforeach',
'inner_component_transform/render_component/lazyforeach/lazyforEachThreeParam',
'inner_component_transform/render_component/repeat/repeat',
'inner_component_transform/render_component/repeat/repeatAttr',
'inner_component_transform/render_component/repeat/repeatVirtualScroll',
'inner_component_transform/render_component/tab/tab',
'inner_component_transform/simple_component/button/button',
'inner_component_transform/simple_component/xcomponent/XComponentContainer',
'inner_component_transform/transition_component/animateTo/animateTo',
'inner_component_transform/transition_component/navDestination_component/navDestination_component',
'inner_component_transform/transition_component/navigation/navigation_component',
'inner_component_transform/transition_component/pageTransition/pageTransition',
// 'render_decorator/@AnimatableExtend/animatableExtend',
// 'render_decorator/@builder/@builder',
// 'render_decorator/@builder/@builderDynamicUsage$$',
// 'render_decorator/@builder/@builderOrComponentAsName',
// 'render_decorator/@builder/@builderSimplifyAfferent',
// 'render_decorator/@builder/@builderTransFormFirst',
// 'render_decorator/@builder/@builderTransFormFourth',
// 'render_decorator/@builder/@builderTransFormSecond',
// 'render_decorator/@builder/@builderTransFormThird',
// 'render_decorator/@builder/@builderVisilibity$$',
// 'render_decorator/@builder/@builderWithComponent',
// 'render_decorator/@builder/@builderWithForEach',
// 'render_decorator/@builder/@builderWithLinkData',
// 'render_decorator/@builder/handleCustomBuilder',
// 'render_decorator/@builderParam/@builderParam',
// 'render_decorator/@builderParam/@builderParamQuestionMark',
// 'render_decorator/@builderParam/@BuilderParamReturnType',
// 'render_decorator/@componentParent/@componentParent',
// 'render_decorator/@customDialog/@customDialog',
// 'render_decorator/@extend/@extend',
// 'render_decorator/@localBuilder/@localBuilder',
// 'render_decorator/@preview/@preview',
// 'render_decorator/@recycle/recycle_$$component',
// 'render_decorator/@recycle/recycle_extend_styles',
// 'render_decorator/@recycle/recycle_function_array',
// 'render_decorator/@recycle/recycle_gesture',
// 'render_decorator/@recycle/recycle_reuseId',
// 'render_decorator/@recycle/recycle',
// 'render_decorator/@styles/@styles',
// 'render_decorator/@styles/@stylesExport',
// 'render_decorator/@styles/@stylesOrComponentAsName',
'render_decorator/@AnimatableExtend/animatableExtend',
'render_decorator/@builder/@builder',
'render_decorator/@builder/@builderDynamicUsage$$',
'render_decorator/@builder/@builderOrComponentAsName',
'render_decorator/@builder/@builderSimplifyAfferent',
'render_decorator/@builder/@builderTransFormFirst',
'render_decorator/@builder/@builderTransFormFourth',
'render_decorator/@builder/@builderTransFormSecond',
'render_decorator/@builder/@builderTransFormThird',
'render_decorator/@builder/@builderVisilibity$$',
'render_decorator/@builder/@builderWithComponent',
'render_decorator/@builder/@builderWithForEach',
'render_decorator/@builder/@builderWithLinkData',
'render_decorator/@builder/handleCustomBuilder',
'render_decorator/@builderParam/@builderParam',
'render_decorator/@builderParam/@builderParamQuestionMark',
'render_decorator/@builderParam/@BuilderParamReturnType',
'render_decorator/@componentParent/@componentParent',
'render_decorator/@customDialog/@customDialog',
'render_decorator/@extend/@extend',
'render_decorator/@localBuilder/@localBuilder',
'render_decorator/@preview/@preview',
'render_decorator/@recycle/recycle_$$component',
'render_decorator/@recycle/recycle_extend_styles',
'render_decorator/@recycle/recycle_function_array',
'render_decorator/@recycle/recycle_gesture',
'render_decorator/@recycle/recycle_reuseId',
'render_decorator/@recycle/recycle',
'render_decorator/@styles/@styles',
'render_decorator/@styles/@stylesExport',
'render_decorator/@styles/@stylesOrComponentAsName',
// 'ui_context/build_ui_in_correct_place',
'ui_context/build_ui_in_correct_place',
// 'ui_state_management/application_state_management/@storageLink/@storageLink',
// 'ui_state_management/application_state_management/@storageProp/@storageProp',
// 'ui_state_management/application_state_management/appStorage/appStorage',
// 'ui_state_management/application_state_management/localStorage/localStorage',
// 'ui_state_management/application_state_management/localStorage/localStorageForBoth',
// 'ui_state_management/application_state_management/localStorage/localStorageForChainCall',
// 'ui_state_management/application_state_management/localStorage/localStorageForRoute',
// 'ui_state_management/application_state_management/localStorage/localStorageForStorage',
// 'ui_state_management/application_state_management/localStorage/localStorageForThree',
// 'ui_state_management/application_state_management/localStorage/localStorageForThreeParam',
// 'ui_state_management/application_state_management/localStorage/localStorageParam',
// 'ui_state_management/inner_struct_state_management/@link/@link',
// 'ui_state_management/inner_struct_state_management/@objectLink/@objectLink',
// 'ui_state_management/inner_struct_state_management/@prop/@prop',
// 'ui_state_management/inner_struct_state_management/@prop/@propComplexType',
// 'ui_state_management/inner_struct_state_management/@state/@state',
// 'ui_state_management/others/@consume_@provide/@consume_@provide',
// 'ui_state_management/others/@observed_@objectLink/@observed_@objectLink',
// 'ui_state_management/others/@watch/@watch',
// 'ui_state_management/others/decoratorKeyCheck/decoratorKeyCheck',
'ui_state_management/application_state_management/@storageLink/@storageLink',
'ui_state_management/application_state_management/@storageProp/@storageProp',
'ui_state_management/application_state_management/appStorage/appStorage',
'ui_state_management/application_state_management/localStorage/localStorage',
'ui_state_management/application_state_management/localStorage/localStorageForBoth',
'ui_state_management/application_state_management/localStorage/localStorageForChainCall',
'ui_state_management/application_state_management/localStorage/localStorageForRoute',
'ui_state_management/application_state_management/localStorage/localStorageForStorage',
'ui_state_management/application_state_management/localStorage/localStorageForThree',
'ui_state_management/application_state_management/localStorage/localStorageForThreeParam',
'ui_state_management/application_state_management/localStorage/localStorageParam',
'ui_state_management/inner_struct_state_management/@link/@link',
'ui_state_management/inner_struct_state_management/@objectLink/@objectLink',
'ui_state_management/inner_struct_state_management/@prop/@prop',
'ui_state_management/inner_struct_state_management/@prop/@propComplexType',
'ui_state_management/inner_struct_state_management/@state/@state',
'ui_state_management/others/@consume_@provide/@consume_@provide',
'ui_state_management/others/@observed_@objectLink/@observed_@objectLink',
'ui_state_management/others/@watch/@watch',
'ui_state_management/others/decoratorKeyCheck/decoratorKeyCheck',
// 'v2_component_decorator/builderParamStyles',
// 'v2_component_decorator/param_event_twoway_binding',
// 'v2_component_decorator/staticComponentMember'
'v2_component_decorator/builderParamStyles',
'v2_component_decorator/param_event_twoway_binding',
'v2_component_decorator/staticComponentMember'
];
export const UT_VALIDATE_PAGES: string[] = [
'Decorators/process_component_build/@BuilderParam',
'Decorators/process_component_build/arkUIComponent',
'Decorators/process_component_build/arkUIStandard',
'Decorators/process_component_build/attributeCheck',
'Decorators/process_component_build/buttonCheck',
'Decorators/process_component_build/checkNonspecificParents',
'Decorators/process_component_build/foreachParamCheck',
'Decorators/process_component_build/idCheck',
'Decorators/process_component_build/ifComponent',
'Decorators/process_component_build/rootContainerCheck',
'Decorators/process_component_build/stateStyles',
// 'Decorators/process_component_build/@BuilderParam',
// 'Decorators/process_component_build/arkUIComponent',
// 'Decorators/process_component_build/arkUIStandard',
// 'Decorators/process_component_build/attributeCheck',
// 'Decorators/process_component_build/buttonCheck',
// 'Decorators/process_component_build/checkNonspecificParents',
// 'Decorators/process_component_build/foreachParamCheck',
// 'Decorators/process_component_build/idCheck',
// 'Decorators/process_component_build/ifComponent',
// 'Decorators/process_component_build/rootContainerCheck',
// 'Decorators/process_component_build/stateStyles',
'Decorators/process_component_class/@StylesParamChack',
'Decorators/process_component_class/processComponentMethod',
'Decorators/process_component_class/updateHeritageClauses',
'Decorators/process_component_class/validateBuildMethodCount',
'Decorators/process_component_class/validateDecorators',
'Decorators/process_component_class/validateHasController',
// 'Decorators/process_component_class/@StylesParamChack',
// 'Decorators/process_component_class/processComponentMethod',
// 'Decorators/process_component_class/updateHeritageClauses',
// 'Decorators/process_component_class/validateBuildMethodCount',
// 'Decorators/process_component_class/validateDecorators',
// 'Decorators/process_component_class/validateHasController',
'Decorators/process_component_member/@linkInitialize',
'Decorators/process_component_member/@objectLinkInitialize',
'Decorators/process_component_member/processWatch',
'Decorators/process_component_member/updateBuilderParamProperty',
'Decorators/process_component_member/validateCustomDecorator',
'Decorators/process_component_member/validateDuplicateDecorator',
'Decorators/process_component_member/validateForbiddenUseStateType',
'Decorators/process_component_member/validateHasIllegalDecoratorInEntry',
'Decorators/process_component_member/validateHasIllegalQuestionToken',
'Decorators/process_component_member/validateMultiDecorators',
'Decorators/process_component_member/validateNonObservedClassType',
'Decorators/process_component_member/validatePropertyDefaultValue',
'Decorators/process_component_member/validatePropertyNonDefaultValue',
'Decorators/process_component_member/validatePropertyNonType',
'Decorators/process_component_member/validateWatchDecorator',
'Decorators/process_component_member/validateWatchParam',
// 'Decorators/process_component_member/@linkInitialize',
// 'Decorators/process_component_member/@objectLinkInitialize',
// 'Decorators/process_component_member/processWatch',
// 'Decorators/process_component_member/updateBuilderParamProperty',
// 'Decorators/process_component_member/validateCustomDecorator',
// 'Decorators/process_component_member/validateDuplicateDecorator',
// 'Decorators/process_component_member/validateForbiddenUseStateType',
// 'Decorators/process_component_member/validateHasIllegalDecoratorInEntry',
// 'Decorators/process_component_member/validateHasIllegalQuestionToken',
// 'Decorators/process_component_member/validateMultiDecorators',
// 'Decorators/process_component_member/validateNonObservedClassType', //111
// 'Decorators/process_component_member/validatePropertyDefaultValue',
// 'Decorators/process_component_member/validatePropertyNonDefaultValue',
// 'Decorators/process_component_member/validatePropertyNonType',
// 'Decorators/process_component_member/validateWatchDecorator',
// 'Decorators/process_component_member/validateWatchParam',
'Decorators/process_custom_component/checkBuilder$$',
'Decorators/process_custom_component/v2DecoratorInitFromParent',
'Decorators/process_custom_component/validateForbiddenToInitViaParam',
'Decorators/process_custom_component/validateIllegalInitFromParent',
'Decorators/process_custom_component/validateInitDecorator',
'Decorators/process_custom_component/validateMandatoryToInitViaParam',
'Decorators/process_custom_component/validateNonLinkWithDollar',
'Decorators/process_custom_component/validateParamTwoWayBind',
// 'Decorators/process_custom_component/checkBuilder$$', //111
// 'Decorators/process_custom_component/v2DecoratorInitFromParent',
// 'Decorators/process_custom_component/validateForbiddenToInitViaParam',
// 'Decorators/process_custom_component/validateIllegalInitFromParent', //111
// 'Decorators/process_custom_component/validateInitDecorator',
// 'Decorators/process_custom_component/validateMandatoryToInitViaParam',
// 'Decorators/process_custom_component/validateNonLinkWithDollar',
// 'Decorators/process_custom_component/validateParamTwoWayBind', //111
'Decorators/process_import/validateModuleName',
// 'Decorators/process_import/validateModuleName',
'Decorators/process_struct_componentV2/param_require_once_check',
'Decorators/process_struct_componentV2/v2Component_member_type_check',
// 'Decorators/process_struct_componentV2/param_require_once_check',
// 'Decorators/process_struct_componentV2/v2Component_member_type_check',
'Decorators/process_ui_syntax/EntryDecoParam',
'Decorators/process_ui_syntax/ExtendOneChild',
'Decorators/process_ui_syntax/NoSrc',
'Decorators/process_ui_syntax/NotSupportResrcParam',
'Decorators/process_ui_syntax/NotSupportResrcType',
'Decorators/process_ui_syntax/StylesNoParam',
'Decorators/process_ui_syntax/UnknownSrc',
'Decorators/process_ui_syntax/UnknownSrcName',
'Decorators/process_ui_syntax/UnknownSrcType',
// 'Decorators/process_ui_syntax/EntryDecoParam',
// 'Decorators/process_ui_syntax/ExtendOneChild',
// 'Decorators/process_ui_syntax/NoSrc',
// 'Decorators/process_ui_syntax/NotSupportResrcParam',
// 'Decorators/process_ui_syntax/NotSupportResrcType',
// 'Decorators/process_ui_syntax/StylesNoParam',
// 'Decorators/process_ui_syntax/UnknownSrc',
// 'Decorators/process_ui_syntax/UnknownSrcName',
// 'Decorators/process_ui_syntax/UnknownSrcType',
'Decorators/v1AndV2ComponentDecorators/property_observe_validate',
'Decorators/v1AndV2ComponentDecorators/v1ToV2Component',
'Decorators/v1AndV2ComponentDecorators/v1ToV2ComponentValidate',
'Decorators/v1AndV2ComponentDecorators/v2ToV1ComponentValidate',
'Decorators/v1AndV2ComponentDecorators/v2ToV1Link',
// 'Decorators/v1AndV2ComponentDecorators/property_observe_validate', //111
// 'Decorators/v1AndV2ComponentDecorators/v1ToV2Component', //111
// 'Decorators/v1AndV2ComponentDecorators/v1ToV2ComponentValidate', //111
// 'Decorators/v1AndV2ComponentDecorators/v2ToV1ComponentValidate', //111
// 'Decorators/v1AndV2ComponentDecorators/v2ToV1Link',
'Decorators/vaildate_ui_syntax/@localBuilder',
'Decorators/vaildate_ui_syntax/@Monitor',
'Decorators/vaildate_ui_syntax/@Trace',
'Decorators/vaildate_ui_syntax/@Type',
'Decorators/vaildate_ui_syntax/componentV2BothWithComponent',
'Decorators/vaildate_ui_syntax/ExceededEntry',
'Decorators/vaildate_ui_syntax/ExceededPreview',
'Decorators/vaildate_ui_syntax/MethodNoExtend',
'Decorators/vaildate_ui_syntax/mutiDecoratorInComponentV2',
'Decorators/vaildate_ui_syntax/NoChild',
'Decorators/vaildate_ui_syntax/NoStructDeco',
'Decorators/vaildate_ui_syntax/notComponent',
'Decorators/vaildate_ui_syntax/notConcurrent',
'Decorators/vaildate_ui_syntax/notConcurrentFun',
'Decorators/vaildate_ui_syntax/notConcurrentFunAster',
'Decorators/vaildate_ui_syntax/notDecorator',
'Decorators/vaildate_ui_syntax/notMethodDeco',
'Decorators/vaildate_ui_syntax/OneChild',
'Decorators/vaildate_ui_syntax/OneEntry',
'Decorators/vaildate_ui_syntax/OnlyStructDeco',
'Decorators/vaildate_ui_syntax/state',
'Decorators/vaildate_ui_syntax/StructNameInvalid',
'Decorators/vaildate_ui_syntax/StylesDuplicate',
'Decorators/vaildate_ui_syntax/v1DecoratorInComponentV2',
'Decorators/vaildate_ui_syntax/v2DecoratorInClass',
'Decorators/vaildate_ui_syntax/v2DecoratorInComponent',
'Decorators/vaildate_ui_syntax/v2MemberDecorator',
'Decorators/vaildate_ui_syntax/vaildateDecorator',
'Decorators/vaildate_ui_syntax/validate_track_observed',
'Decorators/vaildate_ui_syntax/validateAccessQualifier',
'Decorators/vaildate_ui_syntax/validateDifferentMethod',
'Decorators/vaildate_ui_syntax/validateDuplicateMethod'
// 'Decorators/vaildate_ui_syntax/@localBuilder',
// 'Decorators/vaildate_ui_syntax/@Monitor',
// 'Decorators/vaildate_ui_syntax/@Trace',
// 'Decorators/vaildate_ui_syntax/@Type',
// 'Decorators/vaildate_ui_syntax/componentV2BothWithComponent',
// 'Decorators/vaildate_ui_syntax/ExceededEntry',
// 'Decorators/vaildate_ui_syntax/ExceededPreview',
// 'Decorators/vaildate_ui_syntax/MethodNoExtend',
// 'Decorators/vaildate_ui_syntax/mutiDecoratorInComponentV2',
// 'Decorators/vaildate_ui_syntax/NoChild',
// 'Decorators/vaildate_ui_syntax/NoStructDeco',
// 'Decorators/vaildate_ui_syntax/notComponent',
// 'Decorators/vaildate_ui_syntax/notConcurrent',
// 'Decorators/vaildate_ui_syntax/notConcurrentFun',
// 'Decorators/vaildate_ui_syntax/notConcurrentFunAster',
// 'Decorators/vaildate_ui_syntax/notDecorator',
// 'Decorators/vaildate_ui_syntax/notMethodDeco',
// 'Decorators/vaildate_ui_syntax/OneChild',
// 'Decorators/vaildate_ui_syntax/OneEntry',
// 'Decorators/vaildate_ui_syntax/OnlyStructDeco',
// 'Decorators/vaildate_ui_syntax/state',
// 'Decorators/vaildate_ui_syntax/StructNameInvalid',
// 'Decorators/vaildate_ui_syntax/StylesDuplicate',
// 'Decorators/vaildate_ui_syntax/v1DecoratorInComponentV2',
// 'Decorators/vaildate_ui_syntax/v2DecoratorInClass',
// 'Decorators/vaildate_ui_syntax/v2DecoratorInComponent',
// 'Decorators/vaildate_ui_syntax/v2MemberDecorator',
// 'Decorators/vaildate_ui_syntax/vaildateDecorator',
// 'Decorators/vaildate_ui_syntax/validate_track_observed',
// 'Decorators/vaildate_ui_syntax/validateAccessQualifier',
// 'Decorators/vaildate_ui_syntax/validateDifferentMethod',
// 'Decorators/vaildate_ui_syntax/validateDuplicateMethod'
]
export const MAIN_PAGES: string[] = [

View File

@ -16,11 +16,14 @@ import {
} from '../../lib/process_ui_syntax';
import {
componentInfo,
resetUtils,
storedFileInfo
} from '../../lib/utils';
import {
partialUpdateConfig,
projectConfig,
resetGlobalProgram,
resetMain,
resources
} from '../../main';
import {
@ -29,6 +32,7 @@ import {
import {
etsTransform
} from '../../lib/fast_build/ets_ui/rollup-plugin-ets-typescript';
import processStructComponentV2 from '../../lib/process_struct_componentV2';
import {
RollUpPluginMock
} from './helpers/mockRollupContext';
@ -49,19 +53,23 @@ const PROJECT_ROOT: string = path.resolve(__dirname, '../../test/transform_ut');
const DEFAULT_PROJECT: string = 'application';
const TEST_CASES_PATH: string = path.resolve(PROJECT_ROOT, DEFAULT_PROJECT, 'entry/src/main/ets/pages');
const OUTPUTS_PATH: string = path.resolve(PROJECT_ROOT, DEFAULT_PROJECT, 'entry/build', CACHE_PATH, 'entry/src/main/ets/pages');
const MAIN_PAGES: string[] = UT_PAGES.map((p) => `pages/ut/${p}`);
mocha.describe('test UT testcases [non-preview mode]', function () {
this.timeout(7500);
mocha.before(function () {
resetUtils();
resetGlobalProgram();
resetMain();
this.rollup = new RollUpPluginMock();
this.rollup.build(PROJECT_ROOT, DEFAULT_PROJECT, UT_PAGES);
this.rollup.build(PROJECT_ROOT, DEFAULT_PROJECT, MAIN_PAGES);
this.globalProjectConfig = new ProjectConfig();
this.globalProjectConfig.setPreview(false);
this.globalProjectConfig.setIgnoreWarning(true);
this.globalProjectConfig.scan(PROJECT_ROOT, DEFAULT_PROJECT, UT_PAGES);
this.globalProjectConfig.mockCompileContextInfo(`${PROJECT_ROOT}/${DEFAULT_PROJECT}`, UT_PAGES);
this.globalProjectConfig.scan(PROJECT_ROOT, DEFAULT_PROJECT, MAIN_PAGES);
this.globalProjectConfig.mockCompileContextInfo(`${PROJECT_ROOT}/${DEFAULT_PROJECT}`, MAIN_PAGES);
this.globalProjectConfig.concat(RollUpPluginMock.mockArkProjectConfig(PROJECT_ROOT, DEFAULT_PROJECT, true));
this.rollup.share.projectConfig.concat(this.globalProjectConfig);
@ -84,13 +92,16 @@ mocha.describe('test UT testcases [non-preview mode]', function () {
});
mocha.after(() => {
this.rollup?.share?.flushLogger();
this.rollup?.share?.flushLogger();
delete this.rollup;
delete this.globalProjectConfig;
delete this.globalPartialUpdateConfig;
delete this.etsCheckerPlugin;
delete this.etsTransformPlugin;
resetUtils();
resetGlobalProgram();
resetMain();
sinon.restore();
});
@ -110,6 +121,10 @@ mocha.describe('test UT testcases [non-preview mode]', function () {
storedFileInfo.setCurrentArkTsFile();
});
mocha.afterEach(function () {
processStructComponentV2.resetStructMapInEts();
});
UT_PAGES.forEach((utPage, index) => {
mocha.it(`1-${index + 1}: test ${utPage}`, function (done) {
const sourceFilePath: string = path.resolve(TEST_CASES_PATH, `ut/${utPage}.ets`);

View File

@ -16,11 +16,14 @@ import {
} from '../../lib/process_ui_syntax';
import {
componentInfo,
resetUtils,
storedFileInfo
} from '../../lib/utils';
import {
partialUpdateConfig,
projectConfig,
resetGlobalProgram,
resetMain,
resources
} from '../../main';
import {
@ -29,6 +32,7 @@ import {
import {
etsTransform
} from '../../lib/fast_build/ets_ui/rollup-plugin-ets-typescript';
import processStructComponentV2 from '../../lib/process_struct_componentV2';
import {
RollUpPluginMock
} from './helpers/mockRollupContext';
@ -49,19 +53,23 @@ const PROJECT_ROOT: string = path.resolve(__dirname, '../../test/transform_ut');
const DEFAULT_PROJECT: string = 'application';
const TEST_CASES_PATH: string = path.resolve(PROJECT_ROOT, DEFAULT_PROJECT, 'entry/src/main/ets/pages');
const OUTPUTS_PATH: string = path.resolve(PROJECT_ROOT, DEFAULT_PROJECT, 'entry/build', CACHE_PATH, 'entry/src/main/ets/pages');
const MAIN_PAGES: string[] = UT_PARTIAL_UPFATE_PAGES.map((p) => `pages/utForPartialUpdate/${p}`);
mocha.describe('test UT for partial update testcases [non-preview mode]', function () {
this.timeout(7500);
mocha.before(function () {
resetUtils();
resetGlobalProgram();
resetMain();
this.rollup = new RollUpPluginMock();
this.rollup.build(PROJECT_ROOT, DEFAULT_PROJECT, UT_PARTIAL_UPFATE_PAGES);
this.rollup.build(PROJECT_ROOT, DEFAULT_PROJECT, MAIN_PAGES);
this.globalProjectConfig = new ProjectConfig();
this.globalProjectConfig.setPreview(false);
this.globalProjectConfig.setIgnoreWarning(true);
this.globalProjectConfig.scan(PROJECT_ROOT, DEFAULT_PROJECT, UT_PARTIAL_UPFATE_PAGES);
this.globalProjectConfig.mockCompileContextInfo(`${PROJECT_ROOT}/${DEFAULT_PROJECT}`, UT_PARTIAL_UPFATE_PAGES);
this.globalProjectConfig.scan(PROJECT_ROOT, DEFAULT_PROJECT, MAIN_PAGES);
this.globalProjectConfig.mockCompileContextInfo(`${PROJECT_ROOT}/${DEFAULT_PROJECT}`, MAIN_PAGES);
this.globalProjectConfig.concat(RollUpPluginMock.mockArkProjectConfig(PROJECT_ROOT, DEFAULT_PROJECT, true));
this.rollup.share.projectConfig.concat(this.globalProjectConfig);
@ -92,6 +100,9 @@ mocha.describe('test UT for partial update testcases [non-preview mode]', functi
delete this.etsCheckerPlugin;
delete this.etsTransformPlugin;
resetUtils();
resetGlobalProgram();
resetMain();
sinon.restore();
});
@ -111,6 +122,10 @@ mocha.describe('test UT for partial update testcases [non-preview mode]', functi
storedFileInfo.setCurrentArkTsFile();
});
mocha.afterEach(function () {
processStructComponentV2.resetStructMapInEts();
});
UT_PARTIAL_UPFATE_PAGES.forEach((utPage, index) => {
mocha.it(`1-${index + 1}: test ${utPage}`, function (done) {
const sourceFilePath: string = path.resolve(TEST_CASES_PATH, `utForPartialUpdate/${utPage}.ets`);

View File

@ -16,11 +16,14 @@ import {
} from '../../lib/process_ui_syntax';
import {
componentInfo,
resetUtils,
storedFileInfo
} from '../../lib/utils';
import {
partialUpdateConfig,
projectConfig,
resetGlobalProgram,
resetMain,
resources
} from '../../main';
import {
@ -29,6 +32,7 @@ import {
import {
etsTransform
} from '../../lib/fast_build/ets_ui/rollup-plugin-ets-typescript';
import processStructComponentV2 from '../../lib/process_struct_componentV2';
import {
RollUpPluginMock
} from './helpers/mockRollupContext';
@ -50,13 +54,17 @@ const PROJECT_ROOT: string = path.resolve(__dirname, '../../test/transform_ut');
const DEFAULT_PROJECT: string = 'application';
const TEST_CASES_PATH: string = path.resolve(PROJECT_ROOT, DEFAULT_PROJECT, 'entry/src/main/ets/pages');
const ERROR_COLLECTION_PATH: string = path.resolve(__dirname, '../../test/error.json');
const MAIN_PAGES: string[] = UT_VALIDATE_PAGES.map((p) => `pages/utForValidate/${p}`);
mocha.describe('test UT for validate testcases [non-preview mode]', function () {
this.timeout(7500);
mocha.before(function () {
resetUtils();
resetGlobalProgram();
resetMain();
this.rollup = new RollUpPluginMock();
this.rollup.build(PROJECT_ROOT, DEFAULT_PROJECT, UT_VALIDATE_PAGES);
this.rollup.build(PROJECT_ROOT, DEFAULT_PROJECT, MAIN_PAGES);
// enable logger for etsTransform roll-up plugin
this.rollup.share.flushLogger();
@ -66,15 +74,14 @@ mocha.describe('test UT for validate testcases [non-preview mode]', function ()
this.globalProjectConfig = new ProjectConfig();
this.globalProjectConfig.setPreview(false);
this.globalProjectConfig.setIgnoreWarning(true);
this.globalProjectConfig.scan(PROJECT_ROOT, DEFAULT_PROJECT, UT_VALIDATE_PAGES);
this.globalProjectConfig.mockCompileContextInfo(`${PROJECT_ROOT}/${DEFAULT_PROJECT}`, UT_VALIDATE_PAGES);
this.globalProjectConfig.scan(PROJECT_ROOT, DEFAULT_PROJECT, MAIN_PAGES);
this.globalProjectConfig.mockCompileContextInfo(`${PROJECT_ROOT}/${DEFAULT_PROJECT}`, MAIN_PAGES);
this.globalProjectConfig.concat(RollUpPluginMock.mockArkProjectConfig(PROJECT_ROOT, DEFAULT_PROJECT, true));
this.rollup.share.projectConfig.concat(this.globalProjectConfig);
Object.assign(projectConfig, this.globalProjectConfig);
this.globalPartialUpdateConfig = new PartialUpdateConfig();
this.globalPartialUpdateConfig.setPartialUpdateMode(true);
this.globalPartialUpdateConfig.mockDisableArkTSLinter();
Object.assign(partialUpdateConfig, this.globalPartialUpdateConfig);
@ -91,13 +98,16 @@ mocha.describe('test UT for validate testcases [non-preview mode]', function ()
});
mocha.after(() => {
this.rollup?.share?.flushLogger();
this.rollup?.share?.flushLogger();
delete this.rollup;
delete this.globalProjectConfig;
delete this.globalPartialUpdateConfig;
delete this.etsCheckerPlugin;
delete this.etsTransformPlugin;
resetUtils();
resetGlobalProgram();
resetMain();
sinon.restore();
});
@ -108,6 +118,7 @@ mocha.describe('test UT for validate testcases [non-preview mode]', function ()
process.env.rawFileResource = './';
process.env.compileMode = 'moduleJson';
process.env.compiler = BUILD_ON;
process.env.compileTool = 'rollup';
transformLog.errors = [];
componentInfo.id = 0;
@ -121,6 +132,7 @@ mocha.describe('test UT for validate testcases [non-preview mode]', function ()
mocha.afterEach(function () {
this.rollup?.share?.flushLogger();
processStructComponentV2.resetStructMapInEts();
});
UT_VALIDATE_PAGES.forEach((utPage, index) => {