@@ -6,10 +6,11 @@ import { ActionPane } from '../../src/action-pane.js';
6
6
7
7
describe ( 'action-pane' , ( ) => {
8
8
let element : ActionPane ;
9
+ const label = 'test label' ;
9
10
10
11
beforeEach ( async ( ) => {
11
12
element = await fixture (
12
- html `< action-pane header ="test header "> </ action-pane > `
13
+ html `< action-pane header ="test header " label =" ${ label } " > </ action-pane > `
13
14
) ;
14
15
await element . updateComplete ;
15
16
} ) ;
@@ -79,6 +80,38 @@ describe('action-pane', () => {
79
80
expect ( element . shadowRoot ?. querySelector ( 'h4' ) ) . to . not . exist ;
80
81
} ) ;
81
82
83
+ it ( 'renders the title on the <h1>' , async ( ) => {
84
+ element . level = 1 ;
85
+ await element . updateComplete ;
86
+ expect (
87
+ element . shadowRoot ?. querySelector ( 'h1' ) ! . getAttribute ( 'title' )
88
+ ) . to . be . equals ( label ) ;
89
+ } ) ;
90
+
91
+ it ( 'renders the title on the <h2>' , async ( ) => {
92
+ element . level = 2 ;
93
+ await element . updateComplete ;
94
+ expect (
95
+ element . shadowRoot ?. querySelector ( 'h2' ) ! . getAttribute ( 'title' )
96
+ ) . to . be . equals ( label ) ;
97
+ } ) ;
98
+
99
+ it ( 'renders the title on the <h3>' , async ( ) => {
100
+ element . level = 3 ;
101
+ await element . updateComplete ;
102
+ expect (
103
+ element . shadowRoot ?. querySelector ( 'h3' ) ! . getAttribute ( 'title' )
104
+ ) . to . be . equals ( label ) ;
105
+ } ) ;
106
+
107
+ it ( 'renders the title on the <h4>' , async ( ) => {
108
+ element . level = 4 ;
109
+ await element . updateComplete ;
110
+ expect (
111
+ element . shadowRoot ?. querySelector ( 'h4' ) ! . getAttribute ( 'title' )
112
+ ) . to . be . equals ( label ) ;
113
+ } ) ;
114
+
82
115
it ( 'does not set contrasted class property with odd level' , async ( ) => {
83
116
element . level = 3 ;
84
117
await element . updateComplete ;
0 commit comments