Skip to content

Commit 695cb72

Browse files
committed
improve tests
1 parent 91b6c6e commit 695cb72

File tree

4 files changed

+14
-1
lines changed

4 files changed

+14
-1
lines changed

packages/uui-input-password/lib/uui-input-password.element.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import { property, state } from 'lit/decorators.js';
99

1010
/**
1111
* @element uui-input-password
12+
* @extends uui-input
1213
*/
1314
@defineElement('uui-input-password')
1415
export class UUIInputPasswordElement extends UUIInputElement {

packages/uui-input-password/lib/uui-input-password.test.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { html, fixture, expect } from '@open-wc/testing';
22
import { UUIInputPasswordElement } from './uui-input-password.element';
33
import '.';
4+
import { UUIInputElement } from '@umbraco-ui/uui-input/lib/';
45

56
describe('UUIInputPasswordElement', () => {
67
let element: UUIInputPasswordElement;
@@ -15,6 +16,14 @@ describe('UUIInputPasswordElement', () => {
1516
await expect(element).shadowDom.to.be.accessible();
1617
});
1718

19+
it('is defined with its own instance', () => {
20+
expect(element).to.be.instanceOf(UUIInputPasswordElement);
21+
});
22+
23+
it('inherits from uui-input', () => {
24+
expect(element).to.be.instanceOf(UUIInputElement);
25+
});
26+
1827
it('correctly toggles password type', async () => {
1928
element.type = 'password';
2029

packages/uui-input/lib/uui-input.element.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ export class UUIInputElement extends FormControlMixin(LitElement) {
4343
display: inline-flex;
4444
align-items: center;
4545
height: var(--uui-size-11);
46-
font-size: 15px;
4746
text-align: left;
4847
box-sizing: border-box;
4948
background-color: var(

packages/uui-input/lib/uui-input.test.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ describe('UuiInputElement', () => {
2222
await expect(element).shadowDom.to.be.accessible();
2323
});
2424

25+
it('is defined with its own instance', () => {
26+
expect(element).to.be.instanceOf(UUIInputElement);
27+
});
28+
2529
describe('properties', () => {
2630
it('has a name property', () => {
2731
expect(element).to.have.property('name');

0 commit comments

Comments
 (0)