File tree Expand file tree Collapse file tree 3 files changed +10
-5
lines changed
examples/sites/demos/pc/app/date-panel Expand file tree Collapse file tree 3 files changed +10
-5
lines changed Original file line number Diff line number Diff line change 11<template >
22 <div class =" demo-date-panel-wrap" >
3- <div >{{ value }}</div >
3+ <div class = " value " >{{ value }}</div >
44 <tiny-date-panel v-model =" value" :shortcuts =" shortcuts" ></tiny-date-panel >
55 </div >
66</template >
@@ -15,7 +15,6 @@ const shortcuts = [
1515 text: ' 今天' ,
1616 onClick (picker ) {
1717 const date = new Date ()
18- console .info (picker)
1918 picker .$emit (' pick' , date)
2019 }
2120 },
Original file line number Diff line number Diff line change 11import { test , expect } from '@playwright/test'
22
3- test ( '[DatePanel] 测试周次序号 ' , async ( { page } ) => {
3+ test ( '[DatePanel] 测试快捷选项 ' , async ( { page } ) => {
44 page . on ( 'pageerror' , ( exception ) => expect ( exception ) . toBeNull ( ) )
55 await page . goto ( 'date-panel#shortcuts' )
6+
7+ const valueDom = page . locator ( '.value' )
8+ await page . getByRole ( 'button' , { name : '今天' } ) . click ( )
9+ await page . getByRole ( 'button' , { name : '昨天' } ) . click ( )
10+ await page . getByRole ( 'button' , { name : '一周前' } ) . click ( )
11+
12+ await expect ( valueDom ) . not . toHaveText ( '' )
613} )
Original file line number Diff line number Diff line change 11<template >
22 <div class =" demo-date-panel-wrap" >
3- <div >{{ value }}</div >
3+ <div class = " value " >{{ value }}</div >
44 <tiny-date-panel v-model =" value" :shortcuts =" shortcuts" ></tiny-date-panel >
55 </div >
66</template >
@@ -15,7 +15,6 @@ const shortcuts = [
1515 text: ' 今天' ,
1616 onClick (picker ) {
1717 const date = new Date ()
18- console .info (picker)
1918 picker .$emit (' pick' , date)
2019 }
2120 },
You can’t perform that action at this time.
0 commit comments