Skip to content

Commit

Permalink
removed fixture with clear button
Browse files Browse the repository at this point in the history
  • Loading branch information
mukherjeesudebi committed May 4, 2023
1 parent 5319b2a commit 4c14847
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 43 deletions.
10 changes: 3 additions & 7 deletions test/email-field-events.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,6 @@
<vaadin-email-field></vaadin-email-field>
</template>
</test-fixture>
<test-fixture id="email-field-with-clear-button">
<template>
<vaadin-email-field clear-button-visible></vaadin-email-field>
</template>
</test-fixture>
<script>
describe('events', () => {
let emailField, input, hasInputValueChangedSpy, valueChangedSpy;
Expand Down Expand Up @@ -79,14 +74,15 @@
});
});

describe('has-input-value-changed event on clear', () => {
describe('has-input-value-changed event with clear button', () => {
beforeEach(async() => {
hasInputValueChangedSpy = sinon.spy();
valueChangedSpy = sinon.spy();
emailField = fixture('email-field-with-clear-button');
emailField = fixture('email-field');
emailField.addEventListener('has-input-value-changed', hasInputValueChangedSpy);
emailField.addEventListener('value-changed', valueChangedSpy);
input = emailField.inputElement;
emailField.clearButtonVisible = true;
});

describe('with user input', () => {
Expand Down
10 changes: 3 additions & 7 deletions test/integer-field-events.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,6 @@
<vaadin-integer-field></vaadin-integer-field>
</template>
</test-fixture>
<test-fixture id="integer-field-with-clear-button">
<template>
<vaadin-integer-field clear-button-visible></vaadin-integer-field>
</template>
</test-fixture>
<script>
describe('events', () => {
let integerField, input, hasInputValueChangedSpy, valueChangedSpy;
Expand Down Expand Up @@ -79,14 +74,15 @@
});
});

describe('has-input-value-changed event on clear', () => {
describe('has-input-value-changed event with clear button', () => {
beforeEach(async() => {
hasInputValueChangedSpy = sinon.spy();
valueChangedSpy = sinon.spy();
integerField = fixture('integer-field-with-clear-button');
integerField = fixture('integer-field');
integerField.addEventListener('has-input-value-changed', hasInputValueChangedSpy);
integerField.addEventListener('value-changed', valueChangedSpy);
input = integerField.inputElement;
integerField.clearButtonVisible = true;
});

describe('with user input', () => {
Expand Down
10 changes: 3 additions & 7 deletions test/number-field-events.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,6 @@
<vaadin-number-field></vaadin-number-field>
</template>
</test-fixture>
<test-fixture id="number-field-with-clear-button">
<template>
<vaadin-number-field clear-button-visible></vaadin-number-field>
</template>
</test-fixture>
<script>
describe('events', () => {
let numberField, input, hasInputValueChangedSpy, valueChangedSpy;
Expand Down Expand Up @@ -79,14 +74,15 @@
});
});

describe('has-input-value-changed event on clear', () => {
describe('has-input-value-changed event with clear button', () => {
beforeEach(async() => {
hasInputValueChangedSpy = sinon.spy();
valueChangedSpy = sinon.spy();
numberField = fixture('number-field-with-clear-button');
numberField = fixture('number-field');
numberField.addEventListener('has-input-value-changed', hasInputValueChangedSpy);
numberField.addEventListener('value-changed', valueChangedSpy);
input = numberField.inputElement;
numberField.clearButtonVisible = true;
});

describe('with user input', () => {
Expand Down
10 changes: 3 additions & 7 deletions test/password-field-events.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,6 @@
<vaadin-password-field></vaadin-password-field>
</template>
</test-fixture>
<test-fixture id="password-field-with-clear-button">
<template>
<vaadin-password-field clear-button-visible></vaadin-password-field>
</template>
</test-fixture>
<script>
describe('events', () => {
let passwordField, input, hasInputValueChangedSpy, valueChangedSpy;
Expand Down Expand Up @@ -79,14 +74,15 @@
});
});

describe('has-input-value-changed event on clear', () => {
describe('has-input-value-changed event with clear button', () => {
beforeEach(async() => {
hasInputValueChangedSpy = sinon.spy();
valueChangedSpy = sinon.spy();
passwordField = fixture('password-field-with-clear-button');
passwordField = fixture('password-field');
passwordField.addEventListener('has-input-value-changed', hasInputValueChangedSpy);
passwordField.addEventListener('value-changed', valueChangedSpy);
input = passwordField.inputElement;
passwordField.clearButtonVisible = true;
});

describe('with user input', () => {
Expand Down
10 changes: 3 additions & 7 deletions test/text-area-events.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,6 @@
<vaadin-text-area></vaadin-text-area>
</template>
</test-fixture>
<test-fixture id="text-area-with-clear-button">
<template>
<vaadin-text-area clear-button-visible></vaadin-text-area>
</template>
</test-fixture>
<script>
describe('events', () => {
let textArea, input, hasInputValueChangedSpy, valueChangedSpy;
Expand Down Expand Up @@ -79,14 +74,15 @@
});
});

describe('has-input-value-changed event on clear', () => {
describe('has-input-value-changed event with clear button', () => {
beforeEach(async() => {
hasInputValueChangedSpy = sinon.spy();
valueChangedSpy = sinon.spy();
textArea = fixture('text-area-with-clear-button');
textArea = fixture('text-area');
textArea.addEventListener('has-input-value-changed', hasInputValueChangedSpy);
textArea.addEventListener('value-changed', valueChangedSpy);
input = textArea.inputElement;
textArea.clearButtonVisible = true;
});

describe('with user input', () => {
Expand Down
11 changes: 3 additions & 8 deletions test/text-field-events.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,6 @@
<vaadin-text-field></vaadin-text-field>
</template>
</test-fixture>

<test-fixture id="text-field-with-clear-button">
<template>
<vaadin-text-field clear-button-visible></vaadin-text-field>
</template>
</test-fixture>
<script>
describe('events', () => {
let textField, input, hasInputValueChangedSpy, valueChangedSpy;
Expand Down Expand Up @@ -80,14 +74,15 @@
});
});

describe('has-input-value-changed event on clear', () => {
describe('has-input-value-changed event with clear button', () => {
beforeEach(async() => {
hasInputValueChangedSpy = sinon.spy();
valueChangedSpy = sinon.spy();
textField = fixture('text-field-with-clear-button');
textField = fixture('text-field');
textField.addEventListener('has-input-value-changed', hasInputValueChangedSpy);
textField.addEventListener('value-changed', valueChangedSpy);
input = textField.inputElement;
textField.clearButtonVisible = true;
});

describe('with user input', () => {
Expand Down

0 comments on commit 4c14847

Please sign in to comment.