To ensure the end-to-end functionality of my application, I have implemented a scenario where upon clicking a spinner button, both Username and Password input fields are disabled before being directed to a new page. My testing methodology involves verifying if these input fields are indeed disabled as intended.
element(by.model('username')).sendKeys('testuser');
element(by.model('password')).sendKeys('testpassword');
/* simulate clicking on the spinner button */
spinBtn = element(by.className('call-to-action'));
spinBtn.click();
/* confirm that the inputs are disabled */
var loginInput = element(by.id('login-username'));
expect(loginInput.isEnabled()).toBe(false);