@TestFirst @Test(enabled = true) public void setBudgetTest() { secondaryBoard = board.getSecondaryBoard(); BudgetNavigator navigator = new BudgetNavigator(); navigator.selectRandomBudgetWithPrefix("budget7_144215547406"); innerBar = board.getInnerBar(); Assert.assertTrue(innerBar.isDisplayed(), "expected to inner bar to be dislayed"); secondaryBoard.openBudgetSettings(); BudgetSettings settings = new BudgetSettings(); String dateFrom = settings.getDateRangeFrom(); String dateTo = settings.getDateRangeTo(); settings.clickCancel(); fromMonth = BudgetaUtils.getMonthWithIndex(Integer.parseInt(dateFrom.split("/")[0])); fromYear = dateFrom.split("/")[1]; toMonth = BudgetaUtils.getMonthWithIndex(Integer.parseInt(dateTo.split("/")[0])); toYear = dateTo.split("/")[1]; List<String> expectedDates = BudgetaUtils.getAllMonthsBetweenTwoMonths(fromMonth, fromYear, toMonth, toYear, 0, false); innerBar.openViewTab(); Assert.assertEquals(innerBar.getOpenTab(), "View"); sheets = new Sheets(); Assert.assertTrue(sheets.isDisplayed(), "expected to View to be displayed"); dates = sheets.getAllDates(); Assert.assertEquals(dates.size(), expectedDates.size()); for (int i = 0; i < expectedDates.size(); i++) { Assert.assertEquals(dates.get(i), expectedDates.get(i)); } }
@TestFirst @Test(enabled = true) public void setBudgetTest() { BudgetNavigator navigator = new BudgetNavigator(); Assert.assertTrue(navigator.isDisplayed(), "expected to inner bar to be dislayed"); navigator.selectRandomBudgeta(); navigator.openInputTab(); topHeaderBar = new TopHeaderBar(); topHeaderBar.openActalsTab(); }