@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 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"); }