public void Position_RemoveRow_RowRemoved() { string day = "niedziela"; string begin = "8:00"; string end = "9:00"; string min = "1"; string max = "2"; LoginPageObject loginPage = new LoginPageObject(); MySchedPageObject mySchedPage = loginPage.Login("*****@*****.**", "admin"); MenuLayoutObject menu = new MenuLayoutObject(); PositionsPageObject positionsPage = menu.EnterPositions(); PositionPageObject positionPage = positionsPage.AddPosition(); positionPage.AddRow(day, begin, end, min, max); positionPage.AddPosition("tester"); positionsPage = menu.EnterPositions(); positionPage = positionsPage.EnterPosition(0); positionPage.deleteRow(0); positionPage.Save(); positionsPage = menu.EnterPositions(); positionPage = positionsPage.EnterPosition(0); Assert.That(() => positionPage.getDayName(0), Throws.Exception); }
public void Position_AddRow_RowAdded(string day, string begin, string end, string min, string max) { LoginPageObject loginPage = new LoginPageObject(); MySchedPageObject mySchedPage = loginPage.Login("*****@*****.**", "admin"); MenuLayoutObject menu = new MenuLayoutObject(); PositionsPageObject positionsPage = menu.EnterPositions(); PositionPageObject positionPage = positionsPage.AddPosition(); positionPage.AddRow(day, begin, end, min, max); positionPage.AddPosition("tester"); positionsPage = menu.EnterPositions(); positionPage = positionsPage.EnterPosition(0); string tday = positionPage.getDayName(0); string tbegin = positionPage.getBegin(0); string tend = positionPage.getEnd(0); string tmin = positionPage.getMin(0); string tmax = positionPage.getMax(0); StringAssert.IsMatch(day, tday); StringAssert.IsMatch(begin, tbegin); StringAssert.IsMatch(end, tend); StringAssert.IsMatch(min, tmin); StringAssert.IsMatch(max, tmax); }