@@ -10,28 +10,28 @@ test.describe('节点状态', () => {
1010
1111 // 默认状态
1212 await expect ( timelineItems . first ( ) ) . toHaveClass ( / p r o c e s s - w a i t / )
13- await expect ( timelineItems . first ( ) . locator ( '.icon' ) ) . toHaveCSS ( 'border-color' , 'rgb(87, 93, 108 )' )
14- await expect ( timelineItems . first ( ) . locator ( '.icon .number' ) ) . toHaveCSS ( 'color' , 'rgb(87, 93, 108 )' )
13+ await expect ( timelineItems . first ( ) . locator ( '.icon' ) ) . toHaveCSS ( 'border-color' , 'rgb(219, 219, 219 )' )
14+ await expect ( timelineItems . first ( ) . locator ( '.icon .number' ) ) . toHaveCSS ( 'color' , 'rgb(128, 128, 128 )' )
1515
1616 // 成功状态
1717 await expect ( timelineItems . nth ( 1 ) ) . toBeVisible ( )
18- await expect ( timelineItems . nth ( 1 ) . locator ( '.icon' ) ) . toHaveCSS ( 'border-color' , 'rgb(94, 124, 224 )' )
19- await expect ( timelineItems . nth ( 1 ) . locator ( '.icon .icon-yes' ) ) . toHaveCSS ( 'fill' , 'rgb(94, 124, 224 )' )
18+ await expect ( timelineItems . nth ( 1 ) . locator ( '.icon' ) ) . toHaveCSS ( 'border-color' , 'rgb(25, 25, 25 )' )
19+ await expect ( timelineItems . nth ( 1 ) . locator ( '.icon .icon-yes' ) ) . toHaveCSS ( 'fill' , 'rgb(25, 25, 25 )' )
2020
2121 // 警告状态
2222 await expect ( timelineItems . nth ( 2 ) . locator ( '.icon.icon-warning' ) ) . toBeVisible ( )
23- await expect ( timelineItems . nth ( 2 ) . locator ( '.icon' ) ) . toHaveCSS ( 'background-color' , 'rgb(250, 152, 65 )' )
23+ await expect ( timelineItems . nth ( 2 ) . locator ( '.icon' ) ) . toHaveCSS ( 'background-color' , 'rgb(255, 136, 0 )' )
2424 await expect ( timelineItems . nth ( 2 ) . locator ( '.icon .icon-warning' ) ) . toHaveCSS ( 'fill' , 'rgb(255, 255, 255)' )
2525
2626 // 异常状态
2727 await expect ( timelineItems . nth ( 3 ) . locator ( '.icon' ) ) . toBeVisible ( )
28- await expect ( timelineItems . nth ( 3 ) . locator ( '.icon' ) ) . toHaveCSS ( 'border-color' , 'rgb(246, 111, 106 )' )
29- await expect ( timelineItems . nth ( 3 ) . locator ( '.icon .icon-error' ) ) . toHaveCSS ( 'fill' , 'rgb(222, 80, 78 )' )
28+ await expect ( timelineItems . nth ( 3 ) . locator ( '.icon' ) ) . toHaveCSS ( 'border-color' , 'rgb(242, 48, 48 )' )
29+ await expect ( timelineItems . nth ( 3 ) . locator ( '.icon .icon-error' ) ) . toHaveCSS ( 'fill' , 'rgb(242, 48, 48 )' )
3030
3131 // 禁用状态
3232 await expect ( timelineItems . nth ( 5 ) ) . toHaveClass ( / p r o c e s s - d i s a b l e d / )
33- await expect ( timelineItems . nth ( 5 ) . locator ( '.icon' ) ) . toHaveCSS ( 'background-color' , 'rgb(245, 245, 246 )' )
34- await expect ( timelineItems . nth ( 5 ) . locator ( '.icon .number' ) ) . toHaveCSS ( 'color' , 'rgb(173, 176, 184 )' )
33+ await expect ( timelineItems . nth ( 5 ) . locator ( '.icon' ) ) . toHaveCSS ( 'background-color' , 'rgb(240, 240, 240 )' )
34+ await expect ( timelineItems . nth ( 5 ) . locator ( '.icon .number' ) ) . toHaveCSS ( 'color' , 'rgb(194, 194, 194 )' )
3535 } )
3636
3737 test ( 'type属性设置节点状态' , async ( { page } ) => {
@@ -42,15 +42,15 @@ test.describe('节点状态', () => {
4242 const timelineItems = timeline . locator ( '.tiny-timeline-item' )
4343
4444 await expect ( timelineItems . first ( ) ) . toHaveClass ( / t i m e l i n e - i t e m - - p r i m a r y / )
45- await expect ( timelineItems . first ( ) . locator ( '.dot' ) ) . toHaveCSS ( 'background-color' , 'rgb(223, 225, 230 )' )
45+ await expect ( timelineItems . first ( ) . locator ( '.dot' ) ) . toHaveCSS ( 'background-color' , 'rgb(194, 194, 194 )' )
4646 await expect ( timelineItems . nth ( 1 ) ) . toHaveClass ( / t i m e l i n e - i t e m - - s u c c e s s / )
47- await expect ( timelineItems . nth ( 1 ) . locator ( '.dot' ) ) . toHaveCSS ( 'background-color' , 'rgb(80, 212, 171 )' )
47+ await expect ( timelineItems . nth ( 1 ) . locator ( '.dot' ) ) . toHaveCSS ( 'background-color' , 'rgb(92, 179, 0 )' )
4848
4949 await expect ( timelineItems . nth ( 2 ) ) . toHaveClass ( / t i m e l i n e - i t e m - - w a r n i n g / )
50- await expect ( timelineItems . nth ( 2 ) . locator ( '.dot' ) ) . toHaveCSS ( 'background-color' , 'rgb(250, 152, 65 )' )
50+ await expect ( timelineItems . nth ( 2 ) . locator ( '.dot' ) ) . toHaveCSS ( 'background-color' , 'rgb(255, 136, 0 )' )
5151 await expect ( timelineItems . nth ( 3 ) ) . toHaveClass ( / t i m e l i n e - i t e m - - d a n g e r / )
52- await expect ( timelineItems . nth ( 3 ) . locator ( '.dot' ) ) . toHaveCSS ( 'background-color' , 'rgb(246, 111, 106 )' )
52+ await expect ( timelineItems . nth ( 3 ) . locator ( '.dot' ) ) . toHaveCSS ( 'background-color' , 'rgb(242, 48, 48 )' )
5353 await expect ( timelineItems . nth ( 4 ) ) . toHaveClass ( / t i m e l i n e - i t e m - - i n f o / )
54- await expect ( timelineItems . nth ( 4 ) . locator ( '.dot' ) ) . toHaveCSS ( 'background-color' , 'rgb(94, 124, 224 )' )
54+ await expect ( timelineItems . nth ( 4 ) . locator ( '.dot' ) ) . toHaveCSS ( 'background-color' , 'rgb(20, 118, 255 )' )
5555 } )
5656} )
0 commit comments