Skip to content

Commit cba3108

Browse files
committed
fix: coverage
1 parent 2948b55 commit cba3108

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

packages/web-components/src/components/fluid-password-input/__tests__/fluid-password-input-test.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,16 @@ describe('cds-fluid-password-input', () => {
172172
expect(toggleButton.disabled).to.be.true;
173173
});
174174

175+
it('should render divider when isFluid is true', async () => {
176+
const el = await fixture(html`
177+
<cds-fluid-password-input label="Password"></cds-fluid-password-input>
178+
`);
179+
180+
const divider = el.shadowRoot.querySelector('.cds--text-input__divider');
181+
expect(divider).to.exist;
182+
expect(divider.tagName.toLowerCase()).to.equal('hr');
183+
});
184+
175185
it('should not allow input change when readOnly is true', async () => {
176186
const el = await fixture(html`
177187
<cds-fluid-password-input readonly></cds-fluid-password-input>

packages/web-components/src/components/password-input/__tests__/password-input-test.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,16 @@ describe('cds-password-input', () => {
7575
).to.be.true;
7676
});
7777

78+
it('should render divider when isFluid is true', async () => {
79+
const el = await fixture(html`
80+
<cds-password-input isFluid="true" label="Password"></cds-password-input>
81+
`);
82+
83+
const divider = el.shadowRoot.querySelector('.cds--text-input__divider');
84+
expect(divider).to.exist;
85+
expect(divider.tagName.toLowerCase()).to.equal('hr');
86+
});
87+
7888
it('should apply hide-password-label attribute', async () => {
7989
const el = await fixture(html`
8090
<cds-password-input

0 commit comments

Comments
 (0)