add test for font input focus

Add a cypress test for the change in commit dfe1e1b5

Signed-off-by: Jaume Pujantell <jaume.pujantell@collabora.com>
Change-Id: Id829d271efe7ccebf58c9f83cc67e6b1cf8b72e9
pull/8564/head
Jaume Pujantell 2024-03-18 10:17:06 +01:00 committed by Miklos Vajna
parent 187512aa58
commit 1f1eab4d99
1 changed files with 17 additions and 0 deletions

View File

@ -80,4 +80,21 @@ describe(['tagdesktop', 'tagproxy'], 'Focus tests', function() {
cy.cGet('#search-input').should('have.prop', 'value', text);
});
it('Type in font change.', function () {
// Select everything
cy.cGet('body').type('{ctrl}a');
// Change font size by slow typing
cy.cGet('#fontsizecombobox > input.ui-combobox-content').click();
cy.cGet('#fontsizecombobox > input.ui-combobox-content').clear();
helper.assertFocus('tagName', 'INPUT');
helper.assertFocus('parentElement.id', 'fontsizecombobox');
var text = '999';
helper.typeText('body', text, 500);
// Font size combobox sould retain focus
helper.assertFocus('tagName', 'INPUT');
helper.assertFocus('parentElement.id', 'fontsizecombobox');
});
});