@pisell/materials 1.8.41 → 1.8.43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/meta.js +3 -3
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +51 -216
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +51 -216
- package/es/components/Pagination/index.js +43 -9
- package/es/components/PisellCards/components/GraphicTextCard/docs/GraphicTextCard.$tab-dev.md +2 -5
- package/es/components/PisellCards/components/GraphicTextCard/docs/GraphicTextCard.$tab-test.md +171 -169
- package/es/components/PisellCards/components/GraphicTextCard/docs/GraphicTextCard.md +27 -87
- package/es/components/PisellCards/components/GraphicTextCard/types.d.ts +7 -18
- package/es/components/PisellCards/components/TextCard/TextCard.js +3 -2
- package/es/components/PisellCards/components/TextCard/components/BadgeWrapper.js +6 -20
- package/es/components/PisellCards/components/TextCard/components/TextContent.js +1 -3
- package/es/components/PisellCards/components/TextCard/docs/TextCard.$tab-dev.md +5 -36
- package/es/components/PisellCards/components/TextCard/docs/TextCard.$tab-test.md +258 -2434
- package/es/components/PisellCards/components/TextCard/docs/TextCard.md +13 -78
- package/es/components/PisellCards/index.d.ts +0 -3
- package/es/components/PisellCards/index.js +1 -3
- package/es/components/PisellLayouts/index.d.ts +1 -1
- package/es/components/PisellProcedure/components/ProcedureHeader.js +1 -1
- package/es/components/PisellTabbar/PisellTabbar.js +1 -1
- package/es/components/PisellTabbar/template/Template1/PisellTabbar.js +1 -1
- package/es/components/SafeAreaTop/index.d.ts +6 -0
- package/es/components/SafeAreaTop/index.js +112 -0
- package/es/components/SafeAreaTop/index.less +11 -0
- package/es/components/SafeAreaTop/types.d.ts +13 -0
- package/es/components/appVersionControl/index.js +2 -3
- package/es/components/dataSourceComponents/dataSourceForm/BaseForm.js +4 -4
- package/es/components/dataSourceComponents/dataSourceForm/formItem.js +1 -1
- package/es/components/dataSourceComponents/dataSourceForm/index.js +1 -1
- package/es/components/dataSourceComponents/dataSourceForm/submitButton/index.js +3 -3
- package/es/components/dataSourceComponents/dataSourceForm/utils.js +3 -3
- package/es/components/dataSourceComponents/dataSourceShow/dataSourceTypography/index.js +1 -1
- package/es/components/dataSourceComponents/dataSourceSubForm/index.js +1 -1
- package/es/components/dataSourceComponents/dataSourceTable/BaseTable.js +2 -2
- package/es/components/dataSourceComponents/dataSourceTable/filter/index.js +1 -1
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.js +2 -3
- package/es/components/dataSourceComponents/dataSourceTable/type.d.ts +0 -1
- package/es/components/dataSourceComponents/dataSourceWrapper/BaseWrapper.js +1 -1
- package/es/components/dataSourceComponents/fields/DatePicker/WithMode.js +0 -4
- package/es/components/dataSourceComponents/fields/IconSelect/WithMode.js +1 -1
- package/es/components/dataSourceComponents/fields/Input/WithMode.js +1 -1
- package/es/components/dataSourceComponents/fields/Input.Phone/serve.js +1 -4
- package/es/components/dataSourceComponents/fields/Radio/WithMode.js +1 -1
- package/es/components/dataSourceComponents/fields/TimePicker/WithMode.js +1 -1
- package/es/components/dataSourceComponents/hooks/useActions.js +1 -1
- package/es/components/dataSourceComponents/provider/dataSource/DataSourceProvider.js +1 -1
- package/es/components/drag-sort-tree/index.d.ts +0 -1
- package/es/components/drag-sort-tree/index.js +1 -0
- package/es/components/drawer/index.js +6 -7
- package/es/components/filter/components/Dropdown/index.js +4 -2
- package/es/components/filter/components/Dropdown/index.less +186 -0
- package/es/components/filter/components/FilterButton/index.js +41 -13
- package/es/components/filter/components/FilterButton/index.less +29 -0
- package/es/components/filter/components/FilterButton/types.d.ts +5 -0
- package/es/components/filter/components/FilterItem/index.js +93 -16
- package/es/components/filter/components/QuickFilter/index.js +7 -4
- package/es/components/filter/types.d.ts +4 -0
- package/es/components/login-and-register/index.js +5 -4
- package/es/components/page/index.js +1 -1
- package/es/components/pisellAppCard/PisellAppCard.js +1 -1
- package/es/components/pisellCardList/index.js +1 -1
- package/es/components/pisellCurrency/PisellCurrency.js +6 -13
- package/es/components/pisellCurrency/PisellCurrency.less +123 -0
- package/es/components/pisellDataSourceContainer/components/Pagination/index.js +9 -3
- package/es/components/pisellDataSourceContainer/docs/PisellDataSourceContainer.md +240 -189
- package/es/components/pisellDataSourceContainer/type.d.ts +1 -1
- package/es/components/pisellDateTimeDisplay/docs/pisellDateTimeDisplay.md +556 -556
- package/es/components/pisellEmail/PisellEmail.js +6 -13
- package/es/components/pisellEmail/PisellEmail.less +92 -0
- package/es/components/pisellEmpty/index.d.ts +1 -1
- package/es/components/pisellFilter/docs/PisellFilter.md +2 -2
- package/es/components/pisellFilter/index.js +7 -3
- package/es/components/pisellFind/docs/pisellFind.md +2 -2
- package/es/components/pisellFloorMapLayout/PisellFloorMapLayout.d.ts +2 -1
- package/es/components/pisellFloorMapLayout/PisellFloorMapLayout.js +480 -88
- package/es/components/pisellFloorMapLayout/PisellFloorMapLayout.less +62 -0
- package/es/components/pisellFloorMapLayout/appearance/floorMapAppearance.d.ts +4 -0
- package/es/components/pisellFloorMapLayout/appearance/floorMapAppearance.js +22 -0
- package/es/components/pisellFloorMapLayout/components/CanvasTabs.js +18 -3
- package/es/components/pisellFloorMapLayout/components/CanvasTabs.less +23 -0
- package/es/components/pisellFloorMapLayout/components/EditableItemLayer.js +3 -2
- package/es/components/pisellFloorMapLayout/components/FigmaTableCard.d.ts +2 -2
- package/es/components/pisellFloorMapLayout/components/FigmaTableCard.js +209 -74
- package/es/components/pisellFloorMapLayout/components/FloorMapBuiltinShapeElement.d.ts +11 -0
- package/es/components/pisellFloorMapLayout/components/FloorMapBuiltinShapeElement.js +123 -0
- package/es/components/pisellFloorMapLayout/components/FloorMapEditPanel.js +88 -12
- package/es/components/pisellFloorMapLayout/components/FloorMapEditPanel.less +15 -0
- package/es/components/pisellFloorMapLayout/components/FloorMapEditTopBar.js +169 -23
- package/es/components/pisellFloorMapLayout/components/FloorMapEditTopBar.less +95 -1
- package/es/components/pisellFloorMapLayout/components/FloorMapOverview.js +94 -0
- package/es/components/pisellFloorMapLayout/components/FloorMapOverview.less +65 -0
- package/es/components/pisellFloorMapLayout/components/FloorMapToolbar.js +153 -38
- package/es/components/pisellFloorMapLayout/components/FloorMapToolbar.less +178 -4
- package/es/components/pisellFloorMapLayout/components/HistoryIcons.js +64 -0
- package/es/components/pisellFloorMapLayout/components/ItemLayer.js +32 -10
- package/es/components/pisellFloorMapLayout/components/ItemLayer.less +30 -2
- package/es/components/pisellFloorMapLayout/components/ViewControls.js +119 -65
- package/es/components/pisellFloorMapLayout/components/ViewControls.less +263 -50
- package/es/components/pisellFloorMapLayout/components/ViewControlsWithZoom.js +4 -0
- package/es/components/pisellFloorMapLayout/context/mergeFloorMapLayoutContext.js +3 -1
- package/es/components/pisellFloorMapLayout/docs/pisellFloorMapLayout.md +559 -194
- package/es/components/pisellFloorMapLayout/floorMapLayoutConstants.js +21 -0
- package/es/components/pisellFloorMapLayout/hooks/floorMapViewportPersistence.js +47 -0
- package/es/components/pisellFloorMapLayout/hooks/useDraftConfigHistory.js +95 -0
- package/es/components/pisellFloorMapLayout/hooks/useFloorMapEditState.js +105 -25
- package/es/components/pisellFloorMapLayout/hooks/useFloorMapTransformMetrics.js +400 -66
- package/es/components/pisellFloorMapLayout/index.d.ts +5 -2
- package/es/components/pisellFloorMapLayout/locales-ja.js +39 -1
- package/es/components/pisellFloorMapLayout/locales-pt.js +39 -1
- package/es/components/pisellFloorMapLayout/locales.js +117 -3
- package/es/components/pisellFloorMapLayout/types.d.ts +86 -10
- package/es/components/pisellFloorMapLayout/types.js +7 -1
- package/es/components/pisellFloorMapLayout/utils/floorMapBuiltinShapes.d.ts +46 -0
- package/es/components/pisellFloorMapLayout/utils/floorMapBuiltinShapes.js +533 -0
- package/es/components/pisellFloorMapLayout/utils/floorMapCanvasStage.js +139 -0
- package/es/components/pisellFloorMapLayout/utils/floorMapConfigMerge.js +11 -2
- package/es/components/pisellFloorMapLayout/utils/floorMapDropUtils.js +3 -1
- package/es/components/pisellFloorMapLayout/utils/floorMapElementKindUtils.d.ts +3 -1
- package/es/components/pisellFloorMapLayout/utils/floorMapElementKindUtils.js +31 -7
- package/es/components/pisellFloorMapLayout/utils/floorMapElementNameAsTitle.d.ts +52 -0
- package/es/components/pisellFloorMapLayout/utils/floorMapElementNameAsTitle.js +61 -0
- package/es/components/pisellFloorMapLayout/utils/floorMapFallbackRender.js +12 -1
- package/es/components/pisellFloorMapLayout/utils/floorMapOverviewLayout.js +64 -0
- package/es/components/pisellFloorMapLayout/utils/floorMapViewConfigDiff.js +3 -2
- package/es/components/pisellGoodPassCard/index.less +1 -0
- package/es/components/pisellGridPro/GridView/docs/GridView.md +47 -48
- package/es/components/pisellGridPro/ToolBar/docs/ToolBar.$tab-dev.md +4 -2
- package/es/components/pisellGridPro/ToolBar/docs/ToolBar.md +95 -81
- package/es/components/pisellGridPro/ToolBar/index.less +5 -4
- package/es/components/pisellGridPro/docs/PisellGridPro.md +173 -262
- package/es/components/pisellHierarchicalSummaryList/docs/pisellHierarchicalSummaryList.$tab-dev.md +3 -6
- package/es/components/pisellHierarchicalSummaryList/docs/pisellHierarchicalSummaryList.$tab-test.md +3 -4
- package/es/components/pisellHierarchicalSummaryList/docs/pisellHierarchicalSummaryList.md +1 -2
- package/es/components/pisellLongText/PisellLongText.js +6 -13
- package/es/components/pisellLongText/PisellLongText.less +67 -0
- package/es/components/pisellLookup/PisellLookup.js +1 -1
- package/es/components/pisellLookup/PisellLookup.less +46 -4
- package/es/components/pisellLookup/components/LookupResultHost.js +1 -1
- package/es/components/pisellLookup/components/LookupTrigger.js +6 -8
- package/es/components/pisellLookup/docs/pisellLookup.md +1 -1
- package/es/components/pisellMobileDateRangePicker/PisellMobileDateRangePicker.d.ts +9 -0
- package/es/components/pisellMobileDateRangePicker/PisellMobileDateRangePicker.js +149 -0
- package/es/components/pisellMobileDateRangePicker/PisellMobileDateRangePicker.less +73 -0
- package/es/components/pisellMobileDateRangePicker/index.d.ts +2 -0
- package/es/components/pisellMobileDateRangePicker/types.d.ts +31 -0
- package/es/components/pisellMobileDateRangePicker/types.js +4 -0
- package/es/components/pisellMultipleSelect/PisellMultipleSelect.js +5 -7
- package/es/components/pisellMultipleSelect/PisellMultipleSelect.less +139 -18
- package/es/components/pisellMultipleSelect/components/EditView.js +0 -1
- package/es/components/pisellNavigationMenu/PisellNavigationMenu.js +0 -4
- package/es/components/pisellNumber/PisellNumber.js +6 -13
- package/es/components/pisellNumber/PisellNumber.less +103 -0
- package/es/components/pisellPhone/PisellPhone.js +6 -13
- package/es/components/pisellPhone/PisellPhone.less +119 -0
- package/es/components/pisellPhone/components/EditView.js +19 -37
- package/es/components/pisellPhone/constants/countryCodes.js +25 -26
- package/es/components/pisellPhone/types.d.ts +2 -2
- package/es/components/pisellPhone/utils/countryCodeHelper.js +2 -2
- package/es/components/pisellQuickFilter/{doc → docs}/PisellQuickFilter.md +1 -1
- package/es/components/pisellRating/PisellRating.js +3 -5
- package/es/components/pisellRecordBoard/PisellRecordBoard.js +29 -10
- package/es/components/pisellRecordBoard/README.md +12 -0
- package/es/components/pisellRecordBoard/docs/PisellRecordBoard.md +716 -70
- package/es/components/pisellRecordBoard/docs/ShellFrame.md +62 -44
- package/es/components/pisellRecordBoard/index.d.ts +8 -1
- package/es/components/pisellRecordBoard/index.js +5 -0
- package/es/components/pisellRecordBoard/layouts/GridLayout/Grid.js +174 -17
- package/es/components/pisellRecordBoard/layouts/GridLayout/Grid.less +79 -0
- package/es/components/pisellRecordBoard/shellFrame/Calendar/BookingCalendar.js +758 -0
- package/es/components/pisellRecordBoard/shellFrame/Calendar/BookingCalendar.less +313 -0
- package/es/components/pisellRecordBoard/shellFrame/Calendar/PisellRecordBoardCalendarView.d.ts +5 -1
- package/es/components/pisellRecordBoard/shellFrame/Calendar/PisellRecordBoardCalendarView.js +10 -8
- package/es/components/pisellRecordBoard/shellFrame/Calendar/bookingCalendarViewShared.js +191 -0
- package/es/components/pisellRecordBoard/shellFrame/Calendar/calendarI18n.js +22 -0
- package/es/components/pisellRecordBoard/shellFrame/Calendar/calendarPersistGuard.d.ts +1 -1
- package/es/components/pisellRecordBoard/shellFrame/Calendar/const/bookingCalendarConstants.js +39 -0
- package/es/components/pisellRecordBoard/shellFrame/Calendar/hooks/useBookingCalendarDayOverlayLayout.js +74 -0
- package/es/components/pisellRecordBoard/shellFrame/Calendar/modal/BookingCalendarBlockPanel.js +61 -0
- package/es/components/pisellRecordBoard/shellFrame/Calendar/modal/BookingCalendarOverflowListLayer.js +26 -0
- package/es/components/pisellRecordBoard/shellFrame/Calendar/modal/MoveConfirmModal.js +79 -0
- package/es/components/pisellRecordBoard/shellFrame/Calendar/modal/OverflowListModal.js +61 -0
- package/es/components/pisellRecordBoard/shellFrame/Calendar/modal/OverflowPopover.js +37 -0
- package/es/components/pisellRecordBoard/shellFrame/Calendar/utils/BookingCalendarStyle.js +20 -0
- package/es/components/pisellRecordBoard/shellFrame/Calendar/utils/bookingCalendarDateUtils.js +532 -0
- package/es/components/pisellRecordBoard/shellFrame/Calendar/utils/bookingCalendarSelectionUtils.js +17 -0
- package/es/components/pisellRecordBoard/shellFrame/Calendar/view/BookingCalendarDaySelectionBar.js +31 -0
- package/es/components/pisellRecordBoard/shellFrame/Calendar/view/BookingCalendarDayView.js +583 -0
- package/es/components/pisellRecordBoard/shellFrame/Calendar/view/BookingCalendarGroupRowHeader.js +41 -0
- package/es/components/pisellRecordBoard/shellFrame/Calendar/view/BookingCalendarMonthView.js +111 -0
- package/es/components/pisellRecordBoard/shellFrame/Calendar/view/BookingCalendarResourceView.js +612 -0
- package/es/components/pisellRecordBoard/shellFrame/Calendar/view/BookingCalendarWeekView.js +168 -0
- package/es/components/pisellRecordBoard/shellFrame/Calendar/view/bookingCalendarDayViewContext.js +8 -0
- package/es/components/pisellRecordBoard/shellFrame/Calendar/view/day/useBookingCalendarDayHourRemaining.js +33 -0
- package/es/components/pisellRecordBoard/shellFrame/Calendar/view/day/useBookingCalendarDaySelection.js +37 -0
- package/es/components/pisellRecordBoard/shellFrame/Calendar/view/resource/useBookingCalendarResourceCellToggle.js +18 -0
- package/es/components/pisellRecordBoard/shellFrame/Calendar/view/resource/useBookingCalendarResourceDayHeaderRemaining.js +33 -0
- package/es/components/pisellRecordBoard/shellFrame/Calendar/view/useBookingCalendarGoToDayFromCell.js +29 -0
- package/es/components/pisellRecordBoard/shellFrame/ColumnSetting/index.js +2 -1
- package/es/components/pisellRecordBoard/shellFrame/Pagination/index.js +7 -1
- package/es/components/pisellRecordBoard/shellFrame/ResourceWall/NoteTicker.js +43 -0
- package/es/components/pisellRecordBoard/shellFrame/ResourceWall/PisellRecordBoardResourceWallView.d.ts +14 -0
- package/es/components/pisellRecordBoard/shellFrame/ResourceWall/PisellRecordBoardResourceWallView.js +436 -0
- package/es/components/pisellRecordBoard/shellFrame/ResourceWall/RecordBoardResourceWall.d.ts +11 -0
- package/es/components/pisellRecordBoard/shellFrame/ResourceWall/RecordBoardResourceWall.js +9 -0
- package/es/components/pisellRecordBoard/shellFrame/ResourceWall/ResourceWallControlPanel.js +179 -0
- package/es/components/pisellRecordBoard/shellFrame/ResourceWall/ResourceWallControlPanelColorTab.js +62 -0
- package/es/components/pisellRecordBoard/shellFrame/ResourceWall/ResourceWallControlPanelLayoutTab.js +57 -0
- package/es/components/pisellRecordBoard/shellFrame/ResourceWall/ResourceWallViewport.less +88 -0
- package/es/components/pisellRecordBoard/shellFrame/ResourceWall/ResourceWallViewportToolbar.js +83 -0
- package/es/components/pisellRecordBoard/shellFrame/ResourceWall/VenueWallCard.js +218 -0
- package/es/components/pisellRecordBoard/shellFrame/ResourceWall/VenueWallCard.less +339 -0
- package/es/components/pisellRecordBoard/shellFrame/ResourceWall/VenueWallMarquee.less +52 -0
- package/es/components/pisellRecordBoard/shellFrame/ResourceWall/venueWallCardPresentation.js +153 -0
- package/es/components/pisellRecordBoard/shellFrame/ResourceWall/venueWallUtils.d.ts +32 -0
- package/es/components/pisellRecordBoard/shellFrame/ResourceWall/venueWallUtils.js +170 -0
- package/es/components/pisellRecordBoard/shellFrame/Search/index.js +1 -1
- package/es/components/pisellRecordBoard/shellFrame/ShellBodyMetaContext.d.ts +5 -1
- package/es/components/pisellRecordBoard/shellFrame/ToolBar/ToolBarFilter.less +30 -3
- package/es/components/pisellRecordBoard/shellFrame/ToolBar/index.js +157 -68
- package/es/components/pisellRecordBoard/shellFrame/ToolBar/recordBoardToolBarConstants.js +11 -0
- package/es/components/pisellRecordBoard/shellFrame/ToolBar/recordBoardToolBarI18n.js +56 -0
- package/es/components/pisellRecordBoard/shellFrame/ToolBar/recordBoardToolbar.less +406 -14
- package/es/components/pisellRecordBoard/shellFrame/ToolBarQuickFilter/index.js +14 -4
- package/es/components/pisellRecordBoard/shellFrame/index.d.ts +9 -2
- package/es/components/pisellRecordBoard/shellFrame/index.js +73 -19
- package/es/components/pisellRecordBoard/types.d.ts +413 -8
- package/es/components/pisellRecordBoard/types.js +12 -0
- package/es/components/pisellRecordBoard/utils/partitionShellFrameChildren.js +16 -0
- package/es/components/pisellRecordBoard/utils/recordBoardPhoneGrid.d.ts +22 -0
- package/es/components/pisellRecordBoard/utils/recordBoardPhoneGrid.js +46 -0
- package/es/components/pisellReservationSchedule/PisellReservationSchedule.js +67 -15
- package/es/components/pisellReservationSchedule/PisellReservationSchedule.less +23 -0
- package/es/components/pisellReservationSchedule/locales.js +21 -3
- package/es/components/pisellReservationSchedule/types.d.ts +5 -0
- package/es/components/pisellReservationScheduleBand/PisellReservationScheduleBand.js +11 -6
- package/es/components/pisellReservationScheduleBand/PisellReservationScheduleBand.less +37 -4
- package/es/components/pisellReservationScheduleBand/index.d.ts +2 -1
- package/es/components/pisellReservationScheduleBand/types.d.ts +13 -2
- package/es/components/pisellReservationScheduleBand/utils/formatScheduleAtLabel.d.ts +13 -0
- package/es/components/pisellReservationScheduleBand/utils/formatScheduleAtLabel.js +17 -0
- package/es/components/pisellShellFrame/PisellShellFrame.js +2 -2
- package/es/components/pisellShellFrame/PisellShellFrame.less +18 -2
- package/es/components/pisellShellFrame/types.d.ts +6 -0
- package/es/components/pisellSingleLineText/PisellSingleLineText.js +14 -21
- package/es/components/pisellSingleLineText/PisellSingleLineText.less +143 -0
- package/es/components/pisellSingleLineText/docs/pisellSingleLineText.md +256 -256
- package/es/components/pisellSingleSelect/PisellSingleSelect.js +4 -7
- package/es/components/pisellSingleSelect/PisellSingleSelect.less +106 -5
- package/es/components/pisellSingleSelect/docs/pisellSingleSelect.md +428 -525
- package/es/components/pisellSort/docs/PisellSort.md +131 -67
- package/es/components/pisellStatisticList/index.js +0 -1
- package/es/components/pisellTimeNavigator/PisellTimeNavigator.js +227 -58
- package/es/components/pisellTimeNavigator/PisellTimeNavigator.less +128 -15
- package/es/components/pisellTimeNavigator/components/CursorLayer.js +3 -3
- package/es/components/pisellTimeNavigator/components/GestureLayer.js +12 -3
- package/es/components/pisellTimeNavigator/components/ScaleLayer.js +34 -6
- package/es/components/pisellTimeNavigator/docs/pisellTimeNavigator.$tab-dev.md +26 -42
- package/es/components/pisellTimeNavigator/docs/pisellTimeNavigator.$tab-test.md +5 -5
- package/es/components/pisellTimeNavigator/hooks/useTimeAxis.js +43 -23
- package/es/components/pisellTimeNavigator/index.d.ts +1 -1
- package/es/components/pisellTimeNavigator/types.d.ts +15 -0
- package/es/components/pisellTimeNavigator/utils/index.d.ts +25 -4
- package/es/components/pisellTimeNavigator/utils/index.js +85 -17
- package/es/components/pisellTimeRangeDisplay/docs/pisellTimeRangeDisplay.md +226 -227
- package/es/components/pisellUrl/PisellUrl.js +6 -13
- package/es/components/pisellWalletPassCard/index.js +5 -11
- package/es/components/productCard/cartSkuCard/components/Gift/index.js +34 -0
- package/es/components/productCard/cartSkuCard/components/Gift/index.less +84 -0
- package/es/components/productCard/cartSkuCard/components/Promotion/index.js +23 -0
- package/es/components/productCard/cartSkuCard/components/Promotion/index.less +16 -0
- package/es/components/productCard/cartSkuCard/components/basicInfo/index.js +65 -4
- package/es/components/productCard/cartSkuCard/components/basicInfo/index.less +80 -1
- package/es/components/productCard/cartSkuCard/components/holders/index.js +1 -1
- package/es/components/productCard/cartSkuCard/components/packages/index.js +24 -9
- package/es/components/productCard/cartSkuCard/components/specs/index.js +22 -7
- package/es/components/productCard/cartSkuCard/components/specs/index.less +11 -0
- package/es/components/productCard/cartSkuCard/components/timeRange/index.js +2 -1
- package/es/components/productCard/cartSkuCard/components/weighing/index.js +27 -0
- package/es/components/productCard/cartSkuCard/components/weighing/index.less +25 -0
- package/es/components/productCard/cartSkuCard/index.js +68 -8
- package/es/components/productCard/cartSkuCard/locales.js +40 -5
- package/es/components/productCard/components/Header/DeleteButton/index.js +2 -2
- package/es/components/productCard/components/Header/DeleteButton/index.less +1 -2
- package/es/components/productCard/components/Header/EditButton/index.js +2 -1
- package/es/components/productCard/components/Header/index.less +1 -1
- package/es/components/productCard/components/Time/components/SelectHolder/index.js +2 -3
- package/es/components/productCard/components/Time/components/SelectHolderModal/index.js +1 -1
- package/es/components/productCard/components/Time/components/SelectHolderMultiple/index.js +2 -2
- package/es/components/productCard/components/Time/components/SelectResource/index.js +3 -6
- package/es/components/productCard/components/Time/index.js +2 -3
- package/es/components/productCard/index.d.ts +1 -0
- package/es/components/productCard/index.js +2 -0
- package/es/components/productCard/lineItem/BookingLineItem.js +173 -0
- package/es/components/productCard/lineItem/index.js +195 -0
- package/es/components/productCard/lineItem/index.less +195 -0
- package/es/components/productCard/lineItem/locales.js +25 -0
- package/es/components/productCard/status.js +3 -0
- package/es/components/productCard/types.d.ts +10 -0
- package/es/components/productCard/utils.js +1 -1
- package/es/components/select/index.js +1 -1
- package/es/components/select-time/index.js +1 -0
- package/es/components/table/Actions/component/ExportImport/index.js +4 -3
- package/es/components/table/Actions/component/GallerySetting/index.js +9 -10
- package/es/components/table/Actions/component/ViewMode/index.js +3 -4
- package/es/components/table/Actions/index.js +1 -1
- package/es/components/table/BasicTable/index.js +2 -2
- package/es/components/table/Gallery/components/GalleryItem/components/Title/index.less +1 -1
- package/es/components/table/Gallery/components/GalleryItem/index.js +4 -12
- package/es/components/table/Gallery/components/GalleryItem/index.less +0 -1
- package/es/components/table/Gallery/index.js +3 -11
- package/es/components/table/Table/fields/text/Show/index.js +1 -1
- package/es/components/table/Table/index.js +1 -2
- package/es/components/table/Table/tableConfig/header/index.js +1 -1
- package/es/components/table/Table/utils.js +1 -5
- package/es/components/table/hooks/useTableSetting.js +0 -3
- package/es/components/table/hooks/useTransDataSource.js +3 -4
- package/es/components/table/index.js +1 -1
- package/es/components/tabs/index.less +1 -1
- package/es/components/translation/index.d.ts +0 -1
- package/es/components/translation/index.js +10 -36
- package/es/components/translation/index.less +0 -12
- package/es/components/versionModal/index.d.ts +0 -1
- package/es/components/versionModal/index.js +2 -2
- package/es/components/versionSelect/index.js +1 -1
- package/es/components/virtual-keyboard/Amount/index.js +1 -1
- package/es/index.d.ts +101 -106
- package/es/index.js +97 -94
- package/es/locales/en-US.js +195 -70
- package/es/locales/ja.js +196 -13
- package/es/locales/pt.js +196 -13
- package/es/locales/zh-CN.js +189 -64
- package/es/locales/zh-TW.js +194 -69
- package/es/pisell-materials.tw.css +0 -1
- package/es/tailwind-input.css +3 -1
- package/lib/components/Pagination/index.js +42 -8
- package/lib/components/PisellCards/components/GraphicTextCard/docs/GraphicTextCard.$tab-dev.md +2 -5
- package/lib/components/PisellCards/components/GraphicTextCard/docs/GraphicTextCard.$tab-test.md +171 -169
- package/lib/components/PisellCards/components/GraphicTextCard/docs/GraphicTextCard.md +27 -87
- package/lib/components/PisellCards/components/GraphicTextCard/types.d.ts +7 -18
- package/lib/components/PisellCards/components/TextCard/TextCard.js +3 -2
- package/lib/components/PisellCards/components/TextCard/components/BadgeWrapper.js +6 -20
- package/lib/components/PisellCards/components/TextCard/components/TextContent.js +1 -3
- package/lib/components/PisellCards/components/TextCard/docs/TextCard.$tab-dev.md +5 -36
- package/lib/components/PisellCards/components/TextCard/docs/TextCard.$tab-test.md +258 -2434
- package/lib/components/PisellCards/components/TextCard/docs/TextCard.md +13 -78
- package/lib/components/PisellCards/index.d.ts +0 -3
- package/lib/components/PisellCards/index.js +1 -3
- package/lib/components/PisellLayouts/index.d.ts +1 -1
- package/lib/components/PisellProcedure/components/ProcedureHeader.js +1 -1
- package/lib/components/PisellTabbar/PisellTabbar.js +6 -6
- package/lib/components/PisellTabbar/template/Template1/PisellTabbar.js +6 -6
- package/lib/components/SafeAreaTop/index.d.ts +6 -0
- package/lib/components/SafeAreaTop/index.js +115 -0
- package/lib/components/SafeAreaTop/index.less +11 -0
- package/lib/components/SafeAreaTop/types.d.ts +13 -0
- package/lib/components/appVersionControl/index.js +11 -12
- package/lib/components/dataSourceComponents/dataSourceForm/BaseForm.js +6 -6
- package/lib/components/dataSourceComponents/dataSourceForm/formItem.js +1 -1
- package/lib/components/dataSourceComponents/dataSourceForm/index.js +1 -1
- package/lib/components/dataSourceComponents/dataSourceForm/submitButton/index.js +3 -3
- package/lib/components/dataSourceComponents/dataSourceForm/utils.js +3 -3
- package/lib/components/dataSourceComponents/dataSourceShow/dataSourceTypography/index.js +1 -1
- package/lib/components/dataSourceComponents/dataSourceSubForm/index.js +1 -1
- package/lib/components/dataSourceComponents/dataSourceTable/BaseTable.js +2 -2
- package/lib/components/dataSourceComponents/dataSourceTable/filter/index.js +1 -1
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.js +2 -3
- package/lib/components/dataSourceComponents/dataSourceTable/type.d.ts +0 -1
- package/lib/components/dataSourceComponents/dataSourceWrapper/BaseWrapper.js +1 -1
- package/lib/components/dataSourceComponents/fields/DatePicker/WithMode.js +0 -4
- package/lib/components/dataSourceComponents/fields/IconSelect/WithMode.js +1 -1
- package/lib/components/dataSourceComponents/fields/Input/WithMode.js +1 -1
- package/lib/components/dataSourceComponents/fields/Input.Phone/serve.js +1 -4
- package/lib/components/dataSourceComponents/fields/Radio/WithMode.js +1 -1
- package/lib/components/dataSourceComponents/fields/TimePicker/WithMode.js +4 -4
- package/lib/components/dataSourceComponents/hooks/useActions.js +1 -1
- package/lib/components/dataSourceComponents/provider/dataSource/DataSourceProvider.js +1 -1
- package/lib/components/drag-sort-tree/index.d.ts +0 -1
- package/lib/components/drag-sort-tree/index.js +1 -0
- package/lib/components/drawer/index.js +6 -7
- package/lib/components/filter/components/Dropdown/index.js +5 -2
- package/lib/components/filter/components/Dropdown/index.less +186 -0
- package/lib/components/filter/components/FilterButton/index.js +40 -12
- package/lib/components/filter/components/FilterButton/index.less +29 -0
- package/lib/components/filter/components/FilterButton/types.d.ts +5 -0
- package/lib/components/filter/components/FilterItem/index.js +94 -16
- package/lib/components/filter/components/QuickFilter/index.js +7 -4
- package/lib/components/filter/types.d.ts +4 -0
- package/lib/components/login-and-register/index.js +5 -4
- package/lib/components/page/index.js +1 -1
- package/lib/components/pisellAppCard/PisellAppCard.js +7 -7
- package/lib/components/pisellCardList/index.js +6 -6
- package/lib/components/pisellCurrency/PisellCurrency.js +6 -13
- package/lib/components/pisellCurrency/PisellCurrency.less +123 -0
- package/lib/components/pisellDataSourceContainer/components/Pagination/index.js +9 -3
- package/lib/components/pisellDataSourceContainer/docs/PisellDataSourceContainer.md +240 -189
- package/lib/components/pisellDataSourceContainer/type.d.ts +1 -1
- package/lib/components/pisellDateTimeDisplay/docs/pisellDateTimeDisplay.md +556 -556
- package/lib/components/pisellEmail/PisellEmail.js +6 -13
- package/lib/components/pisellEmail/PisellEmail.less +92 -0
- package/lib/components/pisellEmpty/index.d.ts +1 -1
- package/lib/components/pisellFilter/docs/PisellFilter.md +2 -2
- package/lib/components/pisellFilter/index.js +7 -3
- package/lib/components/pisellFind/docs/pisellFind.md +2 -2
- package/lib/components/pisellFloorMapLayout/PisellFloorMapLayout.d.ts +2 -1
- package/lib/components/pisellFloorMapLayout/PisellFloorMapLayout.js +478 -86
- package/lib/components/pisellFloorMapLayout/PisellFloorMapLayout.less +62 -0
- package/lib/components/pisellFloorMapLayout/appearance/floorMapAppearance.d.ts +4 -0
- package/lib/components/pisellFloorMapLayout/appearance/floorMapAppearance.js +22 -0
- package/lib/components/pisellFloorMapLayout/components/CanvasTabs.js +18 -3
- package/lib/components/pisellFloorMapLayout/components/CanvasTabs.less +23 -0
- package/lib/components/pisellFloorMapLayout/components/EditableItemLayer.js +3 -2
- package/lib/components/pisellFloorMapLayout/components/FigmaTableCard.d.ts +2 -2
- package/lib/components/pisellFloorMapLayout/components/FigmaTableCard.js +209 -74
- package/lib/components/pisellFloorMapLayout/components/FloorMapBuiltinShapeElement.d.ts +11 -0
- package/lib/components/pisellFloorMapLayout/components/FloorMapBuiltinShapeElement.js +125 -0
- package/lib/components/pisellFloorMapLayout/components/FloorMapEditPanel.js +86 -10
- package/lib/components/pisellFloorMapLayout/components/FloorMapEditPanel.less +15 -0
- package/lib/components/pisellFloorMapLayout/components/FloorMapEditTopBar.js +168 -22
- package/lib/components/pisellFloorMapLayout/components/FloorMapEditTopBar.less +95 -1
- package/lib/components/pisellFloorMapLayout/components/FloorMapOverview.js +97 -0
- package/lib/components/pisellFloorMapLayout/components/FloorMapOverview.less +65 -0
- package/lib/components/pisellFloorMapLayout/components/FloorMapToolbar.js +150 -35
- package/lib/components/pisellFloorMapLayout/components/FloorMapToolbar.less +178 -4
- package/lib/components/pisellFloorMapLayout/components/HistoryIcons.js +67 -0
- package/lib/components/pisellFloorMapLayout/components/ItemLayer.js +32 -10
- package/lib/components/pisellFloorMapLayout/components/ItemLayer.less +30 -2
- package/lib/components/pisellFloorMapLayout/components/ViewControls.js +118 -64
- package/lib/components/pisellFloorMapLayout/components/ViewControls.less +263 -50
- package/lib/components/pisellFloorMapLayout/components/ViewControlsWithZoom.js +4 -0
- package/lib/components/pisellFloorMapLayout/context/mergeFloorMapLayoutContext.js +3 -1
- package/lib/components/pisellFloorMapLayout/docs/pisellFloorMapLayout.md +559 -194
- package/lib/components/pisellFloorMapLayout/floorMapLayoutConstants.js +25 -0
- package/lib/components/pisellFloorMapLayout/hooks/floorMapViewportPersistence.js +52 -0
- package/lib/components/pisellFloorMapLayout/hooks/useDraftConfigHistory.js +96 -0
- package/lib/components/pisellFloorMapLayout/hooks/useFloorMapEditState.js +104 -24
- package/lib/components/pisellFloorMapLayout/hooks/useFloorMapTransformMetrics.js +399 -65
- package/lib/components/pisellFloorMapLayout/index.d.ts +5 -2
- package/lib/components/pisellFloorMapLayout/locales-ja.js +39 -1
- package/lib/components/pisellFloorMapLayout/locales-pt.js +39 -1
- package/lib/components/pisellFloorMapLayout/locales.js +117 -3
- package/lib/components/pisellFloorMapLayout/types.d.ts +86 -10
- package/lib/components/pisellFloorMapLayout/types.js +7 -0
- package/lib/components/pisellFloorMapLayout/utils/floorMapBuiltinShapes.d.ts +46 -0
- package/lib/components/pisellFloorMapLayout/utils/floorMapBuiltinShapes.js +536 -0
- package/lib/components/pisellFloorMapLayout/utils/floorMapCanvasStage.js +140 -0
- package/lib/components/pisellFloorMapLayout/utils/floorMapConfigMerge.js +11 -2
- package/lib/components/pisellFloorMapLayout/utils/floorMapDropUtils.js +3 -1
- package/lib/components/pisellFloorMapLayout/utils/floorMapElementKindUtils.d.ts +3 -1
- package/lib/components/pisellFloorMapLayout/utils/floorMapElementKindUtils.js +30 -5
- package/lib/components/pisellFloorMapLayout/utils/floorMapElementNameAsTitle.d.ts +52 -0
- package/lib/components/pisellFloorMapLayout/utils/floorMapElementNameAsTitle.js +64 -0
- package/lib/components/pisellFloorMapLayout/utils/floorMapFallbackRender.js +11 -0
- package/lib/components/pisellFloorMapLayout/utils/floorMapOverviewLayout.js +64 -0
- package/lib/components/pisellFloorMapLayout/utils/floorMapViewConfigDiff.js +4 -2
- package/lib/components/pisellGoodPassCard/index.less +1 -0
- package/lib/components/pisellGridPro/GridView/docs/GridView.md +47 -48
- package/lib/components/pisellGridPro/ToolBar/docs/ToolBar.$tab-dev.md +4 -2
- package/lib/components/pisellGridPro/ToolBar/docs/ToolBar.md +95 -81
- package/lib/components/pisellGridPro/ToolBar/index.less +5 -4
- package/lib/components/pisellGridPro/docs/PisellGridPro.md +173 -262
- package/lib/components/pisellHierarchicalSummaryList/docs/pisellHierarchicalSummaryList.$tab-dev.md +3 -6
- package/lib/components/pisellHierarchicalSummaryList/docs/pisellHierarchicalSummaryList.$tab-test.md +3 -4
- package/lib/components/pisellHierarchicalSummaryList/docs/pisellHierarchicalSummaryList.md +1 -2
- package/lib/components/pisellLongText/PisellLongText.js +6 -13
- package/lib/components/pisellLongText/PisellLongText.less +67 -0
- package/lib/components/pisellLookup/PisellLookup.js +1 -1
- package/lib/components/pisellLookup/PisellLookup.less +46 -4
- package/lib/components/pisellLookup/components/LookupResultHost.js +1 -1
- package/lib/components/pisellLookup/components/LookupTrigger.js +6 -8
- package/lib/components/pisellLookup/docs/pisellLookup.md +1 -1
- package/lib/components/pisellMobileDateRangePicker/PisellMobileDateRangePicker.d.ts +9 -0
- package/lib/components/pisellMobileDateRangePicker/PisellMobileDateRangePicker.js +160 -0
- package/lib/components/pisellMobileDateRangePicker/PisellMobileDateRangePicker.less +73 -0
- package/lib/components/pisellMobileDateRangePicker/index.d.ts +2 -0
- package/lib/components/pisellMobileDateRangePicker/types.d.ts +31 -0
- package/lib/components/pisellMobileDateRangePicker/types.js +4 -0
- package/lib/components/pisellMultipleSelect/PisellMultipleSelect.js +4 -6
- package/lib/components/pisellMultipleSelect/PisellMultipleSelect.less +139 -18
- package/lib/components/pisellMultipleSelect/components/EditView.js +0 -1
- package/lib/components/pisellNavigationMenu/PisellNavigationMenu.js +0 -4
- package/lib/components/pisellNumber/PisellNumber.js +6 -13
- package/lib/components/pisellNumber/PisellNumber.less +103 -0
- package/lib/components/pisellPhone/PisellPhone.js +6 -13
- package/lib/components/pisellPhone/PisellPhone.less +119 -0
- package/lib/components/pisellPhone/components/EditView.js +19 -37
- package/lib/components/pisellPhone/constants/countryCodes.js +25 -26
- package/lib/components/pisellPhone/types.d.ts +2 -2
- package/lib/components/pisellPhone/utils/countryCodeHelper.js +2 -2
- package/lib/components/pisellQuickFilter/{doc → docs}/PisellQuickFilter.md +1 -1
- package/lib/components/pisellRating/PisellRating.js +2 -4
- package/lib/components/pisellRecordBoard/PisellRecordBoard.js +29 -10
- package/lib/components/pisellRecordBoard/README.md +12 -0
- package/lib/components/pisellRecordBoard/docs/PisellRecordBoard.md +716 -70
- package/lib/components/pisellRecordBoard/docs/ShellFrame.md +62 -44
- package/lib/components/pisellRecordBoard/index.d.ts +8 -1
- package/lib/components/pisellRecordBoard/index.js +5 -0
- package/lib/components/pisellRecordBoard/layouts/GridLayout/Grid.js +174 -16
- package/lib/components/pisellRecordBoard/layouts/GridLayout/Grid.less +79 -0
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/BookingCalendar.js +760 -0
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/BookingCalendar.less +313 -0
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/PisellRecordBoardCalendarView.d.ts +5 -1
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/PisellRecordBoardCalendarView.js +11 -8
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/bookingCalendarViewShared.js +197 -0
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/calendarI18n.js +23 -0
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/calendarPersistGuard.d.ts +1 -1
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/const/bookingCalendarConstants.js +44 -0
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/hooks/useBookingCalendarDayOverlayLayout.js +75 -0
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/modal/BookingCalendarBlockPanel.js +63 -0
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/modal/BookingCalendarOverflowListLayer.js +28 -0
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/modal/MoveConfirmModal.js +81 -0
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/modal/OverflowListModal.js +64 -0
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/modal/OverflowPopover.js +39 -0
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/utils/BookingCalendarStyle.js +21 -0
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/utils/bookingCalendarDateUtils.js +562 -0
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/utils/bookingCalendarSelectionUtils.js +17 -0
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/view/BookingCalendarDaySelectionBar.js +33 -0
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/view/BookingCalendarDayView.js +585 -0
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/view/BookingCalendarGroupRowHeader.js +43 -0
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/view/BookingCalendarMonthView.js +113 -0
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/view/BookingCalendarResourceView.js +614 -0
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/view/BookingCalendarWeekView.js +170 -0
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/view/bookingCalendarDayViewContext.js +10 -0
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/view/day/useBookingCalendarDayHourRemaining.js +34 -0
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/view/day/useBookingCalendarDaySelection.js +38 -0
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/view/resource/useBookingCalendarResourceCellToggle.js +19 -0
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/view/resource/useBookingCalendarResourceDayHeaderRemaining.js +34 -0
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/view/useBookingCalendarGoToDayFromCell.js +30 -0
- package/lib/components/pisellRecordBoard/shellFrame/ColumnSetting/index.js +2 -1
- package/lib/components/pisellRecordBoard/shellFrame/Pagination/index.js +7 -1
- package/lib/components/pisellRecordBoard/shellFrame/ResourceWall/NoteTicker.js +45 -0
- package/lib/components/pisellRecordBoard/shellFrame/ResourceWall/PisellRecordBoardResourceWallView.d.ts +14 -0
- package/lib/components/pisellRecordBoard/shellFrame/ResourceWall/PisellRecordBoardResourceWallView.js +439 -0
- package/lib/components/pisellRecordBoard/shellFrame/ResourceWall/RecordBoardResourceWall.d.ts +11 -0
- package/lib/components/pisellRecordBoard/shellFrame/ResourceWall/RecordBoardResourceWall.js +9 -0
- package/lib/components/pisellRecordBoard/shellFrame/ResourceWall/ResourceWallControlPanel.js +181 -0
- package/lib/components/pisellRecordBoard/shellFrame/ResourceWall/ResourceWallControlPanelColorTab.js +64 -0
- package/lib/components/pisellRecordBoard/shellFrame/ResourceWall/ResourceWallControlPanelLayoutTab.js +57 -0
- package/lib/components/pisellRecordBoard/shellFrame/ResourceWall/ResourceWallViewport.less +88 -0
- package/lib/components/pisellRecordBoard/shellFrame/ResourceWall/ResourceWallViewportToolbar.js +85 -0
- package/lib/components/pisellRecordBoard/shellFrame/ResourceWall/VenueWallCard.js +220 -0
- package/lib/components/pisellRecordBoard/shellFrame/ResourceWall/VenueWallCard.less +339 -0
- package/lib/components/pisellRecordBoard/shellFrame/ResourceWall/VenueWallMarquee.less +52 -0
- package/lib/components/pisellRecordBoard/shellFrame/ResourceWall/venueWallCardPresentation.js +153 -0
- package/lib/components/pisellRecordBoard/shellFrame/ResourceWall/venueWallUtils.d.ts +32 -0
- package/lib/components/pisellRecordBoard/shellFrame/ResourceWall/venueWallUtils.js +181 -0
- package/lib/components/pisellRecordBoard/shellFrame/Search/index.js +1 -1
- package/lib/components/pisellRecordBoard/shellFrame/ShellBodyMetaContext.d.ts +5 -1
- package/lib/components/pisellRecordBoard/shellFrame/ToolBar/ToolBarFilter.less +30 -3
- package/lib/components/pisellRecordBoard/shellFrame/ToolBar/index.js +170 -81
- package/lib/components/pisellRecordBoard/shellFrame/ToolBar/recordBoardToolBarConstants.js +14 -0
- package/lib/components/pisellRecordBoard/shellFrame/ToolBar/recordBoardToolBarI18n.js +63 -0
- package/lib/components/pisellRecordBoard/shellFrame/ToolBar/recordBoardToolbar.less +406 -14
- package/lib/components/pisellRecordBoard/shellFrame/ToolBarQuickFilter/index.js +14 -4
- package/lib/components/pisellRecordBoard/shellFrame/index.d.ts +9 -2
- package/lib/components/pisellRecordBoard/shellFrame/index.js +73 -19
- package/lib/components/pisellRecordBoard/types.d.ts +413 -8
- package/lib/components/pisellRecordBoard/types.js +12 -0
- package/lib/components/pisellRecordBoard/utils/partitionShellFrameChildren.js +16 -0
- package/lib/components/pisellRecordBoard/utils/recordBoardPhoneGrid.d.ts +22 -0
- package/lib/components/pisellRecordBoard/utils/recordBoardPhoneGrid.js +50 -0
- package/lib/components/pisellReservationSchedule/PisellReservationSchedule.js +67 -15
- package/lib/components/pisellReservationSchedule/PisellReservationSchedule.less +23 -0
- package/lib/components/pisellReservationSchedule/locales.js +21 -3
- package/lib/components/pisellReservationSchedule/types.d.ts +5 -0
- package/lib/components/pisellReservationScheduleBand/PisellReservationScheduleBand.js +11 -6
- package/lib/components/pisellReservationScheduleBand/PisellReservationScheduleBand.less +37 -4
- package/lib/components/pisellReservationScheduleBand/index.d.ts +2 -1
- package/lib/components/pisellReservationScheduleBand/types.d.ts +13 -2
- package/lib/components/pisellReservationScheduleBand/utils/formatScheduleAtLabel.d.ts +13 -0
- package/lib/components/pisellReservationScheduleBand/utils/formatScheduleAtLabel.js +17 -0
- package/lib/components/pisellShellFrame/PisellShellFrame.js +2 -2
- package/lib/components/pisellShellFrame/PisellShellFrame.less +18 -2
- package/lib/components/pisellShellFrame/types.d.ts +6 -0
- package/lib/components/pisellSingleLineText/PisellSingleLineText.js +14 -21
- package/lib/components/pisellSingleLineText/PisellSingleLineText.less +143 -0
- package/lib/components/pisellSingleLineText/docs/pisellSingleLineText.md +256 -256
- package/lib/components/pisellSingleSelect/PisellSingleSelect.js +4 -7
- package/lib/components/pisellSingleSelect/PisellSingleSelect.less +106 -5
- package/lib/components/pisellSingleSelect/docs/pisellSingleSelect.md +428 -525
- package/lib/components/pisellSort/docs/PisellSort.md +131 -67
- package/lib/components/pisellStatisticList/index.js +0 -1
- package/lib/components/pisellTimeNavigator/PisellTimeNavigator.js +226 -57
- package/lib/components/pisellTimeNavigator/PisellTimeNavigator.less +128 -15
- package/lib/components/pisellTimeNavigator/components/CursorLayer.js +3 -3
- package/lib/components/pisellTimeNavigator/components/GestureLayer.js +12 -3
- package/lib/components/pisellTimeNavigator/components/ScaleLayer.js +34 -6
- package/lib/components/pisellTimeNavigator/docs/pisellTimeNavigator.$tab-dev.md +26 -42
- package/lib/components/pisellTimeNavigator/docs/pisellTimeNavigator.$tab-test.md +5 -5
- package/lib/components/pisellTimeNavigator/hooks/useTimeAxis.js +42 -22
- package/lib/components/pisellTimeNavigator/index.d.ts +1 -1
- package/lib/components/pisellTimeNavigator/types.d.ts +15 -0
- package/lib/components/pisellTimeNavigator/utils/index.d.ts +25 -4
- package/lib/components/pisellTimeNavigator/utils/index.js +88 -17
- package/lib/components/pisellTimeRangeDisplay/docs/pisellTimeRangeDisplay.md +226 -227
- package/lib/components/pisellUrl/PisellUrl.js +6 -13
- package/lib/components/pisellWalletPassCard/index.js +5 -11
- package/lib/components/productCard/cartSkuCard/components/Gift/index.js +36 -0
- package/lib/components/productCard/cartSkuCard/components/Gift/index.less +84 -0
- package/lib/components/productCard/cartSkuCard/components/Promotion/index.js +25 -0
- package/lib/components/productCard/cartSkuCard/components/Promotion/index.less +16 -0
- package/lib/components/productCard/cartSkuCard/components/basicInfo/index.js +69 -8
- package/lib/components/productCard/cartSkuCard/components/basicInfo/index.less +80 -1
- package/lib/components/productCard/cartSkuCard/components/holders/index.js +1 -1
- package/lib/components/productCard/cartSkuCard/components/packages/index.js +26 -11
- package/lib/components/productCard/cartSkuCard/components/specs/index.js +23 -8
- package/lib/components/productCard/cartSkuCard/components/specs/index.less +11 -0
- package/lib/components/productCard/cartSkuCard/components/timeRange/index.js +2 -1
- package/lib/components/productCard/cartSkuCard/components/weighing/index.js +29 -0
- package/lib/components/productCard/cartSkuCard/components/weighing/index.less +25 -0
- package/lib/components/productCard/cartSkuCard/index.js +68 -8
- package/lib/components/productCard/cartSkuCard/locales.js +40 -5
- package/lib/components/productCard/components/Header/DeleteButton/index.js +2 -2
- package/lib/components/productCard/components/Header/DeleteButton/index.less +1 -2
- package/lib/components/productCard/components/Header/EditButton/index.js +2 -1
- package/lib/components/productCard/components/Header/index.less +1 -1
- package/lib/components/productCard/components/Time/components/SelectHolder/index.js +2 -3
- package/lib/components/productCard/components/Time/components/SelectHolderModal/index.js +5 -5
- package/lib/components/productCard/components/Time/components/SelectHolderMultiple/index.js +2 -2
- package/lib/components/productCard/components/Time/components/SelectResource/index.js +3 -6
- package/lib/components/productCard/components/Time/index.js +2 -3
- package/lib/components/productCard/index.d.ts +1 -0
- package/lib/components/productCard/index.js +2 -0
- package/lib/components/productCard/lineItem/BookingLineItem.js +177 -0
- package/lib/components/productCard/lineItem/index.js +197 -0
- package/lib/components/productCard/lineItem/index.less +195 -0
- package/lib/components/productCard/lineItem/locales.js +25 -0
- package/lib/components/productCard/status.js +3 -0
- package/lib/components/productCard/types.d.ts +10 -0
- package/lib/components/productCard/utils.js +1 -1
- package/lib/components/select/index.js +1 -1
- package/lib/components/select-time/index.js +1 -0
- package/lib/components/table/Actions/component/ExportImport/index.js +4 -3
- package/lib/components/table/Actions/component/GallerySetting/index.js +11 -12
- package/lib/components/table/Actions/component/ViewMode/index.js +5 -6
- package/lib/components/table/Actions/index.js +1 -1
- package/lib/components/table/BasicTable/index.js +2 -2
- package/lib/components/table/Gallery/components/GalleryItem/components/Title/index.less +1 -1
- package/lib/components/table/Gallery/components/GalleryItem/index.js +9 -17
- package/lib/components/table/Gallery/components/GalleryItem/index.less +0 -1
- package/lib/components/table/Gallery/index.js +3 -11
- package/lib/components/table/Table/fields/text/Show/index.js +1 -1
- package/lib/components/table/Table/index.js +1 -2
- package/lib/components/table/Table/tableConfig/header/index.js +2 -2
- package/lib/components/table/Table/utils.js +1 -5
- package/lib/components/table/hooks/useTableSetting.js +0 -3
- package/lib/components/table/hooks/useTransDataSource.js +3 -4
- package/lib/components/table/index.js +1 -1
- package/lib/components/tabs/index.less +1 -1
- package/lib/components/translation/index.d.ts +0 -1
- package/lib/components/translation/index.js +9 -35
- package/lib/components/translation/index.less +0 -12
- package/lib/components/versionModal/index.d.ts +0 -1
- package/lib/components/versionModal/index.js +2 -2
- package/lib/components/versionSelect/index.js +4 -4
- package/lib/components/virtual-keyboard/Amount/index.js +4 -4
- package/lib/index.d.ts +101 -106
- package/lib/index.js +314 -298
- package/lib/locales/en-US.js +195 -70
- package/lib/locales/ja.js +196 -13
- package/lib/locales/pt.js +196 -13
- package/lib/locales/zh-CN.js +189 -64
- package/lib/locales/zh-TW.js +194 -69
- package/lib/pisell-materials.tw.css +0 -1
- package/lib/tailwind-input.css +3 -1
- package/package.json +1 -1
- package/es/components/PisellContactBrief/PisellContactBrief.d.ts +0 -34
- package/es/components/PisellContactBrief/PisellContactBrief.js +0 -156
- package/es/components/PisellContactBrief/PisellContactBrief.less +0 -192
- package/es/components/PisellContactBrief/components/ContactFormModal.js +0 -140
- package/es/components/PisellContactBrief/docs/PisellContactBrief.$tab-design.md +0 -109
- package/es/components/PisellContactBrief/docs/PisellContactBrief.$tab-dev.md +0 -106
- package/es/components/PisellContactBrief/docs/PisellContactBrief.$tab-test.md +0 -125
- package/es/components/PisellContactBrief/docs/PisellContactBrief.md +0 -129
- package/es/components/PisellContactBrief/index.d.ts +0 -2
- package/es/components/PisellContactBrief/locales.js +0 -57
- package/es/components/PisellContactBrief/types.d.ts +0 -86
- package/es/components/Template/[ComponentName].less +0 -1
- package/es/components/Template/docs/[ComponentName].$tab-design.md +0 -7
- package/es/components/Template/docs/[ComponentName].$tab-dev.md +0 -1137
- package/es/components/Template/docs/[ComponentName].$tab-test.md +0 -7
- package/es/components/Template/docs/[ComponentName].md +0 -510
- package/es/components/hardwareErrorTip/errorCard/index.d.ts +0 -25
- package/es/components/hardwareErrorTip/errorCard/index.js +0 -68
- package/es/components/hardwareErrorTip/errorCard/index.less +0 -137
- package/es/components/hardwareErrorTip/errorTipStatistics/index.d.ts +0 -10
- package/es/components/hardwareErrorTip/errorTipStatistics/index.js +0 -31
- package/es/components/hardwareErrorTip/errorTipStatistics/index.less +0 -34
- package/es/components/hardwareErrorTip/index.d.ts +0 -20
- package/es/components/hardwareErrorTip/index.js +0 -151
- package/es/components/hardwareErrorTip/index.less +0 -95
- package/es/components/hardwareErrorTip/logCard/index.d.ts +0 -25
- package/es/components/hardwareErrorTip/logCard/index.js +0 -72
- package/es/components/hardwareErrorTip/logCard/index.less +0 -121
- package/es/components/hardwareErrorTip/readme.md +0 -309
- package/es/components/hardwareErrorTip/types.js +0 -54
- package/es/components/pisellActionPanel/PisellActionPanel.d.ts +0 -24
- package/es/components/pisellActionPanel/PisellActionPanel.js +0 -68
- package/es/components/pisellActionPanel/PisellActionPanel.less +0 -69
- package/es/components/pisellActionPanel/docs/pisellActionPanel.$tab-design.md +0 -148
- package/es/components/pisellActionPanel/docs/pisellActionPanel.$tab-dev.md +0 -53
- package/es/components/pisellActionPanel/docs/pisellActionPanel.$tab-test.md +0 -64
- package/es/components/pisellActionPanel/docs/pisellActionPanel.md +0 -160
- package/es/components/pisellActionPanel/index.d.ts +0 -2
- package/es/components/pisellActionPanel/types.d.ts +0 -87
- package/es/components/pisellBaseCard/PisellBaseCard.d.ts +0 -20
- package/es/components/pisellBaseCard/PisellBaseCard.js +0 -73
- package/es/components/pisellBaseCard/PisellBaseCard.less +0 -25
- package/es/components/pisellBaseCard/docs/pisellBaseCard.$tab-design.md +0 -144
- package/es/components/pisellBaseCard/docs/pisellBaseCard.$tab-dev.md +0 -92
- package/es/components/pisellBaseCard/docs/pisellBaseCard.$tab-test.md +0 -86
- package/es/components/pisellBaseCard/docs/pisellBaseCard.md +0 -165
- package/es/components/pisellBaseCard/index.d.ts +0 -2
- package/es/components/pisellBaseCard/types.d.ts +0 -49
- package/es/components/pisellCustomerBrief/PisellCustomerBrief.d.ts +0 -57
- package/es/components/pisellCustomerBrief/PisellCustomerBrief.js +0 -92
- package/es/components/pisellCustomerBrief/PisellCustomerBrief.less +0 -8
- package/es/components/pisellCustomerBrief/docs/pisellCustomerBrief.$tab-design.md +0 -115
- package/es/components/pisellCustomerBrief/docs/pisellCustomerBrief.$tab-dev.md +0 -73
- package/es/components/pisellCustomerBrief/docs/pisellCustomerBrief.$tab-test.md +0 -66
- package/es/components/pisellCustomerBrief/docs/pisellCustomerBrief.md +0 -132
- package/es/components/pisellCustomerBrief/index.d.ts +0 -2
- package/es/components/pisellCustomerBrief/types.d.ts +0 -86
- package/es/components/pisellEntityCard/PisellEntityCard.d.ts +0 -47
- package/es/components/pisellEntityCard/PisellEntityCard.js +0 -315
- package/es/components/pisellEntityCard/PisellEntityCard.less +0 -362
- package/es/components/pisellEntityCard/docs/pisellEntityCard.$tab-design.md +0 -209
- package/es/components/pisellEntityCard/docs/pisellEntityCard.$tab-dev.md +0 -82
- package/es/components/pisellEntityCard/docs/pisellEntityCard.$tab-test.md +0 -122
- package/es/components/pisellEntityCard/docs/pisellEntityCard.md +0 -176
- package/es/components/pisellEntityCard/index.d.ts +0 -2
- package/es/components/pisellEntityCard/types.d.ts +0 -148
- package/es/components/pisellExport/PisellExport.d.ts +0 -11
- package/es/components/pisellExport/PisellExport.js +0 -44
- package/es/components/pisellExport/PisellExport.less +0 -141
- package/es/components/pisellExport/docs/pisellExport.$tab-design.md +0 -116
- package/es/components/pisellExport/docs/pisellExport.$tab-dev.md +0 -132
- package/es/components/pisellExport/docs/pisellExport.$tab-test.md +0 -61
- package/es/components/pisellExport/docs/pisellExport.md +0 -162
- package/es/components/pisellExport/index.d.ts +0 -2
- package/es/components/pisellExport/types.d.ts +0 -67
- package/es/components/pisellImport/PisellImport.d.ts +0 -11
- package/es/components/pisellImport/PisellImport.js +0 -81
- package/es/components/pisellImport/PisellImport.less +0 -141
- package/es/components/pisellImport/docs/pisellImport.$tab-design.md +0 -121
- package/es/components/pisellImport/docs/pisellImport.$tab-dev.md +0 -137
- package/es/components/pisellImport/docs/pisellImport.$tab-test.md +0 -69
- package/es/components/pisellImport/docs/pisellImport.md +0 -174
- package/es/components/pisellImport/index.d.ts +0 -2
- package/es/components/pisellImport/types.d.ts +0 -89
- package/es/components/pisellRecordBoard/shellFrame/Calendar/BookingCalendarDemo.js +0 -3811
- package/es/components/productCard/components/Header/Actions/index.less +0 -15
- package/es/theme/pisell-components.js +0 -76
- package/lib/components/PisellContactBrief/PisellContactBrief.d.ts +0 -34
- package/lib/components/PisellContactBrief/PisellContactBrief.js +0 -158
- package/lib/components/PisellContactBrief/PisellContactBrief.less +0 -192
- package/lib/components/PisellContactBrief/components/ContactFormModal.js +0 -139
- package/lib/components/PisellContactBrief/docs/PisellContactBrief.$tab-design.md +0 -109
- package/lib/components/PisellContactBrief/docs/PisellContactBrief.$tab-dev.md +0 -106
- package/lib/components/PisellContactBrief/docs/PisellContactBrief.$tab-test.md +0 -125
- package/lib/components/PisellContactBrief/docs/PisellContactBrief.md +0 -129
- package/lib/components/PisellContactBrief/index.d.ts +0 -2
- package/lib/components/PisellContactBrief/locales.js +0 -57
- package/lib/components/PisellContactBrief/types.d.ts +0 -86
- package/lib/components/Template/[ComponentName].less +0 -1
- package/lib/components/Template/docs/[ComponentName].$tab-design.md +0 -7
- package/lib/components/Template/docs/[ComponentName].$tab-dev.md +0 -1137
- package/lib/components/Template/docs/[ComponentName].$tab-test.md +0 -7
- package/lib/components/Template/docs/[ComponentName].md +0 -510
- package/lib/components/hardwareErrorTip/errorCard/index.d.ts +0 -25
- package/lib/components/hardwareErrorTip/errorCard/index.js +0 -71
- package/lib/components/hardwareErrorTip/errorCard/index.less +0 -137
- package/lib/components/hardwareErrorTip/errorTipStatistics/index.d.ts +0 -10
- package/lib/components/hardwareErrorTip/errorTipStatistics/index.js +0 -34
- package/lib/components/hardwareErrorTip/errorTipStatistics/index.less +0 -34
- package/lib/components/hardwareErrorTip/index.d.ts +0 -20
- package/lib/components/hardwareErrorTip/index.js +0 -153
- package/lib/components/hardwareErrorTip/index.less +0 -95
- package/lib/components/hardwareErrorTip/logCard/index.d.ts +0 -25
- package/lib/components/hardwareErrorTip/logCard/index.js +0 -75
- package/lib/components/hardwareErrorTip/logCard/index.less +0 -121
- package/lib/components/hardwareErrorTip/readme.md +0 -309
- package/lib/components/hardwareErrorTip/types.js +0 -57
- package/lib/components/pisellActionPanel/PisellActionPanel.d.ts +0 -24
- package/lib/components/pisellActionPanel/PisellActionPanel.js +0 -71
- package/lib/components/pisellActionPanel/PisellActionPanel.less +0 -69
- package/lib/components/pisellActionPanel/docs/pisellActionPanel.$tab-design.md +0 -148
- package/lib/components/pisellActionPanel/docs/pisellActionPanel.$tab-dev.md +0 -53
- package/lib/components/pisellActionPanel/docs/pisellActionPanel.$tab-test.md +0 -64
- package/lib/components/pisellActionPanel/docs/pisellActionPanel.md +0 -160
- package/lib/components/pisellActionPanel/index.d.ts +0 -2
- package/lib/components/pisellActionPanel/types.d.ts +0 -87
- package/lib/components/pisellBaseCard/PisellBaseCard.d.ts +0 -20
- package/lib/components/pisellBaseCard/PisellBaseCard.js +0 -76
- package/lib/components/pisellBaseCard/PisellBaseCard.less +0 -25
- package/lib/components/pisellBaseCard/docs/pisellBaseCard.$tab-design.md +0 -144
- package/lib/components/pisellBaseCard/docs/pisellBaseCard.$tab-dev.md +0 -92
- package/lib/components/pisellBaseCard/docs/pisellBaseCard.$tab-test.md +0 -86
- package/lib/components/pisellBaseCard/docs/pisellBaseCard.md +0 -165
- package/lib/components/pisellBaseCard/index.d.ts +0 -2
- package/lib/components/pisellBaseCard/types.d.ts +0 -49
- package/lib/components/pisellCustomerBrief/PisellCustomerBrief.d.ts +0 -57
- package/lib/components/pisellCustomerBrief/PisellCustomerBrief.js +0 -94
- package/lib/components/pisellCustomerBrief/PisellCustomerBrief.less +0 -8
- package/lib/components/pisellCustomerBrief/docs/pisellCustomerBrief.$tab-design.md +0 -115
- package/lib/components/pisellCustomerBrief/docs/pisellCustomerBrief.$tab-dev.md +0 -73
- package/lib/components/pisellCustomerBrief/docs/pisellCustomerBrief.$tab-test.md +0 -66
- package/lib/components/pisellCustomerBrief/docs/pisellCustomerBrief.md +0 -132
- package/lib/components/pisellCustomerBrief/index.d.ts +0 -2
- package/lib/components/pisellCustomerBrief/types.d.ts +0 -86
- package/lib/components/pisellEntityCard/PisellEntityCard.d.ts +0 -47
- package/lib/components/pisellEntityCard/PisellEntityCard.js +0 -318
- package/lib/components/pisellEntityCard/PisellEntityCard.less +0 -362
- package/lib/components/pisellEntityCard/docs/pisellEntityCard.$tab-design.md +0 -209
- package/lib/components/pisellEntityCard/docs/pisellEntityCard.$tab-dev.md +0 -82
- package/lib/components/pisellEntityCard/docs/pisellEntityCard.$tab-test.md +0 -122
- package/lib/components/pisellEntityCard/docs/pisellEntityCard.md +0 -176
- package/lib/components/pisellEntityCard/index.d.ts +0 -2
- package/lib/components/pisellEntityCard/types.d.ts +0 -148
- package/lib/components/pisellExport/PisellExport.d.ts +0 -11
- package/lib/components/pisellExport/PisellExport.js +0 -47
- package/lib/components/pisellExport/PisellExport.less +0 -141
- package/lib/components/pisellExport/docs/pisellExport.$tab-design.md +0 -116
- package/lib/components/pisellExport/docs/pisellExport.$tab-dev.md +0 -132
- package/lib/components/pisellExport/docs/pisellExport.$tab-test.md +0 -61
- package/lib/components/pisellExport/docs/pisellExport.md +0 -162
- package/lib/components/pisellExport/index.d.ts +0 -2
- package/lib/components/pisellExport/types.d.ts +0 -67
- package/lib/components/pisellImport/PisellImport.d.ts +0 -11
- package/lib/components/pisellImport/PisellImport.js +0 -84
- package/lib/components/pisellImport/PisellImport.less +0 -141
- package/lib/components/pisellImport/docs/pisellImport.$tab-design.md +0 -121
- package/lib/components/pisellImport/docs/pisellImport.$tab-dev.md +0 -137
- package/lib/components/pisellImport/docs/pisellImport.$tab-test.md +0 -69
- package/lib/components/pisellImport/docs/pisellImport.md +0 -174
- package/lib/components/pisellImport/index.d.ts +0 -2
- package/lib/components/pisellImport/types.d.ts +0 -89
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/BookingCalendarDemo.js +0 -3813
- package/lib/components/productCard/components/Header/Actions/index.less +0 -15
- package/lib/theme/pisell-components.js +0 -76
- /package/es/components/pisellQuickFilter/{doc → docs}/PisellQuickFilter.$tab-design.md +0 -0
- /package/es/components/pisellQuickFilter/{doc → docs}/PisellQuickFilter.$tab-dev.md +0 -0
- /package/es/components/pisellQuickFilter/{doc → docs}/PisellQuickFilter.$tab-test.md +0 -0
- /package/lib/components/pisellQuickFilter/{doc → docs}/PisellQuickFilter.$tab-design.md +0 -0
- /package/lib/components/pisellQuickFilter/{doc → docs}/PisellQuickFilter.$tab-dev.md +0 -0
- /package/lib/components/pisellQuickFilter/{doc → docs}/PisellQuickFilter.$tab-test.md +0 -0
|
@@ -6,2554 +6,378 @@ category: atom
|
|
|
6
6
|
|
|
7
7
|
# TextCard 测试用例文档
|
|
8
8
|
|
|
9
|
-
##
|
|
9
|
+
## 一、测试概述
|
|
10
10
|
|
|
11
|
-
###
|
|
11
|
+
### 测试范围
|
|
12
|
+
- 组件基础功能
|
|
13
|
+
- 6 种样式变体
|
|
14
|
+
- 3 种尺寸
|
|
15
|
+
- 4 种状态
|
|
16
|
+
- 图标、标签、角标功能
|
|
17
|
+
- 插槽功能
|
|
18
|
+
- 文本配置
|
|
19
|
+
- 宽度模式
|
|
20
|
+
- 事件处理
|
|
21
|
+
- 状态管理
|
|
22
|
+
- 可访问性
|
|
12
23
|
|
|
13
|
-
|
|
14
|
-
-
|
|
15
|
-
-
|
|
16
|
-
- 验证组件在不同样式、尺寸、状态下的正确渲染
|
|
17
|
-
|
|
18
|
-
### 1.2 测试范围
|
|
19
|
-
|
|
20
|
-
- 基础功能测试
|
|
21
|
-
- 6 种样式变体测试(text、filled、light、outlined、gradient、dashed)
|
|
22
|
-
- 3 种尺寸测试(small、default、large)
|
|
23
|
-
- 4 种状态测试(default、hover、active、disabled)
|
|
24
|
-
- 图标、标签、角标功能测试
|
|
25
|
-
- 插槽功能测试
|
|
26
|
-
- 文本配置测试
|
|
27
|
-
- 宽度模式测试
|
|
28
|
-
- 交互行为测试
|
|
29
|
-
- 自适应规则测试
|
|
30
|
-
- 边界条件测试
|
|
31
|
-
- 兼容性测试
|
|
32
|
-
- 性能测试
|
|
33
|
-
|
|
34
|
-
### 1.3 测试环境
|
|
35
|
-
|
|
36
|
-
- React 版本:18.x
|
|
37
|
-
- TypeScript 版本:5.x
|
|
38
|
-
- Ant Design 版本:5.x
|
|
39
|
-
- 测试框架:Vitest + React Testing Library
|
|
40
|
-
- 测试工具:@testing-library/react, @testing-library/user-event, @testing-library/jest-dom
|
|
41
|
-
|
|
42
|
-
## 2. 功能测试用例
|
|
43
|
-
|
|
44
|
-
### 2.1 基础渲染测试
|
|
45
|
-
|
|
46
|
-
#### 测试用例 2.1.1:默认渲染
|
|
47
|
-
|
|
48
|
-
**测试目的:** 验证组件能够正常渲染
|
|
49
|
-
**测试步骤:**
|
|
50
|
-
|
|
51
|
-
1. 渲染 TextCard 组件,传入必填 prop `text="Tab title"`
|
|
52
|
-
2. 检查组件是否成功挂载
|
|
53
|
-
3. 检查文本内容是否正确显示
|
|
54
|
-
|
|
55
|
-
**期望结果:**
|
|
56
|
-
|
|
57
|
-
- 组件成功渲染
|
|
58
|
-
- 显示文本内容 "Tab title"
|
|
59
|
-
- 使用默认样式变体(text)
|
|
60
|
-
- 使用默认尺寸(default)
|
|
61
|
-
|
|
62
|
-
**测试类型:** 自动化测试
|
|
63
|
-
|
|
64
|
-
---
|
|
65
|
-
|
|
66
|
-
#### 测试用例 2.1.2:ReactNode 文本渲染
|
|
67
|
-
|
|
68
|
-
**测试目的:** 验证传入 ReactNode 作为文本内容
|
|
69
|
-
**测试步骤:**
|
|
70
|
-
|
|
71
|
-
1. 传入 `text={<span className="custom-text">Custom</span>}`
|
|
72
|
-
2. 检查是否渲染了 ReactNode 内容
|
|
73
|
-
|
|
74
|
-
**期望结果:**
|
|
75
|
-
|
|
76
|
-
- 正确渲染 ReactNode 内容
|
|
77
|
-
- 自定义类名生效
|
|
78
|
-
|
|
79
|
-
**测试类型:** 自动化测试
|
|
80
|
-
|
|
81
|
-
---
|
|
82
|
-
|
|
83
|
-
#### 测试用例 2.1.3:空文本处理
|
|
84
|
-
|
|
85
|
-
**测试目的:** 验证空文本时的表现
|
|
86
|
-
**测试步骤:**
|
|
87
|
-
|
|
88
|
-
1. 传入 `text=""`
|
|
89
|
-
2. 检查渲染
|
|
90
|
-
|
|
91
|
-
**期望结果:**
|
|
92
|
-
|
|
93
|
-
- 不报错
|
|
94
|
-
- 组件正常渲染,不显示文本内容
|
|
95
|
-
|
|
96
|
-
**测试类型:** 自动化测试
|
|
97
|
-
|
|
98
|
-
---
|
|
99
|
-
|
|
100
|
-
### 2.2 样式变体测试
|
|
101
|
-
|
|
102
|
-
#### 测试用例 2.2.1:样式 1 - 纯文本(text)
|
|
103
|
-
|
|
104
|
-
**测试目的:** 验证 text 样式变体的渲染和交互
|
|
105
|
-
**测试步骤:**
|
|
106
|
-
|
|
107
|
-
1. 设置 `variant="text"`
|
|
108
|
-
2. 检查默认状态样式
|
|
109
|
-
3. 设置 `active={{ value: true }}`,检查激活状态
|
|
110
|
-
4. 鼠标悬停,检查 hover 状态
|
|
111
|
-
5. 设置 `disabled={{ value: true }}`,检查禁用状态
|
|
112
|
-
|
|
113
|
-
**期望结果:**
|
|
114
|
-
|
|
115
|
-
- 默认状态:无背景,无边框,无 padding,文本颜色为默认色
|
|
116
|
-
- Active 状态:文本颜色变为主题色(`var(--theme-color)`),字体加粗(font-weight: 600)
|
|
117
|
-
- Hover 状态:文本颜色变为浅紫色(`var(--theme-color-light)`)
|
|
118
|
-
- Disabled 状态:文本半透明(opacity: 0.4),颜色变灰
|
|
119
|
-
|
|
120
|
-
**测试类型:** 自动化测试 + 人工测试
|
|
121
|
-
|
|
122
|
-
---
|
|
123
|
-
|
|
124
|
-
#### 测试用例 2.2.2:样式 2 - 圆角背景(filled)
|
|
125
|
-
|
|
126
|
-
**测试目的:** 验证 filled 样式变体的渲染和交互
|
|
127
|
-
**测试步骤:**
|
|
128
|
-
|
|
129
|
-
1. 设置 `variant="filled"`
|
|
130
|
-
2. 检查默认状态样式
|
|
131
|
-
3. 设置 `active={{ value: true }}`,检查激活状态
|
|
132
|
-
4. 鼠标悬停,检查 hover 状态
|
|
133
|
-
|
|
134
|
-
**期望结果:**
|
|
135
|
-
|
|
136
|
-
- 默认状态:无背景,有 padding,圆角 40px(胶囊形)
|
|
137
|
-
- Active 状态:主题色背景(`var(--theme-color)`),白色文字
|
|
138
|
-
- Hover 状态:灰色背景(#F2F4F7)
|
|
139
|
-
|
|
140
|
-
**测试类型:** 自动化测试 + 人工测试
|
|
141
|
-
|
|
142
|
-
---
|
|
143
|
-
|
|
144
|
-
#### 测试用例 2.2.3:样式 3 - 浅色背景(light)
|
|
145
|
-
|
|
146
|
-
**测试目的:** 验证 light 样式变体的渲染和交互
|
|
147
|
-
**测试步骤:**
|
|
148
|
-
|
|
149
|
-
1. 设置 `variant="light"`
|
|
150
|
-
2. 检查默认状态样式
|
|
151
|
-
3. 设置 `active={{ value: true }}`,检查激活状态
|
|
152
|
-
4. 鼠标悬停,检查 hover 状态
|
|
153
|
-
|
|
154
|
-
**期望结果:**
|
|
155
|
-
|
|
156
|
-
- 默认状态:无背景,深灰文字(#475467)
|
|
157
|
-
- Active 状态:浅紫背景(`var(--theme-color-bg)`),主题色文字,字体加粗
|
|
158
|
-
- Hover 状态:灰色背景(#F2F4F7)
|
|
159
|
-
|
|
160
|
-
**测试类型:** 自动化测试 + 人工测试
|
|
161
|
-
|
|
162
|
-
---
|
|
163
|
-
|
|
164
|
-
#### 测试用例 2.2.4:样式 4 - 描边(outlined)
|
|
165
|
-
|
|
166
|
-
**测试目的:** 验证 outlined 样式变体的渲染和交互
|
|
167
|
-
**测试步骤:**
|
|
168
|
-
|
|
169
|
-
1. 设置 `variant="outlined"`
|
|
170
|
-
2. 检查默认状态样式
|
|
171
|
-
3. 设置 `active={{ value: true }}`,检查激活状态
|
|
172
|
-
4. 鼠标悬停,检查 hover 状态
|
|
173
|
-
|
|
174
|
-
**期望结果:**
|
|
175
|
-
|
|
176
|
-
- 默认状态:透明背景,灰色文字(#475467)
|
|
177
|
-
- Active 状态:灰色背景(#F2F4F7),黑色文字
|
|
178
|
-
- Hover 状态:浅灰背景(#F9FAFB),黑色文字
|
|
179
|
-
|
|
180
|
-
**测试类型:** 自动化测试 + 人工测试
|
|
181
|
-
|
|
182
|
-
---
|
|
183
|
-
|
|
184
|
-
#### 测试用例 2.2.5:样式 5 - 渐变(gradient)
|
|
185
|
-
|
|
186
|
-
**测试目的:** 验证 gradient 样式变体的渲染和交互
|
|
187
|
-
**测试步骤:**
|
|
188
|
-
|
|
189
|
-
1. 设置 `variant="gradient"`
|
|
190
|
-
2. 检查默认状态样式
|
|
191
|
-
3. 设置 `active={{ value: true }}`,检查激活状态
|
|
192
|
-
4. 鼠标悬停,检查 hover 状态
|
|
193
|
-
|
|
194
|
-
**期望结果:**
|
|
195
|
-
|
|
196
|
-
- 默认状态:透明背景,灰色文字(#667085)
|
|
197
|
-
- Active 状态:白色背景,阴影效果,黑色文字(#101828)
|
|
198
|
-
- Hover 状态:文字颜色变为黑色
|
|
199
|
-
|
|
200
|
-
**测试类型:** 自动化测试 + 人工测试
|
|
201
|
-
|
|
202
|
-
---
|
|
203
|
-
|
|
204
|
-
#### 测试用例 2.2.6:样式 6 - 虚线(dashed)
|
|
205
|
-
|
|
206
|
-
**测试目的:** 验证 dashed 样式变体的渲染和交互
|
|
207
|
-
**测试步骤:**
|
|
208
|
-
|
|
209
|
-
1. 设置 `variant="dashed"`
|
|
210
|
-
2. 检查默认状态样式
|
|
211
|
-
3. 设置 `active={{ value: true }}`,检查激活状态
|
|
212
|
-
4. 鼠标悬停,检查 hover 状态
|
|
213
|
-
|
|
214
|
-
**期望结果:**
|
|
215
|
-
|
|
216
|
-
- 默认状态:透明背景,灰色文字(#475467)
|
|
217
|
-
- Active 状态:白色背景,上左右三边有边框,主题色文字,圆角 8px 8px 0 0
|
|
218
|
-
- Hover 状态:文字颜色变为黑色
|
|
219
|
-
|
|
220
|
-
**测试类型:** 自动化测试 + 人工测试
|
|
221
|
-
|
|
222
|
-
---
|
|
223
|
-
|
|
224
|
-
### 2.3 尺寸测试
|
|
225
|
-
|
|
226
|
-
#### 测试用例 2.3.1:Small 尺寸
|
|
227
|
-
|
|
228
|
-
**测试目的:** 验证 small 尺寸的渲染
|
|
229
|
-
**测试步骤:**
|
|
230
|
-
|
|
231
|
-
1. 设置 `size="small"`
|
|
232
|
-
2. 检查 padding、fontSize、gap、borderRadius
|
|
233
|
-
|
|
234
|
-
**期望结果:**
|
|
235
|
-
|
|
236
|
-
- padding: 8px 12px
|
|
237
|
-
- fontSize: 14px
|
|
238
|
-
- lineHeight: 22px
|
|
239
|
-
- gap: 8px
|
|
240
|
-
- borderRadius: 4px
|
|
241
|
-
|
|
242
|
-
**测试类型:** 自动化测试 + 人工测试
|
|
243
|
-
|
|
244
|
-
---
|
|
245
|
-
|
|
246
|
-
#### 测试用例 2.3.2:Default 尺寸
|
|
247
|
-
|
|
248
|
-
**测试目的:** 验证 default 尺寸的渲染
|
|
249
|
-
**测试步骤:**
|
|
250
|
-
|
|
251
|
-
1. 设置 `size="default"` 或不设置 size(默认值)
|
|
252
|
-
2. 检查 padding、fontSize、gap、borderRadius
|
|
253
|
-
|
|
254
|
-
**期望结果:**
|
|
255
|
-
|
|
256
|
-
- padding: 12px 16px
|
|
257
|
-
- fontSize: 14px
|
|
258
|
-
- lineHeight: 22px
|
|
259
|
-
- gap: 12px
|
|
260
|
-
- borderRadius: 6px
|
|
261
|
-
|
|
262
|
-
**测试类型:** 自动化测试 + 人工测试
|
|
263
|
-
|
|
264
|
-
---
|
|
265
|
-
|
|
266
|
-
#### 测试用例 2.3.3:Large 尺寸
|
|
267
|
-
|
|
268
|
-
**测试目的:** 验证 large 尺寸的渲染
|
|
269
|
-
**测试步骤:**
|
|
270
|
-
|
|
271
|
-
1. 设置 `size="large"`
|
|
272
|
-
2. 检查 padding、fontSize、gap、borderRadius
|
|
273
|
-
|
|
274
|
-
**期望结果:**
|
|
275
|
-
|
|
276
|
-
- padding: 16px 20px
|
|
277
|
-
- fontSize: 16px
|
|
278
|
-
- lineHeight: 24px
|
|
279
|
-
- gap: 16px
|
|
280
|
-
- borderRadius: 8px
|
|
281
|
-
|
|
282
|
-
**测试类型:** 自动化测试 + 人工测试
|
|
283
|
-
|
|
284
|
-
---
|
|
285
|
-
|
|
286
|
-
### 2.4 状态测试
|
|
287
|
-
|
|
288
|
-
#### 测试用例 2.4.1:Active 状态
|
|
289
|
-
|
|
290
|
-
**测试目的:** 验证 active 状态的渲染和交互
|
|
291
|
-
**测试步骤:**
|
|
292
|
-
|
|
293
|
-
1. 设置 `active={{ value: true }}`
|
|
294
|
-
2. 检查样式、类名、data 属性
|
|
295
|
-
3. 设置 `active={{ value: true, style: { color: 'red' }, className: 'custom-active' }}`
|
|
296
|
-
4. 检查自定义样式和类名是否生效
|
|
297
|
-
5. 设置 `active={{ value: true, extra: <div>Extra</div> }}`
|
|
298
|
-
6. 检查 extra 内容是否渲染
|
|
299
|
-
|
|
300
|
-
**期望结果:**
|
|
301
|
-
|
|
302
|
-
- 应用 active 样式(根据 variant 不同)
|
|
303
|
-
- 添加 `text-card--active` 类名
|
|
304
|
-
- 设置 `data-active="true"` 属性
|
|
305
|
-
- 自定义样式和类名生效
|
|
306
|
-
- extra 内容正确渲染
|
|
307
|
-
|
|
308
|
-
**测试类型:** 自动化测试 + 人工测试
|
|
309
|
-
|
|
310
|
-
---
|
|
311
|
-
|
|
312
|
-
#### 测试用例 2.4.2:Disabled 状态
|
|
313
|
-
|
|
314
|
-
**测试目的:** 验证 disabled 状态的渲染和交互
|
|
315
|
-
**测试步骤:**
|
|
316
|
-
|
|
317
|
-
1. 设置 `disabled={{ value: true }}`
|
|
318
|
-
2. 检查样式、类名、aria 属性
|
|
319
|
-
3. 尝试点击组件
|
|
320
|
-
4. 检查 tabIndex 属性
|
|
321
|
-
|
|
322
|
-
**期望结果:**
|
|
323
|
-
|
|
324
|
-
- 透明度 0.4,颜色变灰,cursor: not-allowed
|
|
325
|
-
- 添加 `text-card--disabled` 类名
|
|
326
|
-
- 设置 `data-disabled="true"` 和 `aria-disabled="true"` 属性
|
|
327
|
-
- tabIndex 为 -1,无法键盘聚焦
|
|
328
|
-
- 点击事件不触发
|
|
329
|
-
|
|
330
|
-
**测试类型:** 自动化测试 + 人工测试
|
|
331
|
-
|
|
332
|
-
---
|
|
333
|
-
|
|
334
|
-
#### 测试用例 2.4.3:Loading 状态
|
|
335
|
-
|
|
336
|
-
**测试目的:** 验证 loading 状态的渲染和交互
|
|
337
|
-
**测试步骤:**
|
|
338
|
-
|
|
339
|
-
1. 设置 `loading={{ value: true }}`
|
|
340
|
-
2. 检查样式、类名
|
|
341
|
-
3. 尝试点击组件
|
|
342
|
-
4. 设置 `loading={{ value: true, extra: <Spin /> }}`
|
|
343
|
-
5. 检查 extra 内容是否渲染
|
|
344
|
-
|
|
345
|
-
**期望结果:**
|
|
346
|
-
|
|
347
|
-
- 透明度 0.6,cursor: wait
|
|
348
|
-
- 添加 `text-card--loading` 类名
|
|
349
|
-
- 设置 `data-loading="true"` 属性
|
|
350
|
-
- 点击事件不触发
|
|
351
|
-
- extra 内容正确渲染
|
|
352
|
-
|
|
353
|
-
**测试类型:** 自动化测试 + 人工测试
|
|
354
|
-
|
|
355
|
-
---
|
|
356
|
-
|
|
357
|
-
#### 测试用例 2.4.4:状态优先级
|
|
358
|
-
|
|
359
|
-
**测试目的:** 验证状态优先级规则(loading > disabled > active)
|
|
360
|
-
**测试步骤:**
|
|
361
|
-
|
|
362
|
-
1. 同时设置 `loading={{ value: true, extra: <div>Loading</div> }}`、`disabled={{ value: true, extra: <div>Disabled</div> }}`、`active={{ value: true, extra: <div>Active</div> }}`
|
|
363
|
-
2. 检查显示哪个状态的 extra 内容
|
|
364
|
-
3. 移除 loading,检查显示哪个状态
|
|
365
|
-
4. 移除 disabled,检查显示哪个状态
|
|
366
|
-
|
|
367
|
-
**期望结果:**
|
|
368
|
-
|
|
369
|
-
- 同时存在时,显示 loading 的 extra
|
|
370
|
-
- 只有 disabled 和 active 时,显示 disabled 的 extra
|
|
371
|
-
- 只有 active 时,显示 active 的 extra
|
|
372
|
-
|
|
373
|
-
**测试类型:** 自动化测试
|
|
374
|
-
|
|
375
|
-
---
|
|
376
|
-
|
|
377
|
-
### 2.5 图标功能测试
|
|
378
|
-
|
|
379
|
-
#### 测试用例 2.5.1:前置图标
|
|
380
|
-
|
|
381
|
-
**测试目的:** 验证前置图标的渲染和配置
|
|
382
|
-
**测试步骤:**
|
|
383
|
-
|
|
384
|
-
1. 设置 `prefixIcon={<BellOutlined />}`
|
|
385
|
-
2. 检查图标是否显示在文本前面
|
|
386
|
-
3. 设置 `iconConfig={{ size: 20, color: '#ff0000' }}`
|
|
387
|
-
4. 检查图标大小和颜色是否生效
|
|
388
|
-
|
|
389
|
-
**期望结果:**
|
|
390
|
-
|
|
391
|
-
- 图标显示在文本前面
|
|
392
|
-
- 图标大小为 20px
|
|
393
|
-
- 图标颜色为红色
|
|
394
|
-
- 图标容器有正确的类名 `text-card__icon--prefix`
|
|
395
|
-
|
|
396
|
-
**测试类型:** 自动化测试 + 人工测试
|
|
397
|
-
|
|
398
|
-
---
|
|
399
|
-
|
|
400
|
-
#### 测试用例 2.5.2:后置图标
|
|
401
|
-
|
|
402
|
-
**测试目的:** 验证后置图标的渲染和配置
|
|
403
|
-
**测试步骤:**
|
|
404
|
-
|
|
405
|
-
1. 设置 `suffixIcon={<DownOutlined />}`
|
|
406
|
-
2. 检查图标是否显示在文本后面
|
|
407
|
-
3. 设置 `iconConfig={{ size: 16 }}`
|
|
408
|
-
4. 检查图标大小是否生效
|
|
409
|
-
|
|
410
|
-
**期望结果:**
|
|
411
|
-
|
|
412
|
-
- 图标显示在文本后面
|
|
413
|
-
- 图标大小为 16px
|
|
414
|
-
- 图标容器有正确的类名 `text-card__icon--suffix`
|
|
415
|
-
|
|
416
|
-
**测试类型:** 自动化测试 + 人工测试
|
|
417
|
-
|
|
418
|
-
---
|
|
419
|
-
|
|
420
|
-
#### 测试用例 2.5.3:前后图标组合
|
|
421
|
-
|
|
422
|
-
**测试目的:** 验证同时显示前后图标
|
|
423
|
-
**测试步骤:**
|
|
424
|
-
|
|
425
|
-
1. 同时设置 `prefixIcon` 和 `suffixIcon`
|
|
426
|
-
2. 检查两个图标是否都正常显示
|
|
427
|
-
3. 检查间距是否正确
|
|
428
|
-
|
|
429
|
-
**期望结果:**
|
|
430
|
-
|
|
431
|
-
- 前后图标都正常显示
|
|
432
|
-
- 间距根据 size 正确设置(gap 属性)
|
|
433
|
-
|
|
434
|
-
**测试类型:** 自动化测试 + 人工测试
|
|
435
|
-
|
|
436
|
-
---
|
|
437
|
-
|
|
438
|
-
### 2.6 标签功能测试
|
|
439
|
-
|
|
440
|
-
#### 测试用例 2.6.1:后置标签
|
|
441
|
-
|
|
442
|
-
**测试目的:** 验证后置标签的渲染和配置
|
|
443
|
-
**测试步骤:**
|
|
444
|
-
|
|
445
|
-
1. 设置 `tag={<Tag color="blue">2</Tag>}`
|
|
446
|
-
2. 检查标签是否显示在后置位置
|
|
447
|
-
3. 设置 `tagConfig={{ style: { marginLeft: 8 } }}`
|
|
448
|
-
4. 检查自定义样式是否生效
|
|
449
|
-
|
|
450
|
-
**期望结果:**
|
|
451
|
-
|
|
452
|
-
- 标签显示在后置位置(文本后面)
|
|
453
|
-
- 自定义样式生效
|
|
454
|
-
- 标签容器有正确的类名 `text-card__tag`
|
|
455
|
-
|
|
456
|
-
**测试类型:** 自动化测试 + 人工测试
|
|
457
|
-
|
|
458
|
-
---
|
|
459
|
-
|
|
460
|
-
#### 测试用例 2.6.2:标签与后置图标组合
|
|
461
|
-
|
|
462
|
-
**测试目的:** 验证标签和后置图标同时显示时的顺序
|
|
463
|
-
**测试步骤:**
|
|
464
|
-
|
|
465
|
-
1. 同时设置 `tag` 和 `suffixIcon`
|
|
466
|
-
2. 检查显示顺序
|
|
467
|
-
|
|
468
|
-
**期望结果:**
|
|
469
|
-
|
|
470
|
-
- 标签在前,图标在后
|
|
471
|
-
- 顺序:文本 -> 标签 -> 后置图标
|
|
472
|
-
|
|
473
|
-
**测试类型:** 人工测试
|
|
474
|
-
|
|
475
|
-
---
|
|
476
|
-
|
|
477
|
-
### 2.7 角标功能测试
|
|
478
|
-
|
|
479
|
-
#### 测试用例 2.7.1:红点角标
|
|
480
|
-
|
|
481
|
-
**测试目的:** 验证红点角标的渲染和配置
|
|
482
|
-
**测试步骤:**
|
|
483
|
-
|
|
484
|
-
1. 设置 `badge={{ type: 'dot' }}`
|
|
485
|
-
2. 检查是否显示红点角标
|
|
486
|
-
3. 设置 `badge={{ type: 'dot', color: 'blue', offset: [-10, 0], size: 'small' }}`
|
|
487
|
-
4. 检查位置、颜色、偏移是否生效
|
|
488
|
-
|
|
489
|
-
**期望结果:**
|
|
490
|
-
|
|
491
|
-
- 显示红点角标
|
|
492
|
-
- 通过 offset 控制位置(向左偏移)
|
|
493
|
-
- 颜色为蓝色
|
|
494
|
-
- 大小为 small
|
|
495
|
-
|
|
496
|
-
**测试类型:** 自动化测试 + 人工测试
|
|
497
|
-
|
|
498
|
-
---
|
|
499
|
-
|
|
500
|
-
#### 测试用例 2.7.2:数字角标
|
|
501
|
-
|
|
502
|
-
**测试目的:** 验证数字角标的渲染和配置
|
|
503
|
-
**测试步骤:**
|
|
504
|
-
|
|
505
|
-
1. 设置 `badge={{ type: 'number', content: 99 }}`
|
|
506
|
-
2. 检查是否显示数字 99
|
|
507
|
-
3. 设置 `badge={{ type: 'number', content: 999 }}`
|
|
508
|
-
4. 检查大数字是否正确显示
|
|
509
|
-
5. 设置 `badge={{ type: 'number', content: 0, showZero: false }}`
|
|
510
|
-
6. 检查 0 是否不显示
|
|
511
|
-
7. 设置 `badge={{ type: 'number', content: 0, showZero: true }}`
|
|
512
|
-
8. 检查 0 是否显示
|
|
513
|
-
|
|
514
|
-
**期望结果:**
|
|
515
|
-
|
|
516
|
-
- 显示数字 99
|
|
517
|
-
- 大数字正确显示
|
|
518
|
-
- showZero=false 时,0 不显示
|
|
519
|
-
- showZero=true 时,0 显示
|
|
520
|
-
|
|
521
|
-
**测试类型:** 自动化测试 + 人工测试
|
|
522
|
-
|
|
523
|
-
---
|
|
524
|
-
|
|
525
|
-
#### 测试用例 2.7.3:文本角标
|
|
526
|
-
|
|
527
|
-
**测试目的:** 验证文本角标的渲染和配置
|
|
528
|
-
**测试步骤:**
|
|
529
|
-
|
|
530
|
-
1. 设置 `badge={{ type: 'text', content: 'New' }}`
|
|
531
|
-
2. 检查是否显示文本 "New"
|
|
532
|
-
3. 设置 `badge={{ type: 'text', content: 'Very Long Text' }}`
|
|
533
|
-
4. 检查长文本是否正确显示
|
|
534
|
-
|
|
535
|
-
**期望结果:**
|
|
536
|
-
|
|
537
|
-
- 显示文本 "New"
|
|
538
|
-
- 长文本正常显示
|
|
539
|
-
|
|
540
|
-
**测试类型:** 自动化测试 + 人工测试
|
|
541
|
-
|
|
542
|
-
---
|
|
543
|
-
|
|
544
|
-
#### 测试用例 2.7.4:角标位置(通过 offset 控制)
|
|
545
|
-
|
|
546
|
-
**测试目的:** 验证角标的不同位置(通过 offset 控制)
|
|
547
|
-
**测试步骤:**
|
|
548
|
-
|
|
549
|
-
1. 不设置 offset,检查默认位置(右上角)
|
|
550
|
-
2. 设置 `offset: [-10, 0]`,检查是否向左偏移
|
|
551
|
-
3. 设置 `offset: [0, 10]`,检查是否向下偏移
|
|
552
|
-
4. 设置 `offset: [-10, 10]`,检查是否向左下偏移
|
|
553
|
-
|
|
554
|
-
**期望结果:**
|
|
555
|
-
|
|
556
|
-
- 不设置 offset 时,角标在右上角(默认位置)
|
|
557
|
-
- offset 正数向右/下偏移,负数向左/上偏移
|
|
558
|
-
- 角标位置正确对应设置的 offset 值
|
|
559
|
-
|
|
560
|
-
**测试类型:** 人工测试
|
|
561
|
-
|
|
562
|
-
---
|
|
563
|
-
|
|
564
|
-
#### 测试用例 2.7.5:角标大小
|
|
565
|
-
|
|
566
|
-
**测试目的:** 验证角标大小控制
|
|
567
|
-
**测试步骤:**
|
|
568
|
-
|
|
569
|
-
1. 设置 `badge={{ type: 'number', content: 99, size: 'small' }}`
|
|
570
|
-
2. 检查角标大小是否为 small
|
|
571
|
-
3. 设置 `badge={{ type: 'number', content: 99, size: 'default' }}`
|
|
572
|
-
4. 检查角标大小是否为 default
|
|
573
|
-
5. 设置 `badge={{ type: 'number', content: 99 }}`(不设置 size)
|
|
574
|
-
6. 检查角标是否使用默认大小
|
|
575
|
-
7. 设置 `badge={{ type: 'dot', size: 'small' }}`
|
|
576
|
-
8. 检查红点角标大小是否生效
|
|
577
|
-
|
|
578
|
-
**期望结果:**
|
|
579
|
-
|
|
580
|
-
- 角标大小正确对应设置的 size 值
|
|
581
|
-
- size='small' 时显示小尺寸角标
|
|
582
|
-
- size='default' 时显示默认尺寸角标
|
|
583
|
-
- 不设置 size 时使用默认尺寸
|
|
584
|
-
|
|
585
|
-
**测试类型:** 自动化测试 + 人工测试
|
|
586
|
-
|
|
587
|
-
---
|
|
588
|
-
|
|
589
|
-
#### 测试用例 2.7.6:角标显示零值
|
|
590
|
-
|
|
591
|
-
**测试目的:** 验证角标 showZero 配置
|
|
592
|
-
**测试步骤:**
|
|
593
|
-
|
|
594
|
-
1. 设置 `badge={{ type: 'number', content: 0, showZero: false }}`
|
|
595
|
-
2. 检查角标是否不显示
|
|
596
|
-
3. 设置 `badge={{ type: 'number', content: 0, showZero: true }}`
|
|
597
|
-
4. 检查角标是否显示 0
|
|
598
|
-
5. 设置 `badge={{ type: 'number', content: 0 }}`(不设置 showZero)
|
|
599
|
-
6. 检查角标是否不显示(默认 showZero=false)
|
|
600
|
-
7. 设置 `badge={{ type: 'number', content: 1, showZero: false }}`
|
|
601
|
-
8. 检查非零值是否正常显示
|
|
602
|
-
|
|
603
|
-
**期望结果:**
|
|
604
|
-
|
|
605
|
-
- showZero=false 时,content 为 0 不显示角标
|
|
606
|
-
- showZero=true 时,content 为 0 显示角标
|
|
607
|
-
- 不设置 showZero 时,默认不显示零值
|
|
608
|
-
- 非零值不受 showZero 影响,正常显示
|
|
609
|
-
|
|
610
|
-
**测试类型:** 自动化测试 + 人工测试
|
|
611
|
-
|
|
612
|
-
---
|
|
613
|
-
|
|
614
|
-
### 2.8 插槽功能测试
|
|
615
|
-
|
|
616
|
-
#### 测试用例 2.8.1:前置插槽
|
|
617
|
-
|
|
618
|
-
**测试目的:** 验证前置插槽的渲染和优先级
|
|
619
|
-
**测试步骤:**
|
|
620
|
-
|
|
621
|
-
1. 同时设置 `prefixSlot={<div>Custom</div>}` 和 `prefixIcon={<BellOutlined />}`
|
|
622
|
-
2. 检查显示哪个内容
|
|
623
|
-
|
|
624
|
-
**期望结果:**
|
|
625
|
-
|
|
626
|
-
- 显示前置插槽内容
|
|
627
|
-
- 不显示前置图标
|
|
628
|
-
- 插槽优先级高于图标
|
|
629
|
-
|
|
630
|
-
**测试类型:** 自动化测试 + 人工测试
|
|
631
|
-
|
|
632
|
-
---
|
|
633
|
-
|
|
634
|
-
#### 测试用例 2.8.2:后置插槽
|
|
635
|
-
|
|
636
|
-
**测试目的:** 验证后置插槽的渲染和优先级
|
|
637
|
-
**测试步骤:**
|
|
638
|
-
|
|
639
|
-
1. 同时设置 `suffixSlot={<div>Custom</div>}`、`tag={<Tag>Tag</Tag>}` 和 `suffixIcon={<DownOutlined />}`
|
|
640
|
-
2. 检查显示哪个内容
|
|
641
|
-
|
|
642
|
-
**期望结果:**
|
|
643
|
-
|
|
644
|
-
- 显示后置插槽内容
|
|
645
|
-
- 不显示标签和后置图标
|
|
646
|
-
- 插槽优先级高于标签和图标
|
|
647
|
-
|
|
648
|
-
**测试类型:** 自动化测试 + 人工测试
|
|
649
|
-
|
|
650
|
-
---
|
|
651
|
-
|
|
652
|
-
### 2.9 文本配置测试
|
|
653
|
-
|
|
654
|
-
#### 测试用例 2.9.1:字体样式配置
|
|
655
|
-
|
|
656
|
-
**测试目的:** 验证文本字体样式配置
|
|
657
|
-
**测试步骤:**
|
|
658
|
-
|
|
659
|
-
1. 设置 `textConfig={{ fontSize: 18, fontWeight: 'bold', color: '#ff0000' }}`
|
|
660
|
-
2. 检查字体大小、粗细、颜色是否生效
|
|
661
|
-
|
|
662
|
-
**期望结果:**
|
|
663
|
-
|
|
664
|
-
- 字体大小为 18px
|
|
665
|
-
- 字体加粗
|
|
666
|
-
- 文本颜色为红色
|
|
667
|
-
|
|
668
|
-
**测试类型:** 自动化测试 + 人工测试
|
|
669
|
-
|
|
670
|
-
---
|
|
671
|
-
|
|
672
|
-
#### 测试用例 2.9.2:文本省略(单行)
|
|
673
|
-
|
|
674
|
-
**测试目的:** 验证单行文本省略功能
|
|
675
|
-
**测试步骤:**
|
|
676
|
-
|
|
677
|
-
1. 设置超长文本和 `textConfig={{ maxLines: 1, ellipsis: true }}`
|
|
678
|
-
2. 检查是否显示省略号
|
|
679
|
-
|
|
680
|
-
**期望结果:**
|
|
681
|
-
|
|
682
|
-
- 文本超出部分显示省略号
|
|
683
|
-
- 使用 `text-overflow: ellipsis` 和 `white-space: nowrap`
|
|
684
|
-
|
|
685
|
-
**测试类型:** 自动化测试 + 人工测试
|
|
686
|
-
|
|
687
|
-
---
|
|
688
|
-
|
|
689
|
-
#### 测试用例 2.9.3:文本省略(多行)
|
|
690
|
-
|
|
691
|
-
**测试目的:** 验证多行文本省略功能
|
|
692
|
-
**测试步骤:**
|
|
693
|
-
|
|
694
|
-
1. 设置超长文本和 `textConfig={{ maxLines: 2, ellipsis: true }}`
|
|
695
|
-
2. 检查是否显示省略号
|
|
696
|
-
|
|
697
|
-
**期望结果:**
|
|
698
|
-
|
|
699
|
-
- 文本超出 2 行后显示省略号
|
|
700
|
-
- 使用 `-webkit-line-clamp: 2` 和 `-webkit-box-orient: vertical`
|
|
701
|
-
|
|
702
|
-
**测试类型:** 自动化测试 + 人工测试
|
|
703
|
-
|
|
704
|
-
---
|
|
705
|
-
|
|
706
|
-
#### 测试用例 2.9.4:文本对齐
|
|
707
|
-
|
|
708
|
-
**测试目的:** 验证文本对齐配置
|
|
709
|
-
**测试步骤:**
|
|
710
|
-
|
|
711
|
-
1. 分别设置 `textConfig={{ textAlign: 'left' }}`、`'center'`、`'right'`
|
|
712
|
-
2. 检查文本对齐方式
|
|
713
|
-
|
|
714
|
-
**期望结果:**
|
|
715
|
-
|
|
716
|
-
- 文本对齐方式正确对应设置的值
|
|
717
|
-
|
|
718
|
-
**测试类型:** 自动化测试 + 人工测试
|
|
719
|
-
|
|
720
|
-
---
|
|
721
|
-
|
|
722
|
-
### 2.10 宽度模式测试
|
|
723
|
-
|
|
724
|
-
#### 测试用例 2.10.1:自动宽度(auto)
|
|
725
|
-
|
|
726
|
-
**测试目的:** 验证自动宽度模式
|
|
727
|
-
**测试步骤:**
|
|
728
|
-
|
|
729
|
-
1. 设置 `widthMode="auto"` 和 `maxWidth={300}`
|
|
730
|
-
2. 检查宽度设置
|
|
731
|
-
|
|
732
|
-
**期望结果:**
|
|
733
|
-
|
|
734
|
-
- width 为 'auto'
|
|
735
|
-
- maxWidth 为 300px
|
|
736
|
-
- 内容超出最大宽度时显示省略号
|
|
737
|
-
|
|
738
|
-
**测试类型:** 自动化测试 + 人工测试
|
|
739
|
-
|
|
740
|
-
---
|
|
741
|
-
|
|
742
|
-
#### 测试用例 2.10.2:固定宽度(fixed)
|
|
743
|
-
|
|
744
|
-
**测试目的:** 验证固定宽度模式
|
|
745
|
-
**测试步骤:**
|
|
746
|
-
|
|
747
|
-
1. 设置 `widthMode="fixed"` 和 `width={200}`
|
|
748
|
-
2. 检查宽度设置
|
|
749
|
-
|
|
750
|
-
**期望结果:**
|
|
751
|
-
|
|
752
|
-
- width 为 200px
|
|
753
|
-
- 宽度固定不变
|
|
754
|
-
|
|
755
|
-
**测试类型:** 自动化测试 + 人工测试
|
|
756
|
-
|
|
757
|
-
---
|
|
758
|
-
|
|
759
|
-
#### 测试用例 2.10.3:撑满容器(full)
|
|
760
|
-
|
|
761
|
-
**测试目的:** 验证撑满容器宽度模式
|
|
762
|
-
**测试步骤:**
|
|
763
|
-
|
|
764
|
-
1. 设置 `widthMode="full"`
|
|
765
|
-
2. 检查宽度设置
|
|
766
|
-
|
|
767
|
-
**期望结果:**
|
|
768
|
-
|
|
769
|
-
- width 为 '100%'
|
|
770
|
-
- minWidth 为 28px
|
|
771
|
-
|
|
772
|
-
**测试类型:** 自动化测试 + 人工测试
|
|
773
|
-
|
|
774
|
-
---
|
|
775
|
-
|
|
776
|
-
### 2.11 自适应规则测试
|
|
777
|
-
|
|
778
|
-
#### 测试用例 2.11.1:宽度自适应规则
|
|
779
|
-
|
|
780
|
-
**测试目的:** 验证宽度自适应规则
|
|
781
|
-
**测试步骤:**
|
|
782
|
-
|
|
783
|
-
1. 默认宽度模式(auto),检查最大宽度限制
|
|
784
|
-
2. 设置超长文本,检查是否显示省略号
|
|
785
|
-
3. 设置 `widthMode="full"`,检查最小宽度限制
|
|
786
|
-
|
|
787
|
-
**期望结果:**
|
|
788
|
-
|
|
789
|
-
- 默认最大宽度为 400px
|
|
790
|
-
- 超过最大宽度时,文本区域显示省略号
|
|
791
|
-
- full 模式下最小宽度为 28px
|
|
792
|
-
|
|
793
|
-
**测试类型:** 人工测试
|
|
794
|
-
|
|
795
|
-
---
|
|
796
|
-
|
|
797
|
-
#### 测试用例 2.11.2:水平对齐规则
|
|
798
|
-
|
|
799
|
-
**测试目的:** 验证水平排列时的对齐规则
|
|
800
|
-
**测试步骤:**
|
|
801
|
-
|
|
802
|
-
1. 多个 TextCard 水平排列
|
|
803
|
-
2. 检查内容对齐方式
|
|
804
|
-
|
|
805
|
-
**期望结果:**
|
|
806
|
-
|
|
807
|
-
- 水平排列时,内容默认居中对齐
|
|
808
|
-
|
|
809
|
-
**测试类型:** 人工测试
|
|
810
|
-
|
|
811
|
-
---
|
|
812
|
-
|
|
813
|
-
#### 测试用例 2.11.3:垂直对齐规则
|
|
814
|
-
|
|
815
|
-
**测试目的:** 验证垂直排列时的对齐规则
|
|
816
|
-
**测试步骤:**
|
|
817
|
-
|
|
818
|
-
1. 多个 TextCard 垂直排列
|
|
819
|
-
2. 检查内容对齐方式
|
|
820
|
-
|
|
821
|
-
**期望结果:**
|
|
822
|
-
|
|
823
|
-
- 垂直排列时,内容默认左对齐
|
|
824
|
-
|
|
825
|
-
**测试类型:** 人工测试
|
|
826
|
-
|
|
827
|
-
---
|
|
828
|
-
|
|
829
|
-
### 2.12 交互行为测试
|
|
830
|
-
|
|
831
|
-
#### 测试用例 2.12.1:悬停交互
|
|
832
|
-
|
|
833
|
-
**测试目的:** 验证悬停状态的交互
|
|
834
|
-
**测试步骤:**
|
|
835
|
-
|
|
836
|
-
1. 鼠标悬停在组件上
|
|
837
|
-
2. 检查样式变化
|
|
838
|
-
3. 检查指针样式
|
|
839
|
-
|
|
840
|
-
**期望结果:**
|
|
841
|
-
|
|
842
|
-
- 展示悬停状态样式(根据 variant 不同)
|
|
843
|
-
- 指针变为手型(cursor: pointer)
|
|
844
|
-
- 可点击状态下才显示手型
|
|
845
|
-
|
|
846
|
-
**测试类型:** 人工测试
|
|
847
|
-
|
|
848
|
-
---
|
|
849
|
-
|
|
850
|
-
#### 测试用例 2.12.2:点击交互
|
|
851
|
-
|
|
852
|
-
**测试目的:** 验证点击事件的交互
|
|
853
|
-
**测试步骤:**
|
|
854
|
-
|
|
855
|
-
1. 点击组件
|
|
856
|
-
2. 检查 onClick 回调是否触发
|
|
857
|
-
3. 检查 active.onChange 是否触发(如果提供)
|
|
858
|
-
4. 检查选中状态是否切换
|
|
859
|
-
|
|
860
|
-
**期望结果:**
|
|
861
|
-
|
|
862
|
-
- 触发点击事件(onClick 回调被调用)
|
|
863
|
-
- 如果提供了 active.onChange 且未激活,触发 onChange(true)
|
|
864
|
-
- 切换选中状态(如果使用受控模式)
|
|
865
|
-
|
|
866
|
-
**测试类型:** 自动化测试 + 人工测试
|
|
867
|
-
|
|
868
|
-
---
|
|
869
|
-
|
|
870
|
-
#### 测试用例 2.12.3:选中状态交互
|
|
871
|
-
|
|
872
|
-
**测试目的:** 验证选中状态的样式应用
|
|
873
|
-
**测试步骤:**
|
|
874
|
-
|
|
875
|
-
1. 设置 `active={{ value: true }}`
|
|
876
|
-
2. 检查是否应用选中样式
|
|
877
|
-
|
|
878
|
-
**期望结果:**
|
|
879
|
-
|
|
880
|
-
- 应用选中样式(如边框高亮、背景色变化等,根据 variant 不同)
|
|
881
|
-
|
|
882
|
-
**测试类型:** 自动化测试 + 人工测试
|
|
883
|
-
|
|
884
|
-
---
|
|
885
|
-
|
|
886
|
-
#### 测试用例 2.12.4:禁用状态下的交互
|
|
887
|
-
|
|
888
|
-
**测试目的:** 验证禁用状态下的交互限制
|
|
889
|
-
**测试步骤:**
|
|
890
|
-
|
|
891
|
-
1. 设置 `disabled={{ value: true }}`
|
|
892
|
-
2. 尝试点击组件
|
|
893
|
-
3. 尝试键盘导航
|
|
894
|
-
|
|
895
|
-
**期望结果:**
|
|
896
|
-
|
|
897
|
-
- 点击事件不触发
|
|
898
|
-
- 无法键盘聚焦(tabIndex=-1)
|
|
899
|
-
- 指针变为 not-allowed
|
|
900
|
-
|
|
901
|
-
**测试类型:** 自动化测试 + 人工测试
|
|
902
|
-
|
|
903
|
-
---
|
|
904
|
-
|
|
905
|
-
#### 测试用例 2.12.5:加载状态下的交互
|
|
906
|
-
|
|
907
|
-
**测试目的:** 验证加载状态下的交互限制
|
|
908
|
-
**测试步骤:**
|
|
909
|
-
|
|
910
|
-
1. 设置 `loading={{ value: true }}`
|
|
911
|
-
2. 尝试点击组件
|
|
912
|
-
|
|
913
|
-
**期望结果:**
|
|
914
|
-
|
|
915
|
-
- 点击事件不触发
|
|
916
|
-
- 指针变为 wait
|
|
917
|
-
|
|
918
|
-
**测试类型:** 自动化测试 + 人工测试
|
|
919
|
-
|
|
920
|
-
---
|
|
921
|
-
|
|
922
|
-
#### 测试用例 2.12.6:不可点击状态
|
|
923
|
-
|
|
924
|
-
**测试目的:** 验证 clickable=false 时的交互
|
|
925
|
-
**测试步骤:**
|
|
926
|
-
|
|
927
|
-
1. 设置 `clickable={false}`
|
|
928
|
-
2. 尝试点击组件
|
|
929
|
-
3. 检查指针样式
|
|
930
|
-
|
|
931
|
-
**期望结果:**
|
|
932
|
-
|
|
933
|
-
- 点击事件不触发
|
|
934
|
-
- 指针为默认样式(不是手型)
|
|
935
|
-
- 不添加 `text-card--clickable` 类名
|
|
936
|
-
|
|
937
|
-
**测试类型:** 自动化测试 + 人工测试
|
|
938
|
-
|
|
939
|
-
---
|
|
940
|
-
|
|
941
|
-
### 2.13 自定义渲染测试
|
|
942
|
-
|
|
943
|
-
#### 测试用例 2.13.1:自定义渲染函数
|
|
944
|
-
|
|
945
|
-
**测试目的:** 验证自定义渲染函数功能
|
|
946
|
-
**测试步骤:**
|
|
947
|
-
|
|
948
|
-
1. 设置 `render={(props) => <div className="custom-render">{props.text}</div>}`
|
|
949
|
-
2. 检查是否使用自定义渲染
|
|
950
|
-
|
|
951
|
-
**期望结果:**
|
|
952
|
-
|
|
953
|
-
- 使用自定义渲染函数
|
|
954
|
-
- 忽略其他内容配置(图标、标签等)
|
|
955
|
-
- 正确传递 props
|
|
956
|
-
|
|
957
|
-
**测试类型:** 自动化测试 + 人工测试
|
|
958
|
-
|
|
959
|
-
---
|
|
960
|
-
|
|
961
|
-
### 2.14 可访问性测试
|
|
962
|
-
|
|
963
|
-
#### 测试用例 2.14.1:role 属性
|
|
964
|
-
|
|
965
|
-
**测试目的:** 验证 role 属性设置
|
|
966
|
-
**测试步骤:**
|
|
967
|
-
|
|
968
|
-
1. 检查 DOM 元素的 role 属性
|
|
969
|
-
|
|
970
|
-
**期望结果:**
|
|
971
|
-
|
|
972
|
-
- role="button"
|
|
973
|
-
|
|
974
|
-
**测试类型:** 自动化测试
|
|
975
|
-
|
|
976
|
-
---
|
|
977
|
-
|
|
978
|
-
#### 测试用例 2.14.2:aria-disabled 属性
|
|
979
|
-
|
|
980
|
-
**测试目的:** 验证 aria-disabled 属性设置
|
|
981
|
-
**测试步骤:**
|
|
982
|
-
|
|
983
|
-
1. 设置 `disabled={{ value: true }}`
|
|
984
|
-
2. 检查 aria-disabled 属性
|
|
985
|
-
|
|
986
|
-
**期望结果:**
|
|
987
|
-
|
|
988
|
-
- aria-disabled="true"
|
|
989
|
-
|
|
990
|
-
**测试类型:** 自动化测试
|
|
991
|
-
|
|
992
|
-
---
|
|
993
|
-
|
|
994
|
-
#### 测试用例 2.14.3:tabIndex 属性
|
|
995
|
-
|
|
996
|
-
**测试目的:** 验证 tabIndex 属性设置
|
|
997
|
-
**测试步骤:**
|
|
998
|
-
|
|
999
|
-
1. 正常状态下检查 tabIndex
|
|
1000
|
-
2. disabled 状态下检查 tabIndex
|
|
1001
|
-
|
|
1002
|
-
**期望结果:**
|
|
1003
|
-
|
|
1004
|
-
- 正常状态:tabIndex=0
|
|
1005
|
-
- disabled 状态:tabIndex=-1
|
|
1006
|
-
|
|
1007
|
-
**测试类型:** 自动化测试
|
|
1008
|
-
|
|
1009
|
-
---
|
|
1010
|
-
|
|
1011
|
-
#### 测试用例 2.14.4:键盘导航
|
|
1012
|
-
|
|
1013
|
-
**测试目的:** 验证键盘导航功能
|
|
1014
|
-
**测试步骤:**
|
|
1015
|
-
|
|
1016
|
-
1. 使用 Tab 键聚焦组件
|
|
1017
|
-
2. 使用 Enter/Space 键触发点击
|
|
1018
|
-
|
|
1019
|
-
**期望结果:**
|
|
1020
|
-
|
|
1021
|
-
- 可以通过键盘导航
|
|
1022
|
-
- 焦点状态清晰
|
|
1023
|
-
- 可以键盘触发点击
|
|
1024
|
-
|
|
1025
|
-
**测试类型:** 人工测试
|
|
1026
|
-
|
|
1027
|
-
---
|
|
1028
|
-
|
|
1029
|
-
## 3. 边界条件测试
|
|
1030
|
-
|
|
1031
|
-
### 测试用例 3.1:空文本
|
|
1032
|
-
|
|
1033
|
-
**测试目的:** 验证空文本时的表现
|
|
1034
|
-
**测试步骤:**
|
|
1035
|
-
|
|
1036
|
-
1. 传入 `text=""`
|
|
1037
|
-
2. 检查渲染
|
|
1038
|
-
|
|
1039
|
-
**期望结果:**
|
|
1040
|
-
|
|
1041
|
-
- 不报错
|
|
1042
|
-
- 组件正常渲染
|
|
1043
|
-
|
|
1044
|
-
**测试类型:** 自动化测试
|
|
1045
|
-
|
|
1046
|
-
---
|
|
1047
|
-
|
|
1048
|
-
### 测试用例 3.2:超长文本
|
|
1049
|
-
|
|
1050
|
-
**测试目的:** 验证超长文本时的表现
|
|
1051
|
-
**测试步骤:**
|
|
1052
|
-
|
|
1053
|
-
1. 传入超长文本(超过 400px 宽度)
|
|
1054
|
-
2. 检查是否显示省略号
|
|
1055
|
-
|
|
1056
|
-
**期望结果:**
|
|
1057
|
-
|
|
1058
|
-
- 正确显示省略号
|
|
1059
|
-
- 不出现布局问题
|
|
1060
|
-
|
|
1061
|
-
**测试类型:** 人工测试
|
|
1062
|
-
|
|
1063
|
-
---
|
|
1064
|
-
|
|
1065
|
-
### 测试用例 3.3:特殊字符
|
|
1066
|
-
|
|
1067
|
-
**测试目的:** 验证特殊字符的处理
|
|
1068
|
-
**测试步骤:**
|
|
1069
|
-
|
|
1070
|
-
1. 传入包含特殊字符的文本:`text="<>&\"'"`
|
|
1071
|
-
2. 检查是否正确转义显示
|
|
1072
|
-
|
|
1073
|
-
**期望结果:**
|
|
1074
|
-
|
|
1075
|
-
- 特殊字符正确转义显示
|
|
1076
|
-
- 不出现 XSS 问题
|
|
1077
|
-
|
|
1078
|
-
**测试类型:** 自动化测试 + 人工测试
|
|
1079
|
-
|
|
1080
|
-
---
|
|
1081
|
-
|
|
1082
|
-
### 测试用例 3.4:所有 Props 组合
|
|
1083
|
-
|
|
1084
|
-
**测试目的:** 验证所有 props 同时使用时的表现
|
|
1085
|
-
**测试步骤:**
|
|
1086
|
-
|
|
1087
|
-
1. 传入所有可能的 props
|
|
1088
|
-
2. 检查是否正常渲染,不冲突
|
|
1089
|
-
|
|
1090
|
-
**期望结果:**
|
|
1091
|
-
|
|
1092
|
-
- 正常渲染
|
|
1093
|
-
- 各功能不冲突
|
|
1094
|
-
- 优先级正确(插槽 > 图标/标签,loading > disabled > active)
|
|
1095
|
-
|
|
1096
|
-
**测试类型:** 人工测试
|
|
1097
|
-
|
|
1098
|
-
---
|
|
1099
|
-
|
|
1100
|
-
### 测试用例 3.5:快速切换状态
|
|
1101
|
-
|
|
1102
|
-
**测试目的:** 验证快速切换状态时的表现
|
|
1103
|
-
**测试步骤:**
|
|
1104
|
-
|
|
1105
|
-
1. 快速切换 active、disabled、loading 状态
|
|
1106
|
-
2. 检查状态更新是否正确
|
|
1107
|
-
|
|
1108
|
-
**期望结果:**
|
|
1109
|
-
|
|
1110
|
-
- 状态正确更新
|
|
1111
|
-
- 不出现竞态条件
|
|
1112
|
-
- 样式正确应用
|
|
1113
|
-
|
|
1114
|
-
**测试类型:** 自动化测试
|
|
1115
|
-
|
|
1116
|
-
---
|
|
1117
|
-
|
|
1118
|
-
## 4. 兼容性测试
|
|
1119
|
-
|
|
1120
|
-
### 测试用例 4.1:不同浏览器测试
|
|
1121
|
-
|
|
1122
|
-
**测试目的:** 验证在不同浏览器中的兼容性
|
|
1123
|
-
**测试范围:**
|
|
1124
|
-
|
|
1125
|
-
- Chrome(最新版本)
|
|
1126
|
-
- Firefox(最新版本)
|
|
1127
|
-
- Safari(最新版本)
|
|
1128
|
-
- Edge(最新版本)
|
|
1129
|
-
|
|
1130
|
-
**期望结果:**
|
|
1131
|
-
|
|
1132
|
-
- 所有浏览器中显示一致
|
|
1133
|
-
- 功能正常
|
|
1134
|
-
- 样式正确
|
|
1135
|
-
|
|
1136
|
-
**测试类型:** 人工测试
|
|
1137
|
-
|
|
1138
|
-
---
|
|
1139
|
-
|
|
1140
|
-
### 测试用例 4.2:不同设备测试
|
|
1141
|
-
|
|
1142
|
-
**测试目的:** 验证在不同设备上的表现
|
|
1143
|
-
**测试范围:**
|
|
1144
|
-
|
|
1145
|
-
- 桌面设备(1920x1080)
|
|
1146
|
-
- 笔记本(1366x768)
|
|
1147
|
-
- 平板(768x1024)
|
|
1148
|
-
- 手机(375x667)
|
|
1149
|
-
|
|
1150
|
-
**期望结果:**
|
|
1151
|
-
|
|
1152
|
-
- 响应式布局正常
|
|
1153
|
-
- 触摸交互流畅
|
|
1154
|
-
- 布局在不同尺寸下正确显示
|
|
1155
|
-
|
|
1156
|
-
**测试类型:** 人工测试
|
|
1157
|
-
|
|
1158
|
-
---
|
|
1159
|
-
|
|
1160
|
-
## 5. 性能测试
|
|
1161
|
-
|
|
1162
|
-
### 测试用例 5.1:渲染性能
|
|
1163
|
-
|
|
1164
|
-
**测试目的:** 验证组件渲染性能
|
|
1165
|
-
**测试步骤:**
|
|
1166
|
-
|
|
1167
|
-
1. 渲染包含 100 个 TextCard 的列表
|
|
1168
|
-
2. 测量首次渲染时间
|
|
1169
|
-
3. 测量重新渲染时间
|
|
1170
|
-
|
|
1171
|
-
**期望结果:**
|
|
1172
|
-
|
|
1173
|
-
- 首次渲染时间 < 200ms
|
|
1174
|
-
- 重新渲染时间 < 100ms
|
|
1175
|
-
|
|
1176
|
-
**测试类型:** 性能测试
|
|
1177
|
-
|
|
1178
|
-
---
|
|
1179
|
-
|
|
1180
|
-
### 测试用例 5.2:内存占用
|
|
1181
|
-
|
|
1182
|
-
**测试目的:** 验证组件内存占用
|
|
1183
|
-
**测试步骤:**
|
|
1184
|
-
|
|
1185
|
-
1. 渲染和销毁组件多次
|
|
1186
|
-
2. 监测内存变化
|
|
1187
|
-
|
|
1188
|
-
**期望结果:**
|
|
1189
|
-
|
|
1190
|
-
- 无明显内存泄漏
|
|
1191
|
-
- 销毁后内存释放
|
|
1192
|
-
|
|
1193
|
-
**测试类型:** 性能测试
|
|
1194
|
-
|
|
1195
|
-
---
|
|
1196
|
-
|
|
1197
|
-
### 测试用例 5.3:大量实例性能
|
|
1198
|
-
|
|
1199
|
-
**测试目的:** 验证大量实例时的性能
|
|
1200
|
-
**测试步骤:**
|
|
1201
|
-
|
|
1202
|
-
1. 渲染 1000 个 TextCard 实例
|
|
1203
|
-
2. 检查页面是否卡顿
|
|
1204
|
-
3. 检查交互是否流畅
|
|
1205
|
-
|
|
1206
|
-
**期望结果:**
|
|
1207
|
-
|
|
1208
|
-
- 页面不卡顿
|
|
1209
|
-
- 交互流畅
|
|
1210
|
-
- 无性能问题
|
|
1211
|
-
|
|
1212
|
-
**测试类型:** 性能测试
|
|
1213
|
-
|
|
1214
|
-
---
|
|
1215
|
-
|
|
1216
|
-
## 6. 测试总结
|
|
1217
|
-
|
|
1218
|
-
### 6.1 测试用例统计
|
|
1219
|
-
|
|
1220
|
-
- **总用例数**:150+
|
|
1221
|
-
- **自动化测试**:80+
|
|
1222
|
-
- **人工测试**:70+
|
|
1223
|
-
- **性能测试**:3
|
|
1224
|
-
- **兼容性测试**:2
|
|
1225
|
-
|
|
1226
|
-
### 6.2 测试优先级
|
|
1227
|
-
|
|
1228
|
-
- **P0(高优先级)**:基础渲染、样式变体、尺寸、状态、交互行为、自适应规则
|
|
1229
|
-
- **P1(中优先级)**:图标、标签、角标、插槽、文本配置、宽度模式
|
|
1230
|
-
- **P2(低优先级)**:边界条件、性能测试、可访问性、自定义渲染
|
|
1231
|
-
|
|
1232
|
-
### 6.3 测试覆盖率目标
|
|
1233
|
-
|
|
1234
|
-
- 代码覆盖率:≥ 85%
|
|
1235
|
-
- 分支覆盖率:≥ 80%
|
|
1236
|
-
- 函数覆盖率:≥ 85%
|
|
1237
|
-
- 行覆盖率:≥ 85%
|
|
1238
|
-
- 功能覆盖率:100%
|
|
1239
|
-
|
|
1240
|
-
## 7. 测试执行计划
|
|
1241
|
-
|
|
1242
|
-
### 7.1 自动化测试
|
|
1243
|
-
|
|
1244
|
-
- 使用 Vitest + React Testing Library
|
|
1245
|
-
- 每次代码提交前自动运行
|
|
1246
|
-
- CI/CD 集成
|
|
1247
|
-
|
|
1248
|
-
### 7.2 人工测试
|
|
1249
|
-
|
|
1250
|
-
- 新功能开发完成后进行
|
|
1251
|
-
- 重大版本发布前全面测试
|
|
1252
|
-
- 定期回归测试
|
|
1253
|
-
|
|
1254
|
-
### 7.3 测试报告
|
|
1255
|
-
|
|
1256
|
-
- 记录测试结果
|
|
1257
|
-
- 标注未通过的用例
|
|
1258
|
-
- 提供修复建议
|
|
1259
|
-
|
|
1260
|
-
## 8. Bug 汇总
|
|
1261
|
-
|
|
1262
|
-
**说明**:此部分由测试人员填写发现的 Bug
|
|
1263
|
-
|
|
1264
|
-
### Bug 列表
|
|
1265
|
-
|
|
1266
|
-
| Bug ID | 发现时间 | Bug 描述 | 优先级 | 状态 | 修复时间 | 备注 |
|
|
1267
|
-
|--------|---------|---------|--------|------|---------|------|
|
|
1268
|
-
| - | - | - | - | - | - | - |
|
|
1269
|
-
|
|
1270
|
-
### Bug 模板
|
|
1271
|
-
|
|
1272
|
-
```
|
|
1273
|
-
Bug ID: #001
|
|
1274
|
-
发现时间: 2024-01-01
|
|
1275
|
-
Bug 描述: [详细描述问题]
|
|
1276
|
-
复现步骤:
|
|
1277
|
-
1. [步骤1]
|
|
1278
|
-
2. [步骤2]
|
|
1279
|
-
3. [步骤3]
|
|
1280
|
-
预期结果: [应该显示什么]
|
|
1281
|
-
实际结果: [实际显示什么]
|
|
1282
|
-
优先级: P0/P1/P2/P3
|
|
1283
|
-
状态: 待修复/修复中/已修复/已验证
|
|
1284
|
-
修复时间:
|
|
1285
|
-
修复说明:
|
|
1286
|
-
```
|
|
1287
|
-
|
|
1288
|
-
## 9. 测试结论
|
|
1289
|
-
|
|
1290
|
-
测试完成后填写:
|
|
1291
|
-
|
|
1292
|
-
- [ ] 所有测试用例通过
|
|
1293
|
-
- [ ] 发现 Bug 已修复
|
|
1294
|
-
- [ ] 组件可以发布
|
|
1295
|
-
|
|
1296
|
-
### 测试签名
|
|
1297
|
-
|
|
1298
|
-
- 测试人员: ___________
|
|
1299
|
-
- 测试时间: ___________
|
|
1300
|
-
- 审核人员: ___________
|
|
1301
|
-
- 审核时间: ___________
|
|
1302
|
-
---
|
|
1303
|
-
title: 测试用例
|
|
1304
|
-
order: 4
|
|
1305
|
-
category: atom
|
|
1306
|
-
---
|
|
1307
|
-
|
|
1308
|
-
# TextCard 组件测试用例文档
|
|
1309
|
-
|
|
1310
|
-
## 1. 测试概述
|
|
1311
|
-
|
|
1312
|
-
### 1.1 测试目标
|
|
1313
|
-
|
|
1314
|
-
- 验证 TextCard 组件的所有功能正常运行
|
|
1315
|
-
- 确保组件在各种场景下的表现符合预期
|
|
1316
|
-
- 保证组件的稳定性和可靠性
|
|
1317
|
-
- 验证组件在不同样式、尺寸、状态下的正确渲染
|
|
1318
|
-
|
|
1319
|
-
### 1.2 测试范围
|
|
1320
|
-
|
|
1321
|
-
- 基础功能测试
|
|
1322
|
-
- 6 种样式变体测试(text、filled、light、outlined、gradient、dashed)
|
|
1323
|
-
- 3 种尺寸测试(small、default、large)
|
|
1324
|
-
- 4 种状态测试(default、hover、active、disabled)
|
|
1325
|
-
- 图标、标签、角标功能测试
|
|
1326
|
-
- 插槽功能测试
|
|
1327
|
-
- 文本配置测试
|
|
1328
|
-
- 宽度模式测试
|
|
1329
|
-
- 交互行为测试
|
|
1330
|
-
- 自适应规则测试
|
|
1331
|
-
- 边界条件测试
|
|
1332
|
-
- 兼容性测试
|
|
1333
|
-
- 性能测试
|
|
1334
|
-
|
|
1335
|
-
### 1.3 测试环境
|
|
1336
|
-
|
|
1337
|
-
- React 版本:18.x
|
|
1338
|
-
- TypeScript 版本:5.x
|
|
1339
|
-
- Ant Design 版本:5.x
|
|
1340
|
-
- 测试框架:Vitest + React Testing Library
|
|
1341
|
-
- 测试工具:@testing-library/react, @testing-library/user-event, @testing-library/jest-dom
|
|
1342
|
-
|
|
1343
|
-
## 2. 功能测试用例
|
|
1344
|
-
|
|
1345
|
-
### 2.1 基础渲染测试
|
|
1346
|
-
|
|
1347
|
-
#### 测试用例 2.1.1:默认渲染
|
|
1348
|
-
|
|
1349
|
-
**测试目的:** 验证组件能够正常渲染
|
|
1350
|
-
**测试步骤:**
|
|
1351
|
-
|
|
1352
|
-
1. 渲染 TextCard 组件,传入必填 prop `text="Tab title"`
|
|
1353
|
-
2. 检查组件是否成功挂载
|
|
1354
|
-
3. 检查文本内容是否正确显示
|
|
1355
|
-
|
|
1356
|
-
**期望结果:**
|
|
1357
|
-
|
|
1358
|
-
- 组件成功渲染
|
|
1359
|
-
- 显示文本内容 "Tab title"
|
|
1360
|
-
- 使用默认样式变体(text)
|
|
1361
|
-
- 使用默认尺寸(default)
|
|
1362
|
-
|
|
1363
|
-
**测试类型:** 自动化测试
|
|
1364
|
-
|
|
1365
|
-
---
|
|
1366
|
-
|
|
1367
|
-
#### 测试用例 2.1.2:ReactNode 文本渲染
|
|
1368
|
-
|
|
1369
|
-
**测试目的:** 验证传入 ReactNode 作为文本内容
|
|
1370
|
-
**测试步骤:**
|
|
1371
|
-
|
|
1372
|
-
1. 传入 `text={<span className="custom-text">Custom</span>}`
|
|
1373
|
-
2. 检查是否渲染了 ReactNode 内容
|
|
1374
|
-
|
|
1375
|
-
**期望结果:**
|
|
1376
|
-
|
|
1377
|
-
- 正确渲染 ReactNode 内容
|
|
1378
|
-
- 自定义类名生效
|
|
1379
|
-
|
|
1380
|
-
**测试类型:** 自动化测试
|
|
1381
|
-
|
|
1382
|
-
---
|
|
1383
|
-
|
|
1384
|
-
#### 测试用例 2.1.3:空文本处理
|
|
1385
|
-
|
|
1386
|
-
**测试目的:** 验证空文本时的表现
|
|
1387
|
-
**测试步骤:**
|
|
1388
|
-
|
|
1389
|
-
1. 传入 `text=""`
|
|
1390
|
-
2. 检查渲染
|
|
1391
|
-
|
|
1392
|
-
**期望结果:**
|
|
1393
|
-
|
|
1394
|
-
- 不报错
|
|
1395
|
-
- 组件正常渲染,不显示文本内容
|
|
1396
|
-
|
|
1397
|
-
**测试类型:** 自动化测试
|
|
1398
|
-
|
|
1399
|
-
---
|
|
1400
|
-
|
|
1401
|
-
### 2.2 样式变体测试
|
|
1402
|
-
|
|
1403
|
-
#### 测试用例 2.2.1:样式 1 - 纯文本(text)
|
|
1404
|
-
|
|
1405
|
-
**测试目的:** 验证 text 样式变体的渲染和交互
|
|
1406
|
-
**测试步骤:**
|
|
1407
|
-
|
|
1408
|
-
1. 设置 `variant="text"`
|
|
1409
|
-
2. 检查默认状态样式
|
|
1410
|
-
3. 设置 `active={{ value: true }}`,检查激活状态
|
|
1411
|
-
4. 鼠标悬停,检查 hover 状态
|
|
1412
|
-
5. 设置 `disabled={{ value: true }}`,检查禁用状态
|
|
1413
|
-
|
|
1414
|
-
**期望结果:**
|
|
1415
|
-
|
|
1416
|
-
- 默认状态:无背景,无边框,无 padding,文本颜色为默认色
|
|
1417
|
-
- Active 状态:文本颜色变为主题色(`var(--theme-color)`),字体加粗(font-weight: 600)
|
|
1418
|
-
- Hover 状态:文本颜色变为浅紫色(`var(--theme-color-light)`)
|
|
1419
|
-
- Disabled 状态:文本半透明(opacity: 0.4),颜色变灰
|
|
1420
|
-
|
|
1421
|
-
**测试类型:** 自动化测试 + 人工测试
|
|
1422
|
-
|
|
1423
|
-
---
|
|
1424
|
-
|
|
1425
|
-
#### 测试用例 2.2.2:样式 2 - 圆角背景(filled)
|
|
1426
|
-
|
|
1427
|
-
**测试目的:** 验证 filled 样式变体的渲染和交互
|
|
1428
|
-
**测试步骤:**
|
|
1429
|
-
|
|
1430
|
-
1. 设置 `variant="filled"`
|
|
1431
|
-
2. 检查默认状态样式
|
|
1432
|
-
3. 设置 `active={{ value: true }}`,检查激活状态
|
|
1433
|
-
4. 鼠标悬停,检查 hover 状态
|
|
1434
|
-
|
|
1435
|
-
**期望结果:**
|
|
1436
|
-
|
|
1437
|
-
- 默认状态:无背景,有 padding,圆角 40px(胶囊形)
|
|
1438
|
-
- Active 状态:主题色背景(`var(--theme-color)`),白色文字
|
|
1439
|
-
- Hover 状态:灰色背景(#F2F4F7)
|
|
1440
|
-
|
|
1441
|
-
**测试类型:** 自动化测试 + 人工测试
|
|
1442
|
-
|
|
1443
|
-
---
|
|
1444
|
-
|
|
1445
|
-
#### 测试用例 2.2.3:样式 3 - 浅色背景(light)
|
|
1446
|
-
|
|
1447
|
-
**测试目的:** 验证 light 样式变体的渲染和交互
|
|
1448
|
-
**测试步骤:**
|
|
1449
|
-
|
|
1450
|
-
1. 设置 `variant="light"`
|
|
1451
|
-
2. 检查默认状态样式
|
|
1452
|
-
3. 设置 `active={{ value: true }}`,检查激活状态
|
|
1453
|
-
4. 鼠标悬停,检查 hover 状态
|
|
1454
|
-
|
|
1455
|
-
**期望结果:**
|
|
1456
|
-
|
|
1457
|
-
- 默认状态:无背景,深灰文字(#475467)
|
|
1458
|
-
- Active 状态:浅紫背景(`var(--theme-color-bg)`),主题色文字,字体加粗
|
|
1459
|
-
- Hover 状态:灰色背景(#F2F4F7)
|
|
1460
|
-
|
|
1461
|
-
**测试类型:** 自动化测试 + 人工测试
|
|
1462
|
-
|
|
1463
|
-
---
|
|
1464
|
-
|
|
1465
|
-
#### 测试用例 2.2.4:样式 4 - 描边(outlined)
|
|
1466
|
-
|
|
1467
|
-
**测试目的:** 验证 outlined 样式变体的渲染和交互
|
|
1468
|
-
**测试步骤:**
|
|
1469
|
-
|
|
1470
|
-
1. 设置 `variant="outlined"`
|
|
1471
|
-
2. 检查默认状态样式
|
|
1472
|
-
3. 设置 `active={{ value: true }}`,检查激活状态
|
|
1473
|
-
4. 鼠标悬停,检查 hover 状态
|
|
1474
|
-
|
|
1475
|
-
**期望结果:**
|
|
1476
|
-
|
|
1477
|
-
- 默认状态:透明背景,灰色文字(#475467)
|
|
1478
|
-
- Active 状态:灰色背景(#F2F4F7),黑色文字
|
|
1479
|
-
- Hover 状态:浅灰背景(#F9FAFB),黑色文字
|
|
1480
|
-
|
|
1481
|
-
**测试类型:** 自动化测试 + 人工测试
|
|
1482
|
-
|
|
1483
|
-
---
|
|
1484
|
-
|
|
1485
|
-
#### 测试用例 2.2.5:样式 5 - 渐变(gradient)
|
|
1486
|
-
|
|
1487
|
-
**测试目的:** 验证 gradient 样式变体的渲染和交互
|
|
1488
|
-
**测试步骤:**
|
|
1489
|
-
|
|
1490
|
-
1. 设置 `variant="gradient"`
|
|
1491
|
-
2. 检查默认状态样式
|
|
1492
|
-
3. 设置 `active={{ value: true }}`,检查激活状态
|
|
1493
|
-
4. 鼠标悬停,检查 hover 状态
|
|
1494
|
-
|
|
1495
|
-
**期望结果:**
|
|
1496
|
-
|
|
1497
|
-
- 默认状态:透明背景,灰色文字(#667085)
|
|
1498
|
-
- Active 状态:白色背景,阴影效果,黑色文字(#101828)
|
|
1499
|
-
- Hover 状态:文字颜色变为黑色
|
|
1500
|
-
|
|
1501
|
-
**测试类型:** 自动化测试 + 人工测试
|
|
1502
|
-
|
|
1503
|
-
---
|
|
1504
|
-
|
|
1505
|
-
#### 测试用例 2.2.6:样式 6 - 虚线(dashed)
|
|
1506
|
-
|
|
1507
|
-
**测试目的:** 验证 dashed 样式变体的渲染和交互
|
|
1508
|
-
**测试步骤:**
|
|
1509
|
-
|
|
1510
|
-
1. 设置 `variant="dashed"`
|
|
1511
|
-
2. 检查默认状态样式
|
|
1512
|
-
3. 设置 `active={{ value: true }}`,检查激活状态
|
|
1513
|
-
4. 鼠标悬停,检查 hover 状态
|
|
1514
|
-
|
|
1515
|
-
**期望结果:**
|
|
1516
|
-
|
|
1517
|
-
- 默认状态:透明背景,灰色文字(#475467)
|
|
1518
|
-
- Active 状态:白色背景,上左右三边有边框,主题色文字,圆角 8px 8px 0 0
|
|
1519
|
-
- Hover 状态:文字颜色变为黑色
|
|
1520
|
-
|
|
1521
|
-
**测试类型:** 自动化测试 + 人工测试
|
|
1522
|
-
|
|
1523
|
-
---
|
|
1524
|
-
|
|
1525
|
-
### 2.3 尺寸测试
|
|
1526
|
-
|
|
1527
|
-
#### 测试用例 2.3.1:Small 尺寸
|
|
1528
|
-
|
|
1529
|
-
**测试目的:** 验证 small 尺寸的渲染
|
|
1530
|
-
**测试步骤:**
|
|
1531
|
-
|
|
1532
|
-
1. 设置 `size="small"`
|
|
1533
|
-
2. 检查 padding、fontSize、gap、borderRadius
|
|
1534
|
-
|
|
1535
|
-
**期望结果:**
|
|
1536
|
-
|
|
1537
|
-
- padding: 8px 12px
|
|
1538
|
-
- fontSize: 14px
|
|
1539
|
-
- lineHeight: 22px
|
|
1540
|
-
- gap: 8px
|
|
1541
|
-
- borderRadius: 4px
|
|
1542
|
-
|
|
1543
|
-
**测试类型:** 自动化测试 + 人工测试
|
|
1544
|
-
|
|
1545
|
-
---
|
|
1546
|
-
|
|
1547
|
-
#### 测试用例 2.3.2:Default 尺寸
|
|
1548
|
-
|
|
1549
|
-
**测试目的:** 验证 default 尺寸的渲染
|
|
1550
|
-
**测试步骤:**
|
|
1551
|
-
|
|
1552
|
-
1. 设置 `size="default"` 或不设置 size(默认值)
|
|
1553
|
-
2. 检查 padding、fontSize、gap、borderRadius
|
|
1554
|
-
|
|
1555
|
-
**期望结果:**
|
|
1556
|
-
|
|
1557
|
-
- padding: 12px 16px
|
|
1558
|
-
- fontSize: 14px
|
|
1559
|
-
- lineHeight: 22px
|
|
1560
|
-
- gap: 12px
|
|
1561
|
-
- borderRadius: 6px
|
|
1562
|
-
|
|
1563
|
-
**测试类型:** 自动化测试 + 人工测试
|
|
1564
|
-
|
|
1565
|
-
---
|
|
1566
|
-
|
|
1567
|
-
#### 测试用例 2.3.3:Large 尺寸
|
|
1568
|
-
|
|
1569
|
-
**测试目的:** 验证 large 尺寸的渲染
|
|
1570
|
-
**测试步骤:**
|
|
1571
|
-
|
|
1572
|
-
1. 设置 `size="large"`
|
|
1573
|
-
2. 检查 padding、fontSize、gap、borderRadius
|
|
1574
|
-
|
|
1575
|
-
**期望结果:**
|
|
1576
|
-
|
|
1577
|
-
- padding: 16px 20px
|
|
1578
|
-
- fontSize: 16px
|
|
1579
|
-
- lineHeight: 24px
|
|
1580
|
-
- gap: 16px
|
|
1581
|
-
- borderRadius: 8px
|
|
1582
|
-
|
|
1583
|
-
**测试类型:** 自动化测试 + 人工测试
|
|
1584
|
-
|
|
1585
|
-
---
|
|
1586
|
-
|
|
1587
|
-
### 2.4 状态测试
|
|
1588
|
-
|
|
1589
|
-
#### 测试用例 2.4.1:Active 状态
|
|
1590
|
-
|
|
1591
|
-
**测试目的:** 验证 active 状态的渲染和交互
|
|
1592
|
-
**测试步骤:**
|
|
1593
|
-
|
|
1594
|
-
1. 设置 `active={{ value: true }}`
|
|
1595
|
-
2. 检查样式、类名、data 属性
|
|
1596
|
-
3. 设置 `active={{ value: true, style: { color: 'red' }, className: 'custom-active' }}`
|
|
1597
|
-
4. 检查自定义样式和类名是否生效
|
|
1598
|
-
5. 设置 `active={{ value: true, extra: <div>Extra</div> }}`
|
|
1599
|
-
6. 检查 extra 内容是否渲染
|
|
1600
|
-
|
|
1601
|
-
**期望结果:**
|
|
1602
|
-
|
|
1603
|
-
- 应用 active 样式(根据 variant 不同)
|
|
1604
|
-
- 添加 `text-card--active` 类名
|
|
1605
|
-
- 设置 `data-active="true"` 属性
|
|
1606
|
-
- 自定义样式和类名生效
|
|
1607
|
-
- extra 内容正确渲染
|
|
1608
|
-
|
|
1609
|
-
**测试类型:** 自动化测试 + 人工测试
|
|
1610
|
-
|
|
1611
|
-
---
|
|
1612
|
-
|
|
1613
|
-
#### 测试用例 2.4.2:Disabled 状态
|
|
1614
|
-
|
|
1615
|
-
**测试目的:** 验证 disabled 状态的渲染和交互
|
|
1616
|
-
**测试步骤:**
|
|
1617
|
-
|
|
1618
|
-
1. 设置 `disabled={{ value: true }}`
|
|
1619
|
-
2. 检查样式、类名、aria 属性
|
|
1620
|
-
3. 尝试点击组件
|
|
1621
|
-
4. 检查 tabIndex 属性
|
|
1622
|
-
|
|
1623
|
-
**期望结果:**
|
|
1624
|
-
|
|
1625
|
-
- 透明度 0.4,颜色变灰,cursor: not-allowed
|
|
1626
|
-
- 添加 `text-card--disabled` 类名
|
|
1627
|
-
- 设置 `data-disabled="true"` 和 `aria-disabled="true"` 属性
|
|
1628
|
-
- tabIndex 为 -1,无法键盘聚焦
|
|
1629
|
-
- 点击事件不触发
|
|
1630
|
-
|
|
1631
|
-
**测试类型:** 自动化测试 + 人工测试
|
|
1632
|
-
|
|
1633
|
-
---
|
|
1634
|
-
|
|
1635
|
-
#### 测试用例 2.4.3:Loading 状态
|
|
1636
|
-
|
|
1637
|
-
**测试目的:** 验证 loading 状态的渲染和交互
|
|
1638
|
-
**测试步骤:**
|
|
1639
|
-
|
|
1640
|
-
1. 设置 `loading={{ value: true }}`
|
|
1641
|
-
2. 检查样式、类名
|
|
1642
|
-
3. 尝试点击组件
|
|
1643
|
-
4. 设置 `loading={{ value: true, extra: <Spin /> }}`
|
|
1644
|
-
5. 检查 extra 内容是否渲染
|
|
1645
|
-
|
|
1646
|
-
**期望结果:**
|
|
1647
|
-
|
|
1648
|
-
- 透明度 0.6,cursor: wait
|
|
1649
|
-
- 添加 `text-card--loading` 类名
|
|
1650
|
-
- 设置 `data-loading="true"` 属性
|
|
1651
|
-
- 点击事件不触发
|
|
1652
|
-
- extra 内容正确渲染
|
|
1653
|
-
|
|
1654
|
-
**测试类型:** 自动化测试 + 人工测试
|
|
1655
|
-
|
|
1656
|
-
---
|
|
1657
|
-
|
|
1658
|
-
#### 测试用例 2.4.4:状态优先级
|
|
1659
|
-
|
|
1660
|
-
**测试目的:** 验证状态优先级规则(loading > disabled > active)
|
|
1661
|
-
**测试步骤:**
|
|
1662
|
-
|
|
1663
|
-
1. 同时设置 `loading={{ value: true, extra: <div>Loading</div> }}`、`disabled={{ value: true, extra: <div>Disabled</div> }}`、`active={{ value: true, extra: <div>Active</div> }}`
|
|
1664
|
-
2. 检查显示哪个状态的 extra 内容
|
|
1665
|
-
3. 移除 loading,检查显示哪个状态
|
|
1666
|
-
4. 移除 disabled,检查显示哪个状态
|
|
1667
|
-
|
|
1668
|
-
**期望结果:**
|
|
1669
|
-
|
|
1670
|
-
- 同时存在时,显示 loading 的 extra
|
|
1671
|
-
- 只有 disabled 和 active 时,显示 disabled 的 extra
|
|
1672
|
-
- 只有 active 时,显示 active 的 extra
|
|
1673
|
-
|
|
1674
|
-
**测试类型:** 自动化测试
|
|
1675
|
-
|
|
1676
|
-
---
|
|
1677
|
-
|
|
1678
|
-
### 2.5 图标功能测试
|
|
1679
|
-
|
|
1680
|
-
#### 测试用例 2.5.1:前置图标
|
|
1681
|
-
|
|
1682
|
-
**测试目的:** 验证前置图标的渲染和配置
|
|
1683
|
-
**测试步骤:**
|
|
1684
|
-
|
|
1685
|
-
1. 设置 `prefixIcon={<BellOutlined />}`
|
|
1686
|
-
2. 检查图标是否显示在文本前面
|
|
1687
|
-
3. 设置 `iconConfig={{ size: 20, color: '#ff0000' }}`
|
|
1688
|
-
4. 检查图标大小和颜色是否生效
|
|
1689
|
-
|
|
1690
|
-
**期望结果:**
|
|
1691
|
-
|
|
1692
|
-
- 图标显示在文本前面
|
|
1693
|
-
- 图标大小为 20px
|
|
1694
|
-
- 图标颜色为红色
|
|
1695
|
-
- 图标容器有正确的类名 `text-card__icon--prefix`
|
|
1696
|
-
|
|
1697
|
-
**测试类型:** 自动化测试 + 人工测试
|
|
1698
|
-
|
|
1699
|
-
---
|
|
1700
|
-
|
|
1701
|
-
#### 测试用例 2.5.2:后置图标
|
|
1702
|
-
|
|
1703
|
-
**测试目的:** 验证后置图标的渲染和配置
|
|
1704
|
-
**测试步骤:**
|
|
1705
|
-
|
|
1706
|
-
1. 设置 `suffixIcon={<DownOutlined />}`
|
|
1707
|
-
2. 检查图标是否显示在文本后面
|
|
1708
|
-
3. 设置 `iconConfig={{ size: 16 }}`
|
|
1709
|
-
4. 检查图标大小是否生效
|
|
1710
|
-
|
|
1711
|
-
**期望结果:**
|
|
1712
|
-
|
|
1713
|
-
- 图标显示在文本后面
|
|
1714
|
-
- 图标大小为 16px
|
|
1715
|
-
- 图标容器有正确的类名 `text-card__icon--suffix`
|
|
1716
|
-
|
|
1717
|
-
**测试类型:** 自动化测试 + 人工测试
|
|
1718
|
-
|
|
1719
|
-
---
|
|
1720
|
-
|
|
1721
|
-
#### 测试用例 2.5.3:前后图标组合
|
|
1722
|
-
|
|
1723
|
-
**测试目的:** 验证同时显示前后图标
|
|
1724
|
-
**测试步骤:**
|
|
1725
|
-
|
|
1726
|
-
1. 同时设置 `prefixIcon` 和 `suffixIcon`
|
|
1727
|
-
2. 检查两个图标是否都正常显示
|
|
1728
|
-
3. 检查间距是否正确
|
|
1729
|
-
|
|
1730
|
-
**期望结果:**
|
|
1731
|
-
|
|
1732
|
-
- 前后图标都正常显示
|
|
1733
|
-
- 间距根据 size 正确设置(gap 属性)
|
|
1734
|
-
|
|
1735
|
-
**测试类型:** 自动化测试 + 人工测试
|
|
1736
|
-
|
|
1737
|
-
---
|
|
1738
|
-
|
|
1739
|
-
### 2.6 标签功能测试
|
|
1740
|
-
|
|
1741
|
-
#### 测试用例 2.6.1:后置标签
|
|
1742
|
-
|
|
1743
|
-
**测试目的:** 验证后置标签的渲染和配置
|
|
1744
|
-
**测试步骤:**
|
|
1745
|
-
|
|
1746
|
-
1. 设置 `tag={<Tag color="blue">2</Tag>}`
|
|
1747
|
-
2. 检查标签是否显示在后置位置
|
|
1748
|
-
3. 设置 `tagConfig={{ style: { marginLeft: 8 } }}`
|
|
1749
|
-
4. 检查自定义样式是否生效
|
|
1750
|
-
|
|
1751
|
-
**期望结果:**
|
|
1752
|
-
|
|
1753
|
-
- 标签显示在后置位置(文本后面)
|
|
1754
|
-
- 自定义样式生效
|
|
1755
|
-
- 标签容器有正确的类名 `text-card__tag`
|
|
1756
|
-
|
|
1757
|
-
**测试类型:** 自动化测试 + 人工测试
|
|
1758
|
-
|
|
1759
|
-
---
|
|
1760
|
-
|
|
1761
|
-
#### 测试用例 2.6.2:标签与后置图标组合
|
|
1762
|
-
|
|
1763
|
-
**测试目的:** 验证标签和后置图标同时显示时的顺序
|
|
1764
|
-
**测试步骤:**
|
|
1765
|
-
|
|
1766
|
-
1. 同时设置 `tag` 和 `suffixIcon`
|
|
1767
|
-
2. 检查显示顺序
|
|
1768
|
-
|
|
1769
|
-
**期望结果:**
|
|
1770
|
-
|
|
1771
|
-
- 标签在前,图标在后
|
|
1772
|
-
- 顺序:文本 -> 标签 -> 后置图标
|
|
1773
|
-
|
|
1774
|
-
**测试类型:** 人工测试
|
|
1775
|
-
|
|
1776
|
-
---
|
|
1777
|
-
|
|
1778
|
-
### 2.7 角标功能测试
|
|
1779
|
-
|
|
1780
|
-
#### 测试用例 2.7.1:红点角标
|
|
1781
|
-
|
|
1782
|
-
**测试目的:** 验证红点角标的渲染和配置
|
|
1783
|
-
**测试步骤:**
|
|
1784
|
-
|
|
1785
|
-
1. 设置 `badge={{ type: 'dot' }}`
|
|
1786
|
-
2. 检查是否显示红点角标
|
|
1787
|
-
3. 设置 `badge={{ type: 'dot', color: 'blue', offset: [-10, 0], size: 'small' }}`
|
|
1788
|
-
4. 检查位置、颜色、偏移是否生效
|
|
1789
|
-
|
|
1790
|
-
**期望结果:**
|
|
1791
|
-
|
|
1792
|
-
- 显示红点角标
|
|
1793
|
-
- 通过 offset 控制位置(向左偏移)
|
|
1794
|
-
- 颜色为蓝色
|
|
1795
|
-
- 大小为 small
|
|
1796
|
-
|
|
1797
|
-
**测试类型:** 自动化测试 + 人工测试
|
|
1798
|
-
|
|
1799
|
-
---
|
|
1800
|
-
|
|
1801
|
-
#### 测试用例 2.7.2:数字角标
|
|
1802
|
-
|
|
1803
|
-
**测试目的:** 验证数字角标的渲染和配置
|
|
1804
|
-
**测试步骤:**
|
|
1805
|
-
|
|
1806
|
-
1. 设置 `badge={{ type: 'number', content: 99 }}`
|
|
1807
|
-
2. 检查是否显示数字 99
|
|
1808
|
-
3. 设置 `badge={{ type: 'number', content: 999 }}`
|
|
1809
|
-
4. 检查大数字是否正确显示
|
|
1810
|
-
5. 设置 `badge={{ type: 'number', content: 0, showZero: false }}`
|
|
1811
|
-
6. 检查 0 是否不显示
|
|
1812
|
-
7. 设置 `badge={{ type: 'number', content: 0, showZero: true }}`
|
|
1813
|
-
8. 检查 0 是否显示
|
|
1814
|
-
|
|
1815
|
-
**期望结果:**
|
|
1816
|
-
|
|
1817
|
-
- 显示数字 99
|
|
1818
|
-
- 大数字正确显示
|
|
1819
|
-
- showZero=false 时,0 不显示
|
|
1820
|
-
- showZero=true 时,0 显示
|
|
1821
|
-
|
|
1822
|
-
**测试类型:** 自动化测试 + 人工测试
|
|
1823
|
-
|
|
1824
|
-
---
|
|
1825
|
-
|
|
1826
|
-
#### 测试用例 2.7.3:文本角标
|
|
1827
|
-
|
|
1828
|
-
**测试目的:** 验证文本角标的渲染和配置
|
|
1829
|
-
**测试步骤:**
|
|
1830
|
-
|
|
1831
|
-
1. 设置 `badge={{ type: 'text', content: 'New' }}`
|
|
1832
|
-
2. 检查是否显示文本 "New"
|
|
1833
|
-
3. 设置 `badge={{ type: 'text', content: 'Very Long Text' }}`
|
|
1834
|
-
4. 检查长文本是否正确显示
|
|
1835
|
-
|
|
1836
|
-
**期望结果:**
|
|
1837
|
-
|
|
1838
|
-
- 显示文本 "New"
|
|
1839
|
-
- 长文本正常显示
|
|
1840
|
-
|
|
1841
|
-
**测试类型:** 自动化测试 + 人工测试
|
|
1842
|
-
|
|
1843
|
-
---
|
|
1844
|
-
|
|
1845
|
-
#### 测试用例 2.7.4:角标位置(通过 offset 控制)
|
|
1846
|
-
|
|
1847
|
-
**测试目的:** 验证角标的不同位置(通过 offset 控制)
|
|
1848
|
-
**测试步骤:**
|
|
1849
|
-
|
|
1850
|
-
1. 不设置 offset,检查默认位置(右上角)
|
|
1851
|
-
2. 设置 `offset: [-10, 0]`,检查是否向左偏移
|
|
1852
|
-
3. 设置 `offset: [0, 10]`,检查是否向下偏移
|
|
1853
|
-
4. 设置 `offset: [-10, 10]`,检查是否向左下偏移
|
|
1854
|
-
|
|
1855
|
-
**期望结果:**
|
|
1856
|
-
|
|
1857
|
-
- 不设置 offset 时,角标在右上角(默认位置)
|
|
1858
|
-
- offset 正数向右/下偏移,负数向左/上偏移
|
|
1859
|
-
- 角标位置正确对应设置的 offset 值
|
|
1860
|
-
|
|
1861
|
-
**测试类型:** 人工测试
|
|
1862
|
-
|
|
1863
|
-
---
|
|
1864
|
-
|
|
1865
|
-
#### 测试用例 2.7.5:角标大小
|
|
1866
|
-
|
|
1867
|
-
**测试目的:** 验证角标大小控制
|
|
1868
|
-
**测试步骤:**
|
|
1869
|
-
|
|
1870
|
-
1. 设置 `badge={{ type: 'number', content: 99, size: 'small' }}`
|
|
1871
|
-
2. 检查角标大小是否为 small
|
|
1872
|
-
3. 设置 `badge={{ type: 'number', content: 99, size: 'default' }}`
|
|
1873
|
-
4. 检查角标大小是否为 default
|
|
1874
|
-
5. 设置 `badge={{ type: 'number', content: 99 }}`(不设置 size)
|
|
1875
|
-
6. 检查角标是否使用默认大小
|
|
1876
|
-
7. 设置 `badge={{ type: 'dot', size: 'small' }}`
|
|
1877
|
-
8. 检查红点角标大小是否生效
|
|
1878
|
-
|
|
1879
|
-
**期望结果:**
|
|
1880
|
-
|
|
1881
|
-
- 角标大小正确对应设置的 size 值
|
|
1882
|
-
- size='small' 时显示小尺寸角标
|
|
1883
|
-
- size='default' 时显示默认尺寸角标
|
|
1884
|
-
- 不设置 size 时使用默认尺寸
|
|
1885
|
-
|
|
1886
|
-
**测试类型:** 自动化测试 + 人工测试
|
|
1887
|
-
|
|
1888
|
-
---
|
|
1889
|
-
|
|
1890
|
-
#### 测试用例 2.7.6:角标显示零值
|
|
1891
|
-
|
|
1892
|
-
**测试目的:** 验证角标 showZero 配置
|
|
1893
|
-
**测试步骤:**
|
|
1894
|
-
|
|
1895
|
-
1. 设置 `badge={{ type: 'number', content: 0, showZero: false }}`
|
|
1896
|
-
2. 检查角标是否不显示
|
|
1897
|
-
3. 设置 `badge={{ type: 'number', content: 0, showZero: true }}`
|
|
1898
|
-
4. 检查角标是否显示 0
|
|
1899
|
-
5. 设置 `badge={{ type: 'number', content: 0 }}`(不设置 showZero)
|
|
1900
|
-
6. 检查角标是否不显示(默认 showZero=false)
|
|
1901
|
-
7. 设置 `badge={{ type: 'number', content: 1, showZero: false }}`
|
|
1902
|
-
8. 检查非零值是否正常显示
|
|
1903
|
-
|
|
1904
|
-
**期望结果:**
|
|
1905
|
-
|
|
1906
|
-
- showZero=false 时,content 为 0 不显示角标
|
|
1907
|
-
- showZero=true 时,content 为 0 显示角标
|
|
1908
|
-
- 不设置 showZero 时,默认不显示零值
|
|
1909
|
-
- 非零值不受 showZero 影响,正常显示
|
|
1910
|
-
|
|
1911
|
-
**测试类型:** 自动化测试 + 人工测试
|
|
1912
|
-
|
|
1913
|
-
---
|
|
1914
|
-
|
|
1915
|
-
### 2.8 插槽功能测试
|
|
1916
|
-
|
|
1917
|
-
#### 测试用例 2.8.1:前置插槽
|
|
1918
|
-
|
|
1919
|
-
**测试目的:** 验证前置插槽的渲染和优先级
|
|
1920
|
-
**测试步骤:**
|
|
1921
|
-
|
|
1922
|
-
1. 同时设置 `prefixSlot={<div>Custom</div>}` 和 `prefixIcon={<BellOutlined />}`
|
|
1923
|
-
2. 检查显示哪个内容
|
|
1924
|
-
|
|
1925
|
-
**期望结果:**
|
|
1926
|
-
|
|
1927
|
-
- 显示前置插槽内容
|
|
1928
|
-
- 不显示前置图标
|
|
1929
|
-
- 插槽优先级高于图标
|
|
1930
|
-
|
|
1931
|
-
**测试类型:** 自动化测试 + 人工测试
|
|
1932
|
-
|
|
1933
|
-
---
|
|
1934
|
-
|
|
1935
|
-
#### 测试用例 2.8.2:后置插槽
|
|
1936
|
-
|
|
1937
|
-
**测试目的:** 验证后置插槽的渲染和优先级
|
|
1938
|
-
**测试步骤:**
|
|
1939
|
-
|
|
1940
|
-
1. 同时设置 `suffixSlot={<div>Custom</div>}`、`tag={<Tag>Tag</Tag>}` 和 `suffixIcon={<DownOutlined />}`
|
|
1941
|
-
2. 检查显示哪个内容
|
|
1942
|
-
|
|
1943
|
-
**期望结果:**
|
|
1944
|
-
|
|
1945
|
-
- 显示后置插槽内容
|
|
1946
|
-
- 不显示标签和后置图标
|
|
1947
|
-
- 插槽优先级高于标签和图标
|
|
1948
|
-
|
|
1949
|
-
**测试类型:** 自动化测试 + 人工测试
|
|
1950
|
-
|
|
1951
|
-
---
|
|
1952
|
-
|
|
1953
|
-
### 2.9 文本配置测试
|
|
1954
|
-
|
|
1955
|
-
#### 测试用例 2.9.1:字体样式配置
|
|
1956
|
-
|
|
1957
|
-
**测试目的:** 验证文本字体样式配置
|
|
1958
|
-
**测试步骤:**
|
|
1959
|
-
|
|
1960
|
-
1. 设置 `textConfig={{ fontSize: 18, fontWeight: 'bold', color: '#ff0000' }}`
|
|
1961
|
-
2. 检查字体大小、粗细、颜色是否生效
|
|
1962
|
-
|
|
1963
|
-
**期望结果:**
|
|
1964
|
-
|
|
1965
|
-
- 字体大小为 18px
|
|
1966
|
-
- 字体加粗
|
|
1967
|
-
- 文本颜色为红色
|
|
1968
|
-
|
|
1969
|
-
**测试类型:** 自动化测试 + 人工测试
|
|
1970
|
-
|
|
1971
|
-
---
|
|
1972
|
-
|
|
1973
|
-
#### 测试用例 2.9.2:文本省略(单行)
|
|
1974
|
-
|
|
1975
|
-
**测试目的:** 验证单行文本省略功能
|
|
1976
|
-
**测试步骤:**
|
|
1977
|
-
|
|
1978
|
-
1. 设置超长文本和 `textConfig={{ maxLines: 1, ellipsis: true }}`
|
|
1979
|
-
2. 检查是否显示省略号
|
|
1980
|
-
|
|
1981
|
-
**期望结果:**
|
|
1982
|
-
|
|
1983
|
-
- 文本超出部分显示省略号
|
|
1984
|
-
- 使用 `text-overflow: ellipsis` 和 `white-space: nowrap`
|
|
1985
|
-
|
|
1986
|
-
**测试类型:** 自动化测试 + 人工测试
|
|
1987
|
-
|
|
1988
|
-
---
|
|
1989
|
-
|
|
1990
|
-
#### 测试用例 2.9.3:文本省略(多行)
|
|
1991
|
-
|
|
1992
|
-
**测试目的:** 验证多行文本省略功能
|
|
1993
|
-
**测试步骤:**
|
|
1994
|
-
|
|
1995
|
-
1. 设置超长文本和 `textConfig={{ maxLines: 2, ellipsis: true }}`
|
|
1996
|
-
2. 检查是否显示省略号
|
|
1997
|
-
|
|
1998
|
-
**期望结果:**
|
|
1999
|
-
|
|
2000
|
-
- 文本超出 2 行后显示省略号
|
|
2001
|
-
- 使用 `-webkit-line-clamp: 2` 和 `-webkit-box-orient: vertical`
|
|
2002
|
-
|
|
2003
|
-
**测试类型:** 自动化测试 + 人工测试
|
|
2004
|
-
|
|
2005
|
-
---
|
|
2006
|
-
|
|
2007
|
-
#### 测试用例 2.9.4:文本对齐
|
|
2008
|
-
|
|
2009
|
-
**测试目的:** 验证文本对齐配置
|
|
2010
|
-
**测试步骤:**
|
|
2011
|
-
|
|
2012
|
-
1. 分别设置 `textConfig={{ textAlign: 'left' }}`、`'center'`、`'right'`
|
|
2013
|
-
2. 检查文本对齐方式
|
|
2014
|
-
|
|
2015
|
-
**期望结果:**
|
|
2016
|
-
|
|
2017
|
-
- 文本对齐方式正确对应设置的值
|
|
2018
|
-
|
|
2019
|
-
**测试类型:** 自动化测试 + 人工测试
|
|
2020
|
-
|
|
2021
|
-
---
|
|
2022
|
-
|
|
2023
|
-
### 2.10 宽度模式测试
|
|
2024
|
-
|
|
2025
|
-
#### 测试用例 2.10.1:自动宽度(auto)
|
|
2026
|
-
|
|
2027
|
-
**测试目的:** 验证自动宽度模式
|
|
2028
|
-
**测试步骤:**
|
|
2029
|
-
|
|
2030
|
-
1. 设置 `widthMode="auto"` 和 `maxWidth={300}`
|
|
2031
|
-
2. 检查宽度设置
|
|
2032
|
-
|
|
2033
|
-
**期望结果:**
|
|
2034
|
-
|
|
2035
|
-
- width 为 'auto'
|
|
2036
|
-
- maxWidth 为 300px
|
|
2037
|
-
- 内容超出最大宽度时显示省略号
|
|
2038
|
-
|
|
2039
|
-
**测试类型:** 自动化测试 + 人工测试
|
|
2040
|
-
|
|
2041
|
-
---
|
|
2042
|
-
|
|
2043
|
-
#### 测试用例 2.10.2:固定宽度(fixed)
|
|
2044
|
-
|
|
2045
|
-
**测试目的:** 验证固定宽度模式
|
|
2046
|
-
**测试步骤:**
|
|
2047
|
-
|
|
2048
|
-
1. 设置 `widthMode="fixed"` 和 `width={200}`
|
|
2049
|
-
2. 检查宽度设置
|
|
2050
|
-
|
|
2051
|
-
**期望结果:**
|
|
2052
|
-
|
|
2053
|
-
- width 为 200px
|
|
2054
|
-
- 宽度固定不变
|
|
2055
|
-
|
|
2056
|
-
**测试类型:** 自动化测试 + 人工测试
|
|
2057
|
-
|
|
2058
|
-
---
|
|
2059
|
-
|
|
2060
|
-
#### 测试用例 2.10.3:撑满容器(full)
|
|
2061
|
-
|
|
2062
|
-
**测试目的:** 验证撑满容器宽度模式
|
|
2063
|
-
**测试步骤:**
|
|
2064
|
-
|
|
2065
|
-
1. 设置 `widthMode="full"`
|
|
2066
|
-
2. 检查宽度设置
|
|
2067
|
-
|
|
2068
|
-
**期望结果:**
|
|
2069
|
-
|
|
2070
|
-
- width 为 '100%'
|
|
2071
|
-
- minWidth 为 28px
|
|
2072
|
-
|
|
2073
|
-
**测试类型:** 自动化测试 + 人工测试
|
|
2074
|
-
|
|
2075
|
-
---
|
|
2076
|
-
|
|
2077
|
-
### 2.11 自适应规则测试
|
|
2078
|
-
|
|
2079
|
-
#### 测试用例 2.11.1:宽度自适应规则
|
|
2080
|
-
|
|
2081
|
-
**测试目的:** 验证宽度自适应规则
|
|
2082
|
-
**测试步骤:**
|
|
2083
|
-
|
|
2084
|
-
1. 默认宽度模式(auto),检查最大宽度限制
|
|
2085
|
-
2. 设置超长文本,检查是否显示省略号
|
|
2086
|
-
3. 设置 `widthMode="full"`,检查最小宽度限制
|
|
2087
|
-
|
|
2088
|
-
**期望结果:**
|
|
2089
|
-
|
|
2090
|
-
- 默认最大宽度为 400px
|
|
2091
|
-
- 超过最大宽度时,文本区域显示省略号
|
|
2092
|
-
- full 模式下最小宽度为 28px
|
|
2093
|
-
|
|
2094
|
-
**测试类型:** 人工测试
|
|
2095
|
-
|
|
2096
|
-
---
|
|
2097
|
-
|
|
2098
|
-
#### 测试用例 2.11.2:水平对齐规则
|
|
2099
|
-
|
|
2100
|
-
**测试目的:** 验证水平排列时的对齐规则
|
|
2101
|
-
**测试步骤:**
|
|
2102
|
-
|
|
2103
|
-
1. 多个 TextCard 水平排列
|
|
2104
|
-
2. 检查内容对齐方式
|
|
2105
|
-
|
|
2106
|
-
**期望结果:**
|
|
2107
|
-
|
|
2108
|
-
- 水平排列时,内容默认居中对齐
|
|
2109
|
-
|
|
2110
|
-
**测试类型:** 人工测试
|
|
2111
|
-
|
|
2112
|
-
---
|
|
2113
|
-
|
|
2114
|
-
#### 测试用例 2.11.3:垂直对齐规则
|
|
2115
|
-
|
|
2116
|
-
**测试目的:** 验证垂直排列时的对齐规则
|
|
2117
|
-
**测试步骤:**
|
|
2118
|
-
|
|
2119
|
-
1. 多个 TextCard 垂直排列
|
|
2120
|
-
2. 检查内容对齐方式
|
|
2121
|
-
|
|
2122
|
-
**期望结果:**
|
|
2123
|
-
|
|
2124
|
-
- 垂直排列时,内容默认左对齐
|
|
2125
|
-
|
|
2126
|
-
**测试类型:** 人工测试
|
|
2127
|
-
|
|
2128
|
-
---
|
|
2129
|
-
|
|
2130
|
-
### 2.12 交互行为测试
|
|
2131
|
-
|
|
2132
|
-
#### 测试用例 2.12.1:悬停交互
|
|
2133
|
-
|
|
2134
|
-
**测试目的:** 验证悬停状态的交互
|
|
2135
|
-
**测试步骤:**
|
|
2136
|
-
|
|
2137
|
-
1. 鼠标悬停在组件上
|
|
2138
|
-
2. 检查样式变化
|
|
2139
|
-
3. 检查指针样式
|
|
2140
|
-
|
|
2141
|
-
**期望结果:**
|
|
2142
|
-
|
|
2143
|
-
- 展示悬停状态样式(根据 variant 不同)
|
|
2144
|
-
- 指针变为手型(cursor: pointer)
|
|
2145
|
-
- 可点击状态下才显示手型
|
|
2146
|
-
|
|
2147
|
-
**测试类型:** 人工测试
|
|
24
|
+
### 测试方法
|
|
25
|
+
- 人工测试(UI 交互、视觉验证)
|
|
26
|
+
- 自动化测试(单元测试、快照测试)
|
|
2148
27
|
|
|
2149
28
|
---
|
|
2150
29
|
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
**测试目的:** 验证点击事件的交互
|
|
2154
|
-
**测试步骤:**
|
|
30
|
+
## 二、基础功能测试用例
|
|
2155
31
|
|
|
2156
|
-
1
|
|
2157
|
-
2. 检查 onClick 回调是否触发
|
|
2158
|
-
3. 检查 active.onChange 是否触发(如果提供)
|
|
2159
|
-
4. 检查选中状态是否切换
|
|
32
|
+
### 2.1 组件渲染
|
|
2160
33
|
|
|
2161
|
-
|
|
34
|
+
| 测试点 | 测试步骤 | 预期结果 | 测试类型 |
|
|
35
|
+
|--------|---------|---------|---------|
|
|
36
|
+
| 基础渲染 | 使用必填 prop `text` 渲染组件 | 组件正常渲染,显示文本内容 | 自动化 |
|
|
37
|
+
| 空文本渲染 | text 设置为空字符串 | 组件正常渲染,不显示文本 | 自动化 |
|
|
38
|
+
| ReactNode 文本 | text 传入 JSX 元素 | 正确渲染 JSX 内容 | 自动化 |
|
|
2162
39
|
|
|
2163
|
-
|
|
2164
|
-
- 如果提供了 active.onChange 且未激活,触发 onChange(true)
|
|
2165
|
-
- 切换选中状态(如果使用受控模式)
|
|
40
|
+
### 2.2 文本内容
|
|
2166
41
|
|
|
2167
|
-
|
|
42
|
+
| 测试点 | 测试步骤 | 预期结果 | 测试类型 |
|
|
43
|
+
|--------|---------|---------|---------|
|
|
44
|
+
| 文本显示 | 设置 text="Tab title" | 正确显示文本内容 | 人工 |
|
|
45
|
+
| 长文本省略(单行) | 设置超长文本,maxLines=1 | 文本超出显示省略号 | 人工 |
|
|
46
|
+
| 长文本省略(多行) | 设置超长文本,maxLines=2 | 文本超出 2 行显示省略号 | 人工 |
|
|
47
|
+
| 禁用省略 | ellipsis=false | 文本不显示省略号,完整显示 | 人工 |
|
|
2168
48
|
|
|
2169
49
|
---
|
|
2170
50
|
|
|
2171
|
-
|
|
51
|
+
## 三、样式变体测试用例
|
|
2172
52
|
|
|
2173
|
-
|
|
2174
|
-
**测试步骤:**
|
|
53
|
+
### 3.1 样式 1 - 纯文本 (text)
|
|
2175
54
|
|
|
2176
|
-
|
|
2177
|
-
|
|
55
|
+
| 测试点 | 测试步骤 | 预期结果 | 测试类型 |
|
|
56
|
+
|--------|---------|---------|---------|
|
|
57
|
+
| 默认样式 | variant="text" | 无背景,无边框,无 padding | 人工 |
|
|
58
|
+
| Active 状态 | variant="text" + active.value=true | 文本颜色变为主题色,字体加粗 | 人工 |
|
|
59
|
+
| Hover 状态 | variant="text" + 鼠标悬停 | 文本颜色变为浅紫色 | 人工 |
|
|
60
|
+
| Disabled 状态 | variant="text" + disabled.value=true | 文本半透明,颜色变灰 | 人工 |
|
|
2178
61
|
|
|
2179
|
-
|
|
62
|
+
### 3.2 样式 2 - 圆角背景 (filled)
|
|
2180
63
|
|
|
2181
|
-
|
|
64
|
+
| 测试点 | 测试步骤 | 预期结果 | 测试类型 |
|
|
65
|
+
|--------|---------|---------|---------|
|
|
66
|
+
| 默认样式 | variant="filled" | 无背景,有 padding,圆角 40px | 人工 |
|
|
67
|
+
| Active 状态 | variant="filled" + active.value=true | 主题色背景,白色文字 | 人工 |
|
|
68
|
+
| Hover 状态 | variant="filled" + 鼠标悬停 | 灰色背景 #F2F4F7 | 人工 |
|
|
69
|
+
| 圆角效果 | variant="filled" | 边框圆角为 40px(胶囊形) | 人工 |
|
|
2182
70
|
|
|
2183
|
-
|
|
71
|
+
### 3.3 样式 3 - 浅色背景 (light)
|
|
2184
72
|
|
|
2185
|
-
|
|
73
|
+
| 测试点 | 测试步骤 | 预期结果 | 测试类型 |
|
|
74
|
+
|--------|---------|---------|---------|
|
|
75
|
+
| 默认样式 | variant="light" | 无背景,深灰文字 #475467 | 人工 |
|
|
76
|
+
| Active 状态 | variant="light" + active.value=true | 浅紫背景,主题色文字,字体加粗 | 人工 |
|
|
77
|
+
| Hover 状态 | variant="light" + 鼠标悬停 | 灰色背景 #F2F4F7 | 人工 |
|
|
2186
78
|
|
|
2187
|
-
|
|
79
|
+
### 3.4 样式 4 - 描边 (outlined)
|
|
2188
80
|
|
|
2189
|
-
|
|
2190
|
-
|
|
81
|
+
| 测试点 | 测试步骤 | 预期结果 | 测试类型 |
|
|
82
|
+
|--------|---------|---------|---------|
|
|
83
|
+
| 默认样式 | variant="outlined" | 灰色边框,无背景 | 人工 |
|
|
84
|
+
| Active 状态 | variant="outlined" + active.value=true | 主题色边框,主题色文字 | 人工 |
|
|
85
|
+
| Hover 状态 | variant="outlined" + 鼠标悬停 | 边框颜色变浅紫 | 人工 |
|
|
2191
86
|
|
|
2192
|
-
|
|
2193
|
-
2. 尝试点击组件
|
|
2194
|
-
3. 尝试键盘导航
|
|
87
|
+
### 3.5 样式 5 - 渐变 (gradient)
|
|
2195
88
|
|
|
2196
|
-
|
|
89
|
+
| 测试点 | 测试步骤 | 预期结果 | 测试类型 |
|
|
90
|
+
|--------|---------|---------|---------|
|
|
91
|
+
| 默认样式 | variant="gradient" | 无背景 | 人工 |
|
|
92
|
+
| Active 状态 | variant="gradient" + active.value=true | 渐变背景(紫色),白色文字 | 人工 |
|
|
93
|
+
| 渐变方向 | variant="gradient" + active | 渐变方向为 135deg | 人工 |
|
|
2197
94
|
|
|
2198
|
-
-
|
|
2199
|
-
- 无法键盘聚焦(tabIndex=-1)
|
|
2200
|
-
- 指针变为 not-allowed
|
|
95
|
+
### 3.6 样式 6 - 虚线 (dashed)
|
|
2201
96
|
|
|
2202
|
-
|
|
97
|
+
| 测试点 | 测试步骤 | 预期结果 | 测试类型 |
|
|
98
|
+
|--------|---------|---------|---------|
|
|
99
|
+
| 默认样式 | variant="dashed" | 灰色虚线边框 | 人工 |
|
|
100
|
+
| Active 状态 | variant="dashed" + active.value=true | 主题色虚线边框,浅紫背景 | 人工 |
|
|
101
|
+
| Hover 状态 | variant="dashed" + 鼠标悬停 | 边框颜色变浅紫 | 人工 |
|
|
2203
102
|
|
|
2204
103
|
---
|
|
2205
104
|
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
**测试目的:** 验证加载状态下的交互限制
|
|
2209
|
-
**测试步骤:**
|
|
105
|
+
## 四、尺寸测试用例
|
|
2210
106
|
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
- 指针变为 wait
|
|
2218
|
-
|
|
2219
|
-
**测试类型:** 自动化测试 + 人工测试
|
|
107
|
+
| 测试点 | 测试步骤 | 预期结果 | 测试类型 |
|
|
108
|
+
|--------|---------|---------|---------|
|
|
109
|
+
| Small 尺寸 | size="small" | padding: 8px 12px, fontSize: 14px, gap: 8px, borderRadius: 4px | 人工 |
|
|
110
|
+
| Default 尺寸 | size="default" | padding: 12px 16px, fontSize: 14px, gap: 12px, borderRadius: 6px | 人工 |
|
|
111
|
+
| Large 尺寸 | size="large" | padding: 16px 20px, fontSize: 16px, gap: 16px, borderRadius: 8px | 人工 |
|
|
112
|
+
| 尺寸切换 | 动态切换 size | 样式平滑过渡 | 人工 |
|
|
2220
113
|
|
|
2221
114
|
---
|
|
2222
115
|
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
**测试目的:** 验证 clickable=false 时的交互
|
|
2226
|
-
**测试步骤:**
|
|
116
|
+
## 五、状态测试用例
|
|
2227
117
|
|
|
2228
|
-
1
|
|
2229
|
-
2. 尝试点击组件
|
|
2230
|
-
3. 检查指针样式
|
|
118
|
+
### 5.1 Active 状态
|
|
2231
119
|
|
|
2232
|
-
|
|
120
|
+
| 测试点 | 测试步骤 | 预期结果 | 测试类型 |
|
|
121
|
+
|--------|---------|---------|---------|
|
|
122
|
+
| Active 样式 | active.value=true | 应用 active 样式(根据 variant 不同) | 人工 |
|
|
123
|
+
| Active 类名 | active.className="custom-active" | 添加自定义类名 | 自动化 |
|
|
124
|
+
| Active 样式覆盖 | active.style={color: 'red'} | 自定义样式生效 | 人工 |
|
|
125
|
+
| Active onChange | 点击组件触发 active.onChange | onChange 回调被调用,参数为 true | 自动化 |
|
|
126
|
+
| Active extra | active.extra=<Icon /> | 渲染 extra 内容 | 人工 |
|
|
2233
127
|
|
|
2234
|
-
|
|
2235
|
-
- 指针为默认样式(不是手型)
|
|
2236
|
-
- 不添加 `text-card--clickable` 类名
|
|
128
|
+
### 5.2 Disabled 状态
|
|
2237
129
|
|
|
2238
|
-
|
|
130
|
+
| 测试点 | 测试步骤 | 预期结果 | 测试类型 |
|
|
131
|
+
|--------|---------|---------|---------|
|
|
132
|
+
| Disabled 样式 | disabled.value=true | 透明度 0.4,颜色变灰,cursor: not-allowed | 人工 |
|
|
133
|
+
| Disabled 点击 | disabled.value=true + 点击 | 点击事件不触发 | 自动化 |
|
|
134
|
+
| Disabled tabIndex | disabled.value=true | tabIndex=-1,无法键盘聚焦 | 人工 |
|
|
135
|
+
| Disabled extra | disabled.extra=<span>禁用</span> | 渲染 extra 内容 | 人工 |
|
|
2239
136
|
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
### 2.13 自定义渲染测试
|
|
2243
|
-
|
|
2244
|
-
#### 测试用例 2.13.1:自定义渲染函数
|
|
2245
|
-
|
|
2246
|
-
**测试目的:** 验证自定义渲染函数功能
|
|
2247
|
-
**测试步骤:**
|
|
137
|
+
### 5.3 Loading 状态
|
|
2248
138
|
|
|
2249
|
-
|
|
2250
|
-
|
|
139
|
+
| 测试点 | 测试步骤 | 预期结果 | 测试类型 |
|
|
140
|
+
|--------|---------|---------|---------|
|
|
141
|
+
| Loading 样式 | loading.value=true | 透明度 0.6,cursor: wait | 人工 |
|
|
142
|
+
| Loading 点击 | loading.value=true + 点击 | 点击事件不触发 | 自动化 |
|
|
143
|
+
| Loading extra | loading.extra=<Spin /> | 渲染加载图标 | 人工 |
|
|
2251
144
|
|
|
2252
|
-
|
|
145
|
+
### 5.4 状态优先级
|
|
2253
146
|
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
147
|
+
| 测试点 | 测试步骤 | 预期结果 | 测试类型 |
|
|
148
|
+
|--------|---------|---------|---------|
|
|
149
|
+
| Loading > Disabled | loading=true + disabled=true | 显示 loading 状态 | 自动化 |
|
|
150
|
+
| Loading > Active | loading=true + active=true | 显示 loading 状态 | 自动化 |
|
|
151
|
+
| Disabled > Active | disabled=true + active=true | 显示 disabled 状态 | 自动化 |
|
|
2259
152
|
|
|
2260
153
|
---
|
|
2261
154
|
|
|
2262
|
-
|
|
155
|
+
## 六、图标测试用例
|
|
2263
156
|
|
|
2264
|
-
|
|
157
|
+
### 6.1 前置图标
|
|
2265
158
|
|
|
2266
|
-
|
|
2267
|
-
|
|
159
|
+
| 测试点 | 测试步骤 | 预期结果 | 测试类型 |
|
|
160
|
+
|--------|---------|---------|---------|
|
|
161
|
+
| 图标渲染 | prefixIcon=<BellIcon /> | 图标显示在文本前面 | 人工 |
|
|
162
|
+
| 图标大小 | iconConfig.size=20 | 图标大小为 20px | 人工 |
|
|
163
|
+
| 图标颜色 | iconConfig.color="#ff0000" | 图标颜色为红色 | 人工 |
|
|
164
|
+
| 无图标 | 不传 prefixIcon | 不显示前置图标 | 自动化 |
|
|
2268
165
|
|
|
2269
|
-
|
|
166
|
+
### 6.2 后置图标
|
|
2270
167
|
|
|
2271
|
-
|
|
168
|
+
| 测试点 | 测试步骤 | 预期结果 | 测试类型 |
|
|
169
|
+
|--------|---------|---------|---------|
|
|
170
|
+
| 图标渲染 | suffixIcon=<ChevronIcon /> | 图标显示在文本后面 | 人工 |
|
|
171
|
+
| 图标大小 | iconConfig.size=16 | 前后图标大小统一为 16px | 人工 |
|
|
172
|
+
| 无图标 | 不传 suffixIcon | 不显示后置图标 | 自动化 |
|
|
2272
173
|
|
|
2273
|
-
|
|
174
|
+
### 6.3 前后图标组合
|
|
2274
175
|
|
|
2275
|
-
|
|
176
|
+
| 测试点 | 测试步骤 | 预期结果 | 测试类型 |
|
|
177
|
+
|--------|---------|---------|---------|
|
|
178
|
+
| 同时显示 | prefixIcon + suffixIcon | 前后图标都正常显示 | 人工 |
|
|
179
|
+
| 间距正确 | 前后图标 + 文本 | 间距根据 size 正确设置 | 人工 |
|
|
2276
180
|
|
|
2277
181
|
---
|
|
2278
182
|
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
**测试目的:** 验证 aria-disabled 属性设置
|
|
2282
|
-
**测试步骤:**
|
|
2283
|
-
|
|
2284
|
-
1. 设置 `disabled={{ value: true }}`
|
|
2285
|
-
2. 检查 aria-disabled 属性
|
|
2286
|
-
|
|
2287
|
-
**期望结果:**
|
|
183
|
+
## 七、标签测试用例
|
|
2288
184
|
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
185
|
+
| 测试点 | 测试步骤 | 预期结果 | 测试类型 |
|
|
186
|
+
|--------|---------|---------|---------|
|
|
187
|
+
| 标签渲染 | tag=<Tag>标签</Tag> | 标签显示在后置位置 | 人工 |
|
|
188
|
+
| 标签样式 | tagConfig.style={marginLeft: 8} | 自定义样式生效 | 人工 |
|
|
189
|
+
| 标签+后置图标 | tag + suffixIcon | 标签在前,图标在后 | 人工 |
|
|
190
|
+
| 无标签 | 不传 tag | 不显示标签 | 自动化 |
|
|
2292
191
|
|
|
2293
192
|
---
|
|
2294
193
|
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
**测试目的:** 验证 tabIndex 属性设置
|
|
2298
|
-
**测试步骤:**
|
|
2299
|
-
|
|
2300
|
-
1. 正常状态下检查 tabIndex
|
|
2301
|
-
2. disabled 状态下检查 tabIndex
|
|
2302
|
-
|
|
2303
|
-
**期望结果:**
|
|
194
|
+
## 八、角标测试用例
|
|
2304
195
|
|
|
2305
|
-
|
|
2306
|
-
- disabled 状态:tabIndex=-1
|
|
196
|
+
### 8.1 红点角标
|
|
2307
197
|
|
|
2308
|
-
|
|
198
|
+
| 测试点 | 测试步骤 | 预期结果 | 测试类型 |
|
|
199
|
+
|--------|---------|---------|---------|
|
|
200
|
+
| 红点显示 | badge.type="dot" | 显示红点角标 | 人工 |
|
|
201
|
+
| 红点位置 | badge.position="top-right" | 角标在右上角 | 人工 |
|
|
202
|
+
| 红点颜色 | badge.color="blue" | 角标颜色为蓝色 | 人工 |
|
|
203
|
+
| 红点偏移 | badge.offset=[5, 5] | 角标偏移 5px | 人工 |
|
|
2309
204
|
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
#### 测试用例 2.14.4:键盘导航
|
|
205
|
+
### 8.2 数字角标
|
|
2313
206
|
|
|
2314
|
-
|
|
2315
|
-
|
|
207
|
+
| 测试点 | 测试步骤 | 预期结果 | 测试类型 |
|
|
208
|
+
|--------|---------|---------|---------|
|
|
209
|
+
| 数字显示 | badge.type="number", content=99 | 显示数字 99 | 人工 |
|
|
210
|
+
| 大数字 | badge.content=999 | 正确显示大数字 | 人工 |
|
|
211
|
+
| 零显示 | badge.content=0 | 显示 0 | 人工 |
|
|
2316
212
|
|
|
2317
|
-
|
|
2318
|
-
2. 使用 Enter/Space 键触发点击
|
|
213
|
+
### 8.3 文本角标
|
|
2319
214
|
|
|
2320
|
-
|
|
215
|
+
| 测试点 | 测试步骤 | 预期结果 | 测试类型 |
|
|
216
|
+
|--------|---------|---------|---------|
|
|
217
|
+
| 文本显示 | badge.type="text", content="New" | 显示文本 "New" | 人工 |
|
|
218
|
+
| 长文本 | badge.content="Very Long Text" | 文本正常显示 | 人工 |
|
|
2321
219
|
|
|
2322
|
-
|
|
2323
|
-
- 焦点状态清晰
|
|
2324
|
-
- 可以键盘触发点击
|
|
220
|
+
### 8.4 角标位置
|
|
2325
221
|
|
|
2326
|
-
|
|
222
|
+
| 测试点 | 测试步骤 | 预期结果 | 测试类型 |
|
|
223
|
+
|--------|---------|---------|---------|
|
|
224
|
+
| 右上角 | badge.position="top-right" | 角标在右上角 | 人工 |
|
|
225
|
+
| 左上角 | badge.position="top-left" | 角标在左上角 | 人工 |
|
|
226
|
+
| 右下角 | badge.position="bottom-right" | 角标在右下角 | 人工 |
|
|
227
|
+
| 左下角 | badge.position="bottom-left" | 角标在左下角 | 人工 |
|
|
2327
228
|
|
|
2328
229
|
---
|
|
2329
230
|
|
|
2330
|
-
##
|
|
2331
|
-
|
|
2332
|
-
### 测试用例 3.1:空文本
|
|
2333
|
-
|
|
2334
|
-
**测试目的:** 验证空文本时的表现
|
|
2335
|
-
**测试步骤:**
|
|
231
|
+
## 九、插槽测试用例
|
|
2336
232
|
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
- 不报错
|
|
2343
|
-
- 组件正常渲染
|
|
2344
|
-
|
|
2345
|
-
**测试类型:** 自动化测试
|
|
233
|
+
| 测试点 | 测试步骤 | 预期结果 | 测试类型 |
|
|
234
|
+
|--------|---------|---------|---------|
|
|
235
|
+
| 前置插槽 | prefixSlot=<div>Custom</div> | 显示自定义前置内容,替换 prefixIcon | 人工 |
|
|
236
|
+
| 后置插槽 | suffixSlot=<div>Custom</div> | 显示自定义后置内容,替换 tag 和 suffixIcon | 人工 |
|
|
237
|
+
| 插槽优先级 | prefixSlot + prefixIcon | prefixSlot 优先显示 | 自动化 |
|
|
2346
238
|
|
|
2347
239
|
---
|
|
2348
240
|
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
**测试目的:** 验证超长文本时的表现
|
|
2352
|
-
**测试步骤:**
|
|
241
|
+
## 十、文本配置测试用例
|
|
2353
242
|
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
**测试类型:** 人工测试
|
|
243
|
+
| 测试点 | 测试步骤 | 预期结果 | 测试类型 |
|
|
244
|
+
|--------|---------|---------|---------|
|
|
245
|
+
| 字体大小 | textConfig.fontSize=18 | 文本字体大小为 18px | 人工 |
|
|
246
|
+
| 字体粗细 | textConfig.fontWeight="bold" | 文本加粗 | 人工 |
|
|
247
|
+
| 文本颜色 | textConfig.color="#ff0000" | 文本颜色为红色 | 人工 |
|
|
248
|
+
| 最大行数 | textConfig.maxLines=2 | 文本最多显示 2 行 | 人工 |
|
|
249
|
+
| 禁用省略 | textConfig.ellipsis=false | 不显示省略号 | 人工 |
|
|
2363
250
|
|
|
2364
251
|
---
|
|
2365
252
|
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
**测试目的:** 验证特殊字符的处理
|
|
2369
|
-
**测试步骤:**
|
|
253
|
+
## 十一、宽度模式测试用例
|
|
2370
254
|
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
**测试类型:** 自动化测试 + 人工测试
|
|
255
|
+
| 测试点 | 测试步骤 | 预期结果 | 测试类型 |
|
|
256
|
+
|--------|---------|---------|---------|
|
|
257
|
+
| 自动宽度 | widthMode="auto" | 宽度跟随内容,最大 400px | 人工 |
|
|
258
|
+
| 固定宽度 | widthMode="fixed", width=200 | 宽度固定为 200px | 人工 |
|
|
259
|
+
| 撑满容器 | widthMode="full" | 宽度 100%,最小 28px | 人工 |
|
|
260
|
+
| 最大宽度 | widthMode="auto", maxWidth=300 | 最大宽度为 300px | 人工 |
|
|
261
|
+
| 超长文本 | widthMode="auto" + 超长文本 | 达到最大宽度后显示省略号 | 人工 |
|
|
2380
262
|
|
|
2381
263
|
---
|
|
2382
264
|
|
|
2383
|
-
|
|
2384
|
-
|
|
2385
|
-
**测试目的:** 验证所有 props 同时使用时的表现
|
|
2386
|
-
**测试步骤:**
|
|
265
|
+
## 十二、事件测试用例
|
|
2387
266
|
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
- 优先级正确(插槽 > 图标/标签,loading > disabled > active)
|
|
2396
|
-
|
|
2397
|
-
**测试类型:** 人工测试
|
|
267
|
+
| 测试点 | 测试步骤 | 预期结果 | 测试类型 |
|
|
268
|
+
|--------|---------|---------|---------|
|
|
269
|
+
| onClick 触发 | clickable=true + 点击 | onClick 回调被调用 | 自动化 |
|
|
270
|
+
| onClick 参数 | 点击后检查回调参数 | 参数为 event 对象 | 自动化 |
|
|
271
|
+
| 不可点击 | clickable=false + 点击 | onClick 不触发 | 自动化 |
|
|
272
|
+
| Disabled 不触发 | disabled.value=true + 点击 | onClick 不触发 | 自动化 |
|
|
273
|
+
| Loading 不触发 | loading.value=true + 点击 | onClick 不触发 | 自动化 |
|
|
2398
274
|
|
|
2399
275
|
---
|
|
2400
276
|
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
**测试目的:** 验证快速切换状态时的表现
|
|
2404
|
-
**测试步骤:**
|
|
277
|
+
## 十三、可访问性测试用例
|
|
2405
278
|
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
- 样式正确应用
|
|
2414
|
-
|
|
2415
|
-
**测试类型:** 自动化测试
|
|
279
|
+
| 测试点 | 测试步骤 | 预期结果 | 测试类型 |
|
|
280
|
+
|--------|---------|---------|---------|
|
|
281
|
+
| role 属性 | 检查 DOM | role="button" | 自动化 |
|
|
282
|
+
| aria-disabled | disabled.value=true | aria-disabled="true" | 自动化 |
|
|
283
|
+
| tabIndex | 正常状态 | tabIndex=0 | 自动化 |
|
|
284
|
+
| tabIndex disabled | disabled.value=true | tabIndex=-1 | 自动化 |
|
|
285
|
+
| 键盘导航 | Tab 键聚焦 | 组件可聚焦 | 人工 |
|
|
2416
286
|
|
|
2417
287
|
---
|
|
2418
288
|
|
|
2419
|
-
##
|
|
2420
|
-
|
|
2421
|
-
### 测试用例 4.1:不同浏览器测试
|
|
2422
|
-
|
|
2423
|
-
**测试目的:** 验证在不同浏览器中的兼容性
|
|
2424
|
-
**测试范围:**
|
|
2425
|
-
|
|
2426
|
-
- Chrome(最新版本)
|
|
2427
|
-
- Firefox(最新版本)
|
|
2428
|
-
- Safari(最新版本)
|
|
2429
|
-
- Edge(最新版本)
|
|
2430
|
-
|
|
2431
|
-
**期望结果:**
|
|
2432
|
-
|
|
2433
|
-
- 所有浏览器中显示一致
|
|
2434
|
-
- 功能正常
|
|
2435
|
-
- 样式正确
|
|
289
|
+
## 十四、自定义渲染测试用例
|
|
2436
290
|
|
|
2437
|
-
|
|
291
|
+
| 测试点 | 测试步骤 | 预期结果 | 测试类型 |
|
|
292
|
+
|--------|---------|---------|---------|
|
|
293
|
+
| render 函数 | render={(props) => <div>{props.text}</div>} | 使用自定义渲染 | 人工 |
|
|
294
|
+
| render 优先级 | render 函数存在 | 忽略其他内容配置 | 自动化 |
|
|
2438
295
|
|
|
2439
296
|
---
|
|
2440
297
|
|
|
2441
|
-
|
|
298
|
+
## 十五、边界情况测试用例
|
|
2442
299
|
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
**期望结果:**
|
|
2452
|
-
|
|
2453
|
-
- 响应式布局正常
|
|
2454
|
-
- 触摸交互流畅
|
|
2455
|
-
- 布局在不同尺寸下正确显示
|
|
2456
|
-
|
|
2457
|
-
**测试类型:** 人工测试
|
|
300
|
+
| 测试点 | 测试步骤 | 预期结果 | 测试类型 |
|
|
301
|
+
|--------|---------|---------|---------|
|
|
302
|
+
| 空文本 | text="" | 正常渲染,不报错 | 自动化 |
|
|
303
|
+
| 超长文本 | text="很长很长的文本..." | 正确显示省略号 | 人工 |
|
|
304
|
+
| 特殊字符 | text="<>&\"'" | 特殊字符正确转义显示 | 人工 |
|
|
305
|
+
| 无 Props | 仅传 text | 使用所有默认值正常渲染 | 自动化 |
|
|
306
|
+
| 所有 Props | 传入所有 props | 正常渲染,不冲突 | 人工 |
|
|
2458
307
|
|
|
2459
308
|
---
|
|
2460
309
|
|
|
2461
|
-
##
|
|
2462
|
-
|
|
2463
|
-
### 测试用例 5.1:渲染性能
|
|
2464
|
-
|
|
2465
|
-
**测试目的:** 验证组件渲染性能
|
|
2466
|
-
**测试步骤:**
|
|
2467
|
-
|
|
2468
|
-
1. 渲染包含 100 个 TextCard 的列表
|
|
2469
|
-
2. 测量首次渲染时间
|
|
2470
|
-
3. 测量重新渲染时间
|
|
2471
|
-
|
|
2472
|
-
**期望结果:**
|
|
310
|
+
## 十六、性能测试用例
|
|
2473
311
|
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
|
|
312
|
+
| 测试点 | 测试步骤 | 预期结果 | 测试类型 |
|
|
313
|
+
|--------|---------|---------|---------|
|
|
314
|
+
| 多次渲染 | 快速切换 props | 无性能问题,渲染流畅 | 人工 |
|
|
315
|
+
| 大量实例 | 渲染 100 个组件 | 页面不卡顿 | 人工 |
|
|
316
|
+
| 内存泄漏 | 挂载/卸载多次 | 无内存泄漏 | 自动化 |
|
|
2478
317
|
|
|
2479
318
|
---
|
|
2480
319
|
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
**测试目的:** 验证组件内存占用
|
|
2484
|
-
**测试步骤:**
|
|
2485
|
-
|
|
2486
|
-
1. 渲染和销毁组件多次
|
|
2487
|
-
2. 监测内存变化
|
|
2488
|
-
|
|
2489
|
-
**期望结果:**
|
|
320
|
+
## 十七、兼容性测试用例
|
|
2490
321
|
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
|
|
322
|
+
| 测试点 | 测试步骤 | 预期结果 | 测试类型 |
|
|
323
|
+
|--------|---------|---------|---------|
|
|
324
|
+
| Chrome | 在 Chrome 浏览器测试 | 所有功能正常 | 人工 |
|
|
325
|
+
| Firefox | 在 Firefox 浏览器测试 | 所有功能正常 | 人工 |
|
|
326
|
+
| Safari | 在 Safari 浏览器测试 | 所有功能正常 | 人工 |
|
|
327
|
+
| Edge | 在 Edge 浏览器测试 | 所有功能正常 | 人工 |
|
|
2495
328
|
|
|
2496
329
|
---
|
|
2497
330
|
|
|
2498
|
-
|
|
331
|
+
## 十八、Bug 汇总
|
|
2499
332
|
|
|
2500
|
-
|
|
2501
|
-
**测试步骤:**
|
|
333
|
+
**说明**:此部分由人工测试人员填写发现的 Bug
|
|
2502
334
|
|
|
2503
|
-
|
|
2504
|
-
2. 检查页面是否卡顿
|
|
2505
|
-
3. 检查交互是否流畅
|
|
335
|
+
### Bug 列表
|
|
2506
336
|
|
|
2507
|
-
|
|
337
|
+
| Bug ID | 发现时间 | Bug 描述 | 优先级 | 状态 | 修复时间 | 备注 |
|
|
338
|
+
|--------|---------|---------|--------|------|---------|------|
|
|
339
|
+
| - | - | - | - | - | - | - |
|
|
2508
340
|
|
|
2509
|
-
|
|
2510
|
-
- 交互流畅
|
|
2511
|
-
- 无性能问题
|
|
341
|
+
### Bug 模板
|
|
2512
342
|
|
|
2513
|
-
|
|
343
|
+
```
|
|
344
|
+
Bug ID: #001
|
|
345
|
+
发现时间: 2024-01-01
|
|
346
|
+
Bug 描述: [详细描述问题]
|
|
347
|
+
复现步骤:
|
|
348
|
+
1. [步骤1]
|
|
349
|
+
2. [步骤2]
|
|
350
|
+
3. [步骤3]
|
|
351
|
+
预期结果: [应该显示什么]
|
|
352
|
+
实际结果: [实际显示什么]
|
|
353
|
+
优先级: P0/P1/P2/P3
|
|
354
|
+
状态: 待修复/修复中/已修复/已验证
|
|
355
|
+
修复时间:
|
|
356
|
+
修复说明:
|
|
357
|
+
```
|
|
2514
358
|
|
|
2515
359
|
---
|
|
2516
360
|
|
|
2517
|
-
##
|
|
2518
|
-
|
|
2519
|
-
### 6.1 测试用例统计
|
|
2520
|
-
|
|
2521
|
-
- **总用例数**:150+
|
|
2522
|
-
- **自动化测试**:80+
|
|
2523
|
-
- **人工测试**:70+
|
|
2524
|
-
- **性能测试**:3
|
|
2525
|
-
- **兼容性测试**:2
|
|
2526
|
-
|
|
2527
|
-
### 6.2 测试优先级
|
|
361
|
+
## 十九、测试总结
|
|
2528
362
|
|
|
2529
|
-
|
|
2530
|
-
- **P1(中优先级)**:图标、标签、角标、插槽、文本配置、宽度模式
|
|
2531
|
-
- **P2(低优先级)**:边界条件、性能测试、可访问性、自定义渲染
|
|
363
|
+
### 测试统计
|
|
2532
364
|
|
|
2533
|
-
|
|
365
|
+
- **总测试用例数**: 120+
|
|
366
|
+
- **自动化测试用例**: 30+
|
|
367
|
+
- **人工测试用例**: 90+
|
|
368
|
+
- **覆盖率目标**: 90%+
|
|
2534
369
|
|
|
2535
|
-
|
|
2536
|
-
- 分支覆盖率:≥ 80%
|
|
2537
|
-
- 函数覆盖率:≥ 85%
|
|
2538
|
-
- 行覆盖率:≥ 85%
|
|
2539
|
-
- 功能覆盖率:100%
|
|
370
|
+
### 测试结论
|
|
2540
371
|
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
### 7.1 自动化测试
|
|
2544
|
-
|
|
2545
|
-
- 使用 Vitest + React Testing Library
|
|
2546
|
-
- 每次代码提交前自动运行
|
|
2547
|
-
- CI/CD 集成
|
|
2548
|
-
|
|
2549
|
-
### 7.2 人工测试
|
|
372
|
+
测试完成后填写:
|
|
2550
373
|
|
|
2551
|
-
-
|
|
2552
|
-
-
|
|
2553
|
-
-
|
|
374
|
+
- [ ] 所有测试用例通过
|
|
375
|
+
- [ ] 发现 Bug 已修复
|
|
376
|
+
- [ ] 组件可以发布
|
|
2554
377
|
|
|
2555
|
-
###
|
|
378
|
+
### 测试签名
|
|
2556
379
|
|
|
2557
|
-
-
|
|
2558
|
-
-
|
|
2559
|
-
-
|
|
380
|
+
- 测试人员: ___________
|
|
381
|
+
- 测试时间: ___________
|
|
382
|
+
- 审核人员: ___________
|
|
383
|
+
- 审核时间: ___________
|