From 5ec61f856a7f2226e4f8807a5c71fc92614f54fb Mon Sep 17 00:00:00 2001 From: Angelika Kinas Date: Thu, 12 Dec 2024 13:28:49 +0100 Subject: [PATCH] chore(e2e): add test --- apps/metadata-editor-e2e/src/e2e/edit.cy.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/apps/metadata-editor-e2e/src/e2e/edit.cy.ts b/apps/metadata-editor-e2e/src/e2e/edit.cy.ts index c47608a4f..0ed6eeaa4 100644 --- a/apps/metadata-editor-e2e/src/e2e/edit.cy.ts +++ b/apps/metadata-editor-e2e/src/e2e/edit.cy.ts @@ -643,6 +643,17 @@ describe('editor form', () => { .find('span') .should('have.text', 'Addresses ') }) + it('should close the autocomplete and clear the input after selecting a keyword', () => { + cy.get('gn-ui-form-field-keywords') + .find('gn-ui-autocomplete') + .type('a') + cy.get('mat-option').first().click() + cy.get('mat-option').should('not.exist') + cy.get('gn-ui-form-field-keywords') + .find('gn-ui-autocomplete') + .find('input') + .should('have.value', '') + }) it('should delete a keyword', () => { cy.editor_wrapPreviousDraft() cy.get('gn-ui-form-field-keywords')