@Test public void passwordCannotMatchUsernameTest() throws Exception { settingPage.clickOnSetting(); settingPage.clickOnSecurity(); settingPage.chooseFalse(); settingPage.saveProperties(); headerPage.clickOnHomeLink(); homePage.goToAdministration(); administrationPage.clickOnManageUsers(); manageUserPage.clickOnAddUser(); manageUserPage.createNewPerson(); manageUserPage.enterUserMale("dr_house", "House", "dr_house", "Dr_house123"); manageUserPage.chooseRole(); manageUserPage.saveUser(); assertTrue(driver.getPageSource().contains("User Saved")); manageUserPage.findUser("dr_house"); manageUserPage.deleteUser(); assertTrue(driver.getPageSource().contains("Successfully deleted user.")); headerPage.clickOnHomeLink(); homePage.goToAdministration(); settingPage.clickOnSetting(); settingPage.clickOnSecurity(); settingPage.chooseTrue(); assertTrue(driver.getPageSource().contains("Global properties saved")); }
@Ignore @Test public void findPatientByIdAndNameTest() throws Exception { homePage.openRegisterAPatientApp(); patient.familyName = "Bob"; patient.givenName = "Smith"; patient.gender = "Male"; patient.estimatedYears = "25"; registrationPage.enterPatientGivenName(patient.givenName); registrationPage.enterPatientFamilyName(patient.familyName); registrationPage.clickOnGenderLink(); registrationPage.selectPatientGender(patient.gender); registrationPage.clickOnBirthDateLink(); registrationPage.enterEstimatedYears(patient.estimatedYears); registrationPage.clickOnContactInfo(); patient.address1 = "address"; registrationPage.enterAddress1(patient.address1); registrationPage.clickOnConfirmSection(); registrationPage.confirmPatient(); id = patientDashboardPage.findPatientId(); patient.Uuid = patientIdFromUrl(); headerPage.clickOnHomeIcon(); homePage.clickOnFindPatientRecord(); findPatientPage.enterPatient("Bob Smith"); assertTrue(driver.getPageSource().contains(id)); findPatientPage.enterPatient(id); assertTrue(driver.getPageSource().contains(id)); }
@Ignore // ignored due to possible application logout @Test public void AddDiagnosisToVisitNoteTest() throws Exception { homePage.goToActiveVisitPatient(); patientDashboardPage.visitNote(); patientDashboardPage.enterDiagnosis("Pne"); patientDashboardPage.enterSecondaryDiagnosis("Bleed"); assertEquals("Pneumonia", patientDashboardPage.primaryDiagnosis()); assertEquals("Bleeding", patientDashboardPage.secondaryDiagnosis()); patientDashboardPage.save(); assertNotNull(patientDashboardPage.visitLink()); }
@Before public void setUp() throws Exception { homePage = new HomePage(driver); loginPage.loginAsAdmin(); assertPage(homePage); headerPage = new HeaderPage(driver); settingPage = new SettingPage(driver); administrationPage = new AdministrationPage(driver); manageUserPage = new ManageUserPage(driver); homePage.goToAdministration(); }