Exemplo n.º 1
0
        public void Person_SetWorkDayWithInCorrectValues_SetedWorkDay(int day, string begin, string end)
        {
            String            personValues = "test";
            LoginPageObject   loginPage    = new LoginPageObject();
            MySchedPageObject mySchedPage  = loginPage.Login("*****@*****.**", "admin");
            MenuLayoutObject  menu         = new MenuLayoutObject();
            PeoplePageObject  peoplePage   = menu.EnterPeople();
            PersonPageObject  personPage;

            string id = "0";

            try
            {
                id = peoplePage.GetCellContent(0, 0);
            }
            catch { }
            peoplePage.AddPerson(personValues, personValues, personValues + id + "@" + personValues + id + ".pl", "1qazxsw2", "1");
            SeleniumUtilityMethods.WaitForJavascript();
            personPage = peoplePage.EneterPerson(0);

            personPage.setWorkDay(day, begin, end);
            personPage.Save();
            peoplePage = menu.EnterPeople();
            personPage = peoplePage.EneterPerson(0);

            Boolean isworking = personPage.isWorkDay(day);

            Assert.That(isworking == false);
        }
Exemplo n.º 2
0
        public void Person_SetWorkDayWithCorrectValues_SetedWorkDay(int day, string begin, string end)
        {
            String            personValues = "test";
            LoginPageObject   loginPage    = new LoginPageObject();
            MySchedPageObject mySchedPage  = loginPage.Login("*****@*****.**", "admin");
            MenuLayoutObject  menu         = new MenuLayoutObject();
            PeoplePageObject  peoplePage   = menu.EnterPeople();
            PersonPageObject  personPage;

            string id = "0";

            try
            {
                id = peoplePage.GetCellContent(0, 0);
            }
            catch { }
            peoplePage.AddPerson(personValues, personValues, personValues + id + "@" + personValues + id + ".pl", "1qazxsw2", "1");
            SeleniumUtilityMethods.WaitForJavascript();
            personPage = peoplePage.EneterPerson(0);

            personPage.setWorkDay(day, begin, end);
            personPage.Save();
            peoplePage = menu.EnterPeople();
            personPage = peoplePage.EneterPerson(0);

            string nbegin = personPage.getDayBegin(day);
            string nend   = personPage.getDayEnd(day);

            StringAssert.IsMatch(begin, nbegin);
            StringAssert.IsMatch(end, nend);
        }
Exemplo n.º 3
0
        public void Person_ChangeDataToAnotherInCorrectValue_DataChanged(string name, string surname, string email, string password, string hours)
        {
            String            personValues = "test";
            LoginPageObject   loginPage    = new LoginPageObject();
            MySchedPageObject mySchedPage  = loginPage.Login("*****@*****.**", "admin");
            MenuLayoutObject  menu         = new MenuLayoutObject();
            PeoplePageObject  peoplePage   = menu.EnterPeople();
            PersonPageObject  personPage;

            string id = "0";

            try
            {
                id = peoplePage.GetCellContent(0, 0);
            }
            catch { }
            peoplePage.AddPerson(personValues, personValues, personValues + id + "@" + personValues + id + ".pl", "1qazxsw2", "1");
            SeleniumUtilityMethods.WaitForJavascript();
            personPage = peoplePage.EneterPerson(0);

            personPage.setData(name, surname, email, hours, false, password);
            personPage.Save();
            peoplePage = menu.EnterPeople();
            personPage = peoplePage.EneterPerson(0);

            string nname    = personPage.getName();
            string nsurname = personPage.getSurname();
            string nemail   = personPage.getEmail();
            string nhours   = personPage.getHours();

            StringAssert.DoesNotMatch(name, nname);
            StringAssert.DoesNotMatch(surname, nsurname);
            StringAssert.DoesNotMatch(email, nemail);
            StringAssert.DoesNotMatch(hours, nhours);
        }
Exemplo n.º 4
0
        public void People_Filter_TableFiltered(string filtrName, string filtrSurname, string personValues, Boolean result)
        {
            LoginPageObject   loginPage   = new LoginPageObject();
            MySchedPageObject mySchedPage = loginPage.Login("*****@*****.**", "admin");
            MenuLayoutObject  menu        = new MenuLayoutObject();
            PeoplePageObject  peoplePage  = menu.EnterPeople();

            string id = "0";

            try
            {
                id = peoplePage.GetCellContent(0, 0);
            }
            catch {}

            peoplePage.AddPerson(personValues, personValues, personValues + id + "@" + personValues + id + ".pl", "1qazxsw2", "1");
            SeleniumUtilityMethods.WaitForJavascript();
            string tId = peoplePage.GetCellContent(0, 0);

            peoplePage.setFilter(filtrName, filtrSurname);
            SeleniumUtilityMethods.WaitForJavascript();
            string nId = "";

            try
            {
                nId = peoplePage.GetCellContent(0, 0);
            }
            catch { }

            Assert.That(result == (tId == nId));
        }
Exemplo n.º 5
0
        public void People_AddWithInCorrectValues_PersonNotAdded(string name, string surname, string email, string password, string hours)
        {
            LoginPageObject   loginPage   = new LoginPageObject();
            MySchedPageObject mySchedPage = loginPage.Login("*****@*****.**", "admin");
            MenuLayoutObject  menu        = new MenuLayoutObject();
            PeoplePageObject  peoplePage  = menu.EnterPeople();

            string id = "";

            try
            {
                id = peoplePage.GetCellContent(0, 0);
            }
            catch { }

            peoplePage.AddPerson(name, surname, id + email, password, hours);
            SeleniumUtilityMethods.WaitForJavascript();

            string nid = "";

            try
            {
                nid = peoplePage.GetCellContent(0, 0);
            }
            catch { }

            StringAssert.IsMatch(id, nid);
        }
Exemplo n.º 6
0
        public void People_ClickRow_EnteredPersonPage(int row)
        {
            String            personValues = "test";
            LoginPageObject   loginPage    = new LoginPageObject();
            MySchedPageObject mySchedPage  = loginPage.Login("*****@*****.**", "admin");
            MenuLayoutObject  menu         = new MenuLayoutObject();
            PeoplePageObject  peoplePage   = menu.EnterPeople();
            PersonPageObject  personPage;

            string id = "0";

            try
            {
                id = peoplePage.GetCellContent(0, 0);
            }
            catch { }
            peoplePage.AddPerson(personValues, personValues, personValues + id + "@" + personValues + id + ".pl", "1qazxsw2", "1");
            SeleniumUtilityMethods.WaitForJavascript();
            personPage = peoplePage.EneterPerson(row);

            Assert.That(() => personPage.getEmail(), Throws.Nothing);
        }