feat(searchbar): ionChange will only emit from user committed changes (#26026)

This commit is contained in:
Amanda Johnston
2022-10-03 15:08:43 -05:00
committed by GitHub
parent 4cb32b6c6b
commit b052d3b262
17 changed files with 302 additions and 70 deletions

View File

@@ -0,0 +1,18 @@
describe('Searchbar', () => {
beforeEach(() => cy.visit('/searchbar'));
it('should become valid', () => {
cy.get('#status').should('have.text', 'INVALID');
cy.get('ion-searchbar').type('hello');
cy.get('#status').should('have.text', 'VALID');
});
it('should update the form control value when typing', () => {
cy.get('#value').contains(`"searchbar": ""`);
cy.get('ion-searchbar').type('hello');
cy.get('#value').contains(`"searchbar": "hello"`);
});
});