@@ -1127,6 +1127,7 @@ describe('Tour', () => {
11271127 section : 'custom-section' ,
11281128 footer : 'custom-footer' ,
11291129 description : 'custom-description' ,
1130+ close : 'custom-close' ,
11301131 } ;
11311132 const customStyles = {
11321133 mask : { color : 'white' } ,
@@ -1136,6 +1137,7 @@ describe('Tour', () => {
11361137 section : { padding : '10px' } ,
11371138 footer : { borderTop : '1px solid black' } ,
11381139 description : { fontStyle : 'italic' } ,
1140+ close : { color : 'red' } ,
11391141 } ;
11401142 const Demo = ( ) => {
11411143 const btnRef = useRef < HTMLButtonElement > ( null ) ;
@@ -1178,6 +1180,9 @@ describe('Tour', () => {
11781180 const descriptionElement = document . querySelector (
11791181 '.rc-tour-description' ,
11801182 ) as HTMLElement ;
1183+ const closeElement = document . querySelector (
1184+ '.rc-tour-close' ,
1185+ ) as HTMLElement ;
11811186
11821187 // check classNames
11831188 expect ( maskElement . classList ) . toContain ( 'custom-mask' ) ;
@@ -1187,6 +1192,7 @@ describe('Tour', () => {
11871192 expect ( sectionElement . classList ) . toContain ( 'custom-section' ) ;
11881193 expect ( footerElement . classList ) . toContain ( 'custom-footer' ) ;
11891194 expect ( descriptionElement . classList ) . toContain ( 'custom-description' ) ;
1195+ expect ( closeElement . classList ) . toContain ( 'custom-close' ) ;
11901196
11911197 // check styles
11921198 expect ( maskElement . style . color ) . toBe ( 'white' ) ;
@@ -1196,6 +1202,7 @@ describe('Tour', () => {
11961202 expect ( sectionElement . style . padding ) . toBe ( '10px' ) ;
11971203 expect ( footerElement . style . borderTop ) . toBe ( '1px solid black' ) ;
11981204 expect ( descriptionElement . style . fontStyle ) . toBe ( 'italic' ) ;
1205+ expect ( closeElement . style . color ) . toBe ( 'red' ) ;
11991206 } ) ;
12001207
12011208 it ( 'inline' , async ( ) => {
0 commit comments