File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed
packages/web-components/src/components/tag Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -296,6 +296,14 @@ describe('cds-tag', function () {
296296
297297 await expect ( el ) . dom . to . equalSnapshot ( ) ;
298298 } ) ;
299+
300+ it ( 'should expose part on tag' , async ( ) => {
301+ const operationalTag = html `< cds-operational-tag
302+ text ="Tag content "> </ cds-operational-tag > ` ;
303+ const el = await fixture ( operationalTag ) ;
304+
305+ expect ( el . shadowRoot . querySelector ( '[part="tag"]' ) ) . to . exist ;
306+ } ) ;
299307 } ) ;
300308
301309 it ( 'should render as a filter tag' , async ( ) => {
Original file line number Diff line number Diff line change @@ -152,6 +152,7 @@ class CDSOperationalTag extends HostListenerMixin(FocusMixin(LitElement)) {
152152 closeOnActivation
153153 leave-delay-ms =${ 0 } >
154154 < cds-tag
155+ part ="tag "
155156 ?aria-pressed ="${ selected } "
156157 size ="${ size } "
157158 ?disabled ="${ disabled } "
@@ -166,6 +167,7 @@ class CDSOperationalTag extends HostListenerMixin(FocusMixin(LitElement)) {
166167 </ cds-tooltip > `
167168 : html `
168169 < cds-tag
170+ part ="tag "
169171 ?aria-pressed ="${ selected } "
170172 size ="${ size } "
171173 ?disabled ="${ disabled } "
You can’t perform that action at this time.
0 commit comments