mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
feat(searchbar): ionChange will only emit from user committed changes (#26026)
This commit is contained in:
18
angular/test/base/e2e/src/searchbar.spec.ts
Normal file
18
angular/test/base/e2e/src/searchbar.spec.ts
Normal 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"`);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user