So I'm using Cypress for testing our Angular application, but for some reason I always have an issue with closing mat-select components which are multiselect. Has anyone got a good solution for this?
function selectValue(id: string, value: string) {
return cy.get(`mat-select[id="${id}"]`)
.click()
.then(() =>
cy.get('mat-option')
.contains(value)
.click();
}