@Test(
     groups = {"P1", "P1_Target", "PasswordChange"},
     dependsOnMethods = {"verifyValidationOnChangePasswordOfNewEmployeeTest"})
 public void changePasswordWithIncorrectNewPasswordTest() {
   passwordActions.verifyValidationOnChangePasswordWithNewPasswordNumericOnly(
       SetupStaticData.PASSWORD, SetupStaticData.PASSWORD_ONLY_NUMERIC);
   passwordActions.verifyValidationOnChangePasswordWithNewPasswordAlphabetOnly(
       SetupStaticData.PASSWORD, SetupStaticData.PASSWORD_ONLY_ALPHABET);
   passwordActions.verifyValidationOnChangePasswordWithLessThanEightDigit(
       SetupStaticData.PASSWORD, SetupStaticData.PASSWORD_LESS_THAN_8_DIGIT);
 }
 @Test(
     groups = {"P1", "P1_Target", "PasswordChange"},
     dependsOnMethods = {"changePasswordWithIncorrectNewPasswordTest"})
 public void changeExpiredPasswordTest() {
   passwordActions.changeExpiredPassword(
       SetupStaticData.PASSWORD,
       SetupStaticData.UPDATED_PASSWORD,
       SetupStaticData.UPDATED_PASSWORD);
   // Ensure that the system allows the user to login to the application with new password.
   actions.logout();
   actions.initializeSession(
       employee.getUserName().get(), SetupStaticData.UPDATED_PASSWORD, LoginData.STORE.value());
   // return password to original value
   passwordActions.changePassword(
       SetupStaticData.UPDATED_PASSWORD, SetupStaticData.PASSWORD, SetupStaticData.PASSWORD);
 }
 @Test(
     groups = {"P1", "P1_Target", "PasswordChange"},
     dependsOnMethods = {"verifyRequiredNumberOfConsecutiveUniquePasswordsSystemProperty"})
 public void verifyChangePasswordWithRequireBothLettersAndNumbersSetToNo() {
   systemPropertiesActions.requireBothLettersAndNumbersToNo();
   passwordActions.verifyChangePasswordWithRequireBothLettersAndNumbersSetToNo(
       SetupStaticData.PASSWORD,
       SetupStaticData.PASSWORD_ONLY_NUMERIC,
       SetupStaticData.PASSWORD_ONLY_NUMERIC);
   passwordActions.verifyChangePasswordWithRequireBothLettersAndNumbersSetToNo(
       SetupStaticData.PASSWORD_ONLY_NUMERIC,
       SetupStaticData.PASSWORD_ONLY_ALPHABET,
       SetupStaticData.PASSWORD_ONLY_ALPHABET);
   passwordActions.changePassword(
       SetupStaticData.PASSWORD_ONLY_ALPHABET, SetupStaticData.PASSWORD, SetupStaticData.PASSWORD);
   systemPropertiesActions.requireBothLettersAndNumbersToYes();
 }
 @Test(
     groups = {"P2", "P2_Target", "PasswordChange"},
     dependsOnMethods = {"verifyChangePasswordWithRequireBothLettersAndNumbersSetToNo"})
 public void verifyValidationOnChangingPasswordWithRequireBothLettersAndNumbersSetToYes() {
   systemPropertiesActions.requireBothLettersAndNumbersToYes();
   passwordActions.verifyValidationOnChangingPasswordWithRequireBothLettersAndNumbersSetToYes(
       SetupStaticData.PASSWORD,
       SetupStaticData.PASSWORD_ONLY_NUMERIC,
       SetupStaticData.PASSWORD_ONLY_NUMERIC);
 }
 @Test(
     groups = {"P1", "P1_Target", "Smoke_Target", "PasswordChange"},
     dependsOnMethods = {
       "verifyValidationOnChangingPasswordWithRequireBothLettersAndNumbersSetToYes"
     })
 public void verifyValidationOnChangePasswordOfNewEmployeeTest() {
   employeeActions.addEmployee(employee);
   systemPropertiesActions.requireBothLettersAndNumbersToYes();
   actions.logout();
   actions.initializeSession(
       employee.getUserName().get(), SetupStaticData.PASSWORD, LoginData.STORE.value());
   // Validate that system displays error message when current password is not provided.
   passwordActions.changePasswordWithoutProvidingCurrentPassword(
       "", SetupStaticData.UPDATED_PASSWORD);
   passwordActions.changePasswordWithoutProvidingNewPassword(
       SetupStaticData.PASSWORD, "", SetupStaticData.UPDATED_PASSWORD);
   passwordActions.changePasswordWithoutProvidingConfirmNewPasswordTest(
       SetupStaticData.PASSWORD, SetupStaticData.UPDATED_PASSWORD, "");
   passwordActions.changePasswordWithIncorrectCurrentPassword(
       SetupStaticData.PASSWORD_SECOND, SetupStaticData.UPDATED_PASSWORD);
 }
 @Test(
     groups = {"P1", "P1_Target", "PasswordChange"},
     singleThreaded = true)
 public void verifyRequiredNumberOfConsecutiveUniquePasswordsSystemProperty() {
   String empUserName = DynamicData.getRandomAlphaNumericString(6);
   String empLastName = DynamicData.getRandomAlphaNumericString(4);
   systemPropertiesActions.disableUniquePasswordValue();
   systemPropertiesActions.setRequireNumberOfUniquePasswordValue(2);
   Employee employee =
       Employee.builder()
           .firstName(SetupStaticData.EMP_FIRST_NAME)
           .lastName(empLastName)
           .userName(empUserName)
           .password(SetupStaticData.PASSWORD)
           .role(DefaultRoles.ADMINISTRATOR.getText())
           .assignedStores(ImmutableList.of(LoginData.STORE.value()))
           .active(true)
           .commissionsEnabled(true)
           .create();
   employeeActions.addEmployee(employee);
   commonActions.logout();
   commonActions.initializeSession(empUserName, SetupStaticData.PASSWORD, LoginData.STORE.value());
   passwordActions.changePasswordForNewlyCreatedEmployee(
       SetupStaticData.PASSWORD,
       SetupStaticData.UPDATED_PASSWORD,
       SetupStaticData.UPDATED_PASSWORD);
   passwordActions.changePassword(
       SetupStaticData.UPDATED_PASSWORD,
       SetupStaticData.PASSWORD_SECOND,
       SetupStaticData.PASSWORD_SECOND);
   passwordActions.changePasswordToCheckConsecutiveUniquePassword(
       SetupStaticData.PASSWORD_SECOND,
       SetupStaticData.UPDATED_PASSWORD,
       SetupStaticData.UPDATED_PASSWORD);
   systemPropertiesActions.disableUniquePasswordValue();
   commonActions.logout();
   commonActions.initializeSession();
 }