Conversation
ee590b5 to
af102d9
Compare
Signed-off-by: Ferdinand Thiessen <[email protected]>
af102d9 to
9b9133c
Compare
Signed-off-by: Ferdinand Thiessen <[email protected]>
| cy.get('li[data-cy-settings-new-group-name]').within(() => { | ||
| // see that the group name is "" | ||
| cy.get('input[placeholder="Group name"]').should('exist').and('have.value', '') | ||
| cy.get('input').should('exist').and('have.value', '') | ||
| // set the group name to foo | ||
| cy.get('input[placeholder="Group name"]').type(groupName) | ||
| cy.get('input').type(groupName) | ||
| // see that the group name is foo | ||
| cy.get('input[placeholder="Group name"]').should('have.value', groupName) | ||
| cy.get('input').should('have.value', groupName) | ||
| // submit the group name | ||
| cy.get('input[placeholder="Group name"] ~ button').click() | ||
| cy.get('input ~ button').click() |
There was a problem hiding this comment.
To fix the test, only removing [role="menu"] seems to be required. Then there is no need in data-cy attribute, which uses test less semantic and more coupled on implementation (manually marked place).
There was a problem hiding this comment.
It would depend on internal implementation (class action-item__popper) which is bad.
So this flags the action where to look on a non implementation dependent way (we set the attribute in our code so we do not rely on the implementation of the action, except for the li element but this is required due to a bug with actions (the attribute will be assigned on the li tag and also forwarded to the input tag).
Summary
Required for accessibility.
Checklist