public void Test_StudentFormGroupIdIsNotEdit(string groupId, string name, string lastName, int englishLevel, string entryScore, string approved) { studentForm.setGroupId(groupId) .setName(name) .setLastName(lastName) .setEnglishLevelDDL(englishLevel) .setEntryScore(entryScore) .setApprovedBy(approved) .SubmitButton.Click(); index = studentForm.LastNameField.GetAttribute("value"); expectedResult = studentForm.RememberStudent(); Assert.IsFalse(table.FindRowInTable(expectedResult)); }
public void Test_StudentFormGroupIdIsEdit() { studentForm.GroupIdField.Clear(); studentForm.setGroupId("DP-136-TAQC") .SubmitButton.Click(); expectedResult = studentForm.RememberStudent(); List <string> actualResult = table.getRowWithColumns(table.GetRowNumberByValueInCell(index, 2)); actualResult.RemoveAt(8); CollectionAssert.AreEqual(expectedResult, actualResult); }
public void Test_StudentFormGroupIdIsNotEdit(string groupId, string name, string lastName, int englishLevel, string entryScore, string approved) { studentForm.GroupIdField.Clear(); studentForm.setGroupId(groupId) .SubmitButton.Click(); expectedResult = studentForm.RememberStudent(); List <string> actualResult = table.getRowWithColumns(table.GetRowNumberByValueInCell(index, 2)); actualResult.RemoveAt(8); CollectionAssert.AreEqual(expectedResult, actualResult); }
public void Test_CreateStudent_Success(string groupId, string name, string lastName, int englishLevel, string entryScore, string approvedBy) { studentForm.setGroupId(groupId) .setName(name) .setLastName(lastName) .setEnglishLevelDDL(englishLevel) .setEntryScore(entryScore) .setApprovedBy(approvedBy); expectedResult = studentForm.RememberStudent(); index = studentForm.LastNameField.GetAttribute("value"); studentForm.SubmitButton.Click(); table = new Table(studentForm.GetTable); Assert.IsTrue(table.FindRowInTable(expectedResult)); }
public void Initialize() { wait = new WebDriverWait(driver, TimeSpan.FromSeconds(10)); driver.Manage().Window.Maximize(); driver.Url = @"http://*****:*****@"http://localhost:3000/admin"; wait.Until((d) => CreateEditStudentsForm.IsAdminPageOpened(d)); studentForm = new CreateEditStudentsForm(driver); studentForm.GoToStudents.Click(); studentForm.addStudents(); studentForm.IsOpened(wait); studentForm.setGroupId("DP-093-JS") .setName("Olga") .setLastName("Ivanova") .setEnglishLevelDDL(0) .setEntryScore("25") .setApprovedBy("N. Varenko") .SubmitButton.Click(); index = studentForm.LastNameField.GetAttribute("value"); }
public void Test_GroupIdFieldDisplayedText() { studentForm.setGroupId("someText"); Assert.AreEqual("someText", studentForm.GroupIdField.GetAttribute("value")); }