@@ -27,6 +27,8 @@ const CustomizationWrapper: React.FC<React.PropsWithChildren> = ({ children }) =
2727 CODE_BLOCK_TAB : { borderRadius : "borderRadius0" } ,
2828 CODE_BLOCK_WRAPPER : { width : "size50" } ,
2929 CODE_BLOCK : { width : "size50" } ,
30+ CODE_BLOCK_TAB_LIST_CHILD : { backgroundColor : "colorBackgroundError" } ,
31+ CODE_BLOCK_TAB_LIST_CHILD_SCROLL_WRAPPER : { backgroundColor : "colorBackgroundAvailable" } ,
3032 } }
3133 >
3234 { children }
@@ -47,6 +49,8 @@ const CustomizationMyWrapper: React.FC<React.PropsWithChildren> = ({ children })
4749 MY_CODE_BLOCK_TAB : { borderRadius : "borderRadius0" } ,
4850 MY_CODE_BLOCK_WRAPPER : { width : "size50" } ,
4951 MY_CODE_BLOCK : { width : "size50" } ,
52+ MY_CODE_BLOCK_TAB_LIST_CHILD : { backgroundColor : "colorBackgroundError" } ,
53+ MY_CODE_BLOCK_TAB_LIST_CHILD_SCROLL_WRAPPER : { backgroundColor : "colorBackgroundAvailable" } ,
5054 } }
5155 >
5256 { children }
@@ -85,6 +89,10 @@ describe("Customization", () => {
8589 expect ( content ?. getAttribute ( "data-paste-element" ) ) . toBe ( "CODE_BLOCK_CONTENT" ) ;
8690 expect ( tabList . getAttribute ( "data-paste-element" ) ) . toBe ( "CODE_BLOCK_TAB_LIST" ) ;
8791 expect ( tab . getAttribute ( "data-paste-element" ) ) . toBe ( "CODE_BLOCK_TAB" ) ;
92+ expect ( tab . parentElement ?. getAttribute ( "data-paste-element" ) ) . toBe ( "CODE_BLOCK_TAB_LIST_CHILD" ) ;
93+ expect ( tab . parentElement ?. parentElement ?. getAttribute ( "data-paste-element" ) ) . toBe (
94+ "CODE_BLOCK_TAB_LIST_CHILD_SCROLL_WRAPPER" ,
95+ ) ;
8896 expect ( tabPanel ?. getAttribute ( "data-paste-element" ) ) . toBe ( "CODE_BLOCK_TAB_PANEL" ) ;
8997 expect ( codeBlock . getAttribute ( "data-paste-element" ) ) . toBe ( "CODE_BLOCK" ) ;
9098 expect ( heading . getAttribute ( "data-paste-element" ) ) . toBe ( "CODE_BLOCK_HEADER" ) ;
@@ -128,6 +136,10 @@ describe("Customization", () => {
128136 expect ( content ?. getAttribute ( "data-paste-element" ) ) . toBe ( "MY_CODE_BLOCK_CONTENT" ) ;
129137 expect ( tabList . getAttribute ( "data-paste-element" ) ) . toBe ( "MY_CODE_BLOCK_TAB_LIST" ) ;
130138 expect ( tab . getAttribute ( "data-paste-element" ) ) . toBe ( "MY_CODE_BLOCK_TAB" ) ;
139+ expect ( tab . parentElement ?. getAttribute ( "data-paste-element" ) ) . toBe ( "MY_CODE_BLOCK_TAB_LIST_CHILD" ) ;
140+ expect ( tab . parentElement ?. parentElement ?. getAttribute ( "data-paste-element" ) ) . toBe (
141+ "MY_CODE_BLOCK_TAB_LIST_CHILD_SCROLL_WRAPPER" ,
142+ ) ;
131143 expect ( tabPanel ?. getAttribute ( "data-paste-element" ) ) . toBe ( "MY_CODE_BLOCK_TAB_PANEL" ) ;
132144 expect ( codeBlock . getAttribute ( "data-paste-element" ) ) . toBe ( "MY_CODE_BLOCK" ) ;
133145 expect ( heading . getAttribute ( "data-paste-element" ) ) . toBe ( "MY_CODE_BLOCK_HEADER" ) ;
@@ -167,6 +179,8 @@ describe("Customization", () => {
167179 expect ( heading ) . toHaveStyleRule ( "border-top-right-radius" , "8px" ) ;
168180 expect ( tabList ) . toHaveStyleRule ( "column-gap" , "0" ) ;
169181 expect ( tab ) . toHaveStyleRule ( "border-radius" , "0" ) ;
182+ expect ( tab . parentElement ) . toHaveStyleRule ( "background-color" , "rgb(214, 31, 31)" ) ;
183+ expect ( tab . parentElement ?. parentElement ) . toHaveStyleRule ( "background-color" , "rgb(20, 176, 83)" ) ;
170184 expect ( tabPanel ) . toHaveStyleRule ( "border-bottom-right-radius" , "8px" ) ;
171185 expect ( copyButton ) . toHaveStyleRule ( "background-color" , "rgb(254, 236, 236)" ) ;
172186 expect ( externalLink ) . toHaveStyleRule ( "background-color" , "rgb(254, 236, 236)" ) ;
@@ -210,6 +224,8 @@ describe("Customization", () => {
210224 expect ( heading ) . toHaveStyleRule ( "border-top-right-radius" , "8px" ) ;
211225 expect ( tabList ) . toHaveStyleRule ( "column-gap" , "0" ) ;
212226 expect ( tab ) . toHaveStyleRule ( "border-radius" , "0" ) ;
227+ expect ( tab . parentElement ) . toHaveStyleRule ( "background-color" , "rgb(214, 31, 31)" ) ;
228+ expect ( tab . parentElement ?. parentElement ) . toHaveStyleRule ( "background-color" , "rgb(20, 176, 83)" ) ;
213229 expect ( tabPanel ) . toHaveStyleRule ( "border-bottom-right-radius" , "8px" ) ;
214230 expect ( copyButton ) . toHaveStyleRule ( "background-color" , "rgb(254, 236, 236)" ) ;
215231 expect ( externalLink ) . toHaveStyleRule ( "background-color" , "rgb(254, 236, 236)" ) ;
0 commit comments