Skip to content

Commit 5f34663

Browse files
authored
fix(cypress): clear input with then instead of clear() (#1296)
* fix(cypress): clear input with then instead of clear() * fix(cypress): clear input with then instead of clear() * fix(cypress): clear input with then instead of clear()
1 parent c7c4629 commit 5f34663

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

cypress/support/identity-admin.commands.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,13 @@ Cypress.Commands.add("updateIdentityAdmin", ({nameToUpdate, name, login, passwor
4848
cy.get('input[type="search"]').clear();
4949
cy.get('input[type="search"]').type(nameToUpdate);
5050
cy.wait('@searchIdentities');
51+
cy.get('#actionEdit-' + nameToUpdate, { timeout: 10000 }).should('be.visible');
5152
cy.getSettled('#actionEdit-' + nameToUpdate, { retries: 2, delay: 500 }).click();
5253

5354

5455
if (name) {
55-
cy.get('#name').clear().clear()
56-
.then(() => cy.get('#name').should('be.empty'))
57-
.then(() => cy.get('#name').type(name))
58-
.then(() => cy.get('#name').should('have.value', name))
56+
cy.get('input[id=name]').clear();
57+
cy.get('input[id=name]').type(name)
5958
}
6059
if (login) {
6160
cy.get('#login').clear().type(login);

cypress/support/identity-environment.commands.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,14 +60,13 @@ Cypress.Commands.add("updateIdentityManage", ({applicationName, nameToUpdate, na
6060
cy.getSettled('input[type="search"]', { retries: 2, delay: 500 }).clear();
6161
cy.getSettled('input[type="search"]', { retries: 2, delay: 500 }).type(nameToUpdate);
6262
cy.wait('@searchIdentities');
63+
cy.get('#actionEdit-' + nameToUpdate, { timeout: 10000 }).should('be.visible');
6364
cy.getSettled('#actionEdit-' + nameToUpdate, { retries: 2, delay: 500 }).click();
6465

6566

6667
if (name) {
67-
cy.get('#name').clear()
68-
.then(() => cy.get('#name').should('be.empty'))
69-
.then(() => cy.get('#name').type(name))
70-
.then(() => cy.get('#name').should('have.value', name))
68+
cy.get('input[id=name]').clear();
69+
cy.get('input[id=name]').type(name)
7170
}
7271
if (login) {
7372
cy.get('#login').clear().type(login);

0 commit comments

Comments
 (0)