Example #1
0
 public void ExecuteTest_ImportStudentList_ListImported()
 {
     mainPageInstance.ModalWindow.EditStudentListWindow.ImportStudentsButton.Click();
     path = EditStudentListWindow.GetTestFile("TC_3_06_01-03.txt");
     Acts.UploadFile(path);
     mainPageInstance.ModalWindow.EditStudentListWindow.SaveFormButton.Click();
     Assert.AreEqual(4, mainPageInstance.ModalWindow.EditStudentListWindow.Students.Count);
 }
Example #2
0
 public void ExecuteTest_ImportStudentList_ListNotImported()
 {
     mainPageInstance.ModalWindow.EditStudentListWindow.ImportStudentsButton.Click();
     path = EditStudentListWindow.GetTestFile("TC_3_06_05.docx");
     Acts.UploadFile(path);
     wait.Until((d) => EditStudentListWindow.IsNotEmpty(d));
     Assert.AreEqual(0, mainPageInstance.ModalWindow.EditStudentListWindow.Students.Count);
 }
Example #3
0
 public void ExecuteTest_ImportStudentList_CorrectDataImported()
 {
     mainPageInstance.ModalWindow.EditStudentListWindow.ImportStudentsButton.Click();
     path = EditStudentListWindow.GetTestFile("TC_3_06_04.csv");
     Acts.UploadFile(path);
     wait.Until((d) => EditStudentListWindow.IsOpened(d));
     mainPageInstance.ModalWindow.EditStudentListWindow.SaveFormButton.Click();
     Assert.AreEqual(1, mainPageInstance.ModalWindow.EditStudentListWindow.Students.Count);
 }
Example #4
0
        public void ExecuteTest_DropStudentList_ListImported()
        {
            path = EditStudentListWindow.GetTestFile("TC_3_06_01-03.txt");
            IWebElement droparea = webDriver.FindElement(By.ClassName("modal_editStudentlist"));

            Acts.DropFile(droparea, path);
            mainPageInstance.ModalWindow.EditStudentListWindow.SaveFormButton.Click();
            Assert.AreEqual(4, mainPageInstance.ModalWindow.EditStudentListWindow.Students.Count);
        }
Example #5
0
        public void ExecuteTest_DeclieStudentList_ListNotImported()
        {
            mainPageInstance.ModalWindow.EditStudentListWindow.ImportStudentsButton.Click();
            path = EditStudentListWindow.GetTestFile("TC_3_06_01-03.txt");
            Acts.UploadFile(path);
            wait.Until((d) => EditStudentListWindow.IsNotEmpty(d));
            mainPageInstance.ModalWindow.EditStudentListWindow.ExitFormButton.Click();
            IList <IWebElement> rowsInTable = mainPageInstance.CenterContainer.StudentsContent.StudentTable.GetRows();
            string expected = "";
            string actual   = "";

            foreach (var row in rowsInTable)
            {
                actual += row.Text;
            }
            Assert.AreEqual(expected, actual);
        }