@Override protected void verifyTestCases() throws Exception { UserProfile userData = getTestOverviewData(); overviewTab.populateOverviewDetails(userData); overviewTab = overviewTab.saveOverviewDetails(); WaitFor.waitForPageToLoad( Page.driver, overviewTab.msg_SuccessAfterSave().getText(), overviewTab.neighborhoodlocator()); pageBanner = dashboard.pageBanner(); WaitFor.waitForPageToLoad(Page.driver, userData.getName(), pageBanner.getBannerTextLocater()); verifyUpdatedOverviewBanner(pageBanner, userData); verifyUpdatedOverviewTabForm(overviewTab, userData); verifyIfEmailFieldIsEditable(); verifyIfClickingSpecializedNeighborhoodsShowsDropDownToSelectNeighborhoods(); verifyIfMoreThanFiveNeighborhoodsCanBeAddedInSpecializedNeighborhoods(); }
public void verifyIfTheUserEnteredValidEmailAddress( ForgotPassword forgotpassword, HashMap<String, String> expectedEmailData) throws Exception { forgotpassword = populateEmailFieldAndRequestNewPassword(expectedEmailData); WaitFor.waitForPageToLoad( Page.driver, expectedEmailData.get("validMailNotReg"), forgotpassword.validEmailNotRegistered()); String validEmailAddress = forgotpassword.getMessageOfValidEmailNotReg(); Assert.assertEquals( validEmailAddress, expectedEmailData.get("validMailNotReg"), "Expected error message for valid email is not displayed in Forgot Password page"); AutomationLog.info( "Expected error message for valid email is displayed in Forgot Password page"); }
public void verifyIfClickingSpecializedNeighborhoodsShowsDropDownToSelectNeighborhoods() throws Exception { HashMap<String, String> getNeighborhood = testCaseData.get("NeighborHoods"); overviewTab.clearSpecializedNeighborhoodsTextBox(); addNeighborhoodsInSpecializedNeighborhoods(getNeighborhood); overviewTab.saveOverviewDetails(); WaitFor.waitForPageToLoad( Page.driver, overviewTab.msg_SuccessAfterSave().getText(), overviewTab.neighborhoodlocator()); List<String> neighbors = new ArrayList<String>(); List<WebElement> elements = overviewTab.addedNeighborhoods(); for (WebElement ele : elements) { neighbors.add(ele.getText()); } Assert.assertEquals( neighbors.contains(getNeighborhood.get("neighbor1")), true, "Excpected neighborhood is not added"); AutomationLog.info( "Clicking Specialized neighborhoods shows drop down to selects neighborhoods successfully"); }