public void ChangeUserRoleTest(string userName) { // Preconditions LoginPage loginPage = Application.Get().Login(); UsersPage usersPage = loginPage.SuccessAdminLogin(UserRepository.Get().Admin()); usersPage.SetValueToSearch(userName); // Test steps // Step 1:Check if checkboxes are disabled and edit button is displayed Assert.False(usersPage.IsAdminRoleEnabled()); Assert.False(usersPage.IsTeacherRoleEnabled()); Assert.False(usersPage.IsStudentRoleEnabled()); Assert.IsTrue(usersPage.IsDisplayedEditPencil()); // Step 2: Click edit user role button, check if checkboxes are enabled usersPage.EditRole(); Assert.IsTrue(usersPage.IsDisplayedCheckMark()); //Assert.IsTrue(usersPage.IsAdminRoleEnabled()); //Assert.IsTrue(usersPage.IsTeacherRoleEnabled()); //Assert.IsTrue(usersPage.IsStudentRoleEnabled()); // Step 3: Change state of teacher role chekbox usersPage.SetTeacherRole(); Assert.False(usersPage.IsTeacherRoleChecked()); usersPage.FinishEditing(); Assert.False(usersPage.IsTeacherRoleChecked()); // Return to previous state usersPage.EditRole(); usersPage.SetTeacherRole(); usersPage.FinishEditing(); loginPage = usersPage.GotoLogOut(); }