I'm writing a Cypress.io test for a page that has Angular material radio buttons. I can read the selected option, and seemingly change the selected radio button, but my app does not recognize it as having been changed.
I've checked the documentation, but I don't see anything to help deal with this particular scenario. I've tried using .check() and .click() and they both result in the same issue.
I write that it seems to have worked because the right radio button is selected in the test runner UI. However, I know it hasn't triggered anything in Angular because the option hasn't been changed in the DB.
Here's the test. It correctly identifies which button is selected at the start, but does not actually change which button is selected.
it('Should change radio button', function() {
cy.get('#mat-radio-3').should('have.attr', 'ng-reflect-checked', 'true');
cy.get('[type="radio"]').first().check({force: true});
cy.get('#mat-radio-2').should('have.attr', 'ng-reflect-checked', 'true');
})