File tree 2 files changed +4
-10
lines changed
examples/sites/demos/pc/app
2 files changed +4
-10
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ test('[DatePicker] 测试日期格式化', async ({ page }) => {
11
11
12
12
// time-format: 时间输入框中显示的格式
13
13
await page . locator ( '.tiny-date-editor input' ) . nth ( 1 ) . click ( )
14
- await page . getByRole ( 'row ' , { name : '21 22 23 24 25 26 27 ' } ) . getByText ( '24 ') . click ( )
14
+ await page . getByRole ( 'cell ' , { name : '24 ' } ) . locator ( 'span ') . click ( ) ;
15
15
await page . getByRole ( 'button' , { name : '确定' } ) . click ( )
16
16
await expect ( page . locator ( '.tiny-date-editor input' ) . nth ( 1 ) ) . toHaveValue ( '2023 年 05 月 24 日 08 时 00 分 00 秒' )
17
17
Original file line number Diff line number Diff line change @@ -40,15 +40,9 @@ test('时间格式化', async ({ page }) => {
40
40
await expect ( page . getByRole ( 'textbox' , { name : '19:30:00' } ) ) . toBeVisible ( )
41
41
42
42
// picker-options.format: 下拉框中显示的格式
43
- const timePickerHour = page
44
- . locator (
45
- 'div:nth-child(14) > .tiny-time-panel__content > .tiny-time-spinner > div > .tiny-scrollbar__wrap > .tiny-scrollbar__view > li:nth-child(19)'
46
- )
47
- . first ( )
48
- const timePickerMinute = page . locator (
49
- 'div:nth-child(14) > .tiny-time-panel__content > .tiny-time-spinner > div:nth-child(2) > .tiny-scrollbar__wrap > .tiny-scrollbar__view > li:nth-child(41)'
50
- )
51
- const timePickerSecond = page . locator ( '.of-hidden > div:nth-child(12) .tiny-scrollbar' ) . nth ( 2 )
43
+ const timePickerHour = page . getByRole ( 'list' ) . first ( )
44
+ const timePickerMinute = page . getByRole ( 'list' ) . nth ( 1 )
45
+ const timePickerSecond = page . getByRole ( 'list' ) . nth ( 2 )
52
46
await page . getByRole ( 'textbox' , { name : '18:40:00' } ) . click ( )
53
47
await page . waitForTimeout ( 200 )
54
48
await expect ( timePickerHour ) . toBeVisible ( )
You can’t perform that action at this time.
0 commit comments