Ejemplo n.º 1
0
        public void Menu_ByGuest_NoButtons()
        {
            //LoginPageObject loginPage = new LoginPageObject();
            //MySchedPageObject mSchedPage = loginPage.Login("*****@*****.**", "user");
            MenuLayoutObject menu = new MenuLayoutObject();

            menu.OpenMenu();

            Assert.That(() => menu.btnDataPage.Text, Throws.Exception);
            Assert.That(() => menu.btnMySchedulePage.Text, Throws.Exception);
            Assert.That(() => menu.btnLeavePage.Text, Throws.Exception);
            Assert.That(() => menu.btnPeoplePage.Text, Throws.Exception);
            Assert.That(() => menu.btnSchedulesPage.Text, Throws.Exception);
            Assert.That(() => menu.btnPositionsPage.Text, Throws.Exception);
        }
Ejemplo n.º 2
0
        public void Menu_ByUser_ThreeBtons()
        {
            LoginPageObject   loginPage  = new LoginPageObject();
            MySchedPageObject mSchedPage = loginPage.Login("*****@*****.**", "user1");
            MenuLayoutObject  menu       = new MenuLayoutObject();

            menu.OpenMenu();

            string myData     = menu.btnDataPage.Text;
            string mySchedule = menu.btnMySchedulePage.Text;
            string leave      = menu.btnLeavePage.Text;

            StringAssert.IsMatch("Moje", myData);
            StringAssert.IsMatch("Mój Grafik", mySchedule);
            StringAssert.IsMatch("Urlopy", leave);
            Assert.That(() => menu.btnPeoplePage.Text, Throws.Exception);
            Assert.That(() => menu.btnSchedulesPage.Text, Throws.Exception);
            Assert.That(() => menu.btnPositionsPage.Text, Throws.Exception);
        }
Ejemplo n.º 3
0
        public void Menu_ByAdmin_AllButtons()
        {
            LoginPageObject   loginPage  = new LoginPageObject();
            MySchedPageObject mSchedPage = loginPage.Login("*****@*****.**", "admin");
            MenuLayoutObject  menu       = new MenuLayoutObject();

            menu.OpenMenu();

            string myData     = menu.btnDataPage.Text;
            string mySchedule = menu.btnMySchedulePage.Text;
            string peoples    = menu.btnPeoplePage.Text;
            string schedules  = menu.btnSchedulesPage.Text;
            string positions  = menu.btnPositionsPage.Text;
            string leave      = menu.btnLeavePage.Text;

            StringAssert.IsMatch("Moje Dane", myData);
            StringAssert.IsMatch("Mój Grafik", mySchedule);
            StringAssert.IsMatch("Pracownicy", peoples);
            StringAssert.IsMatch("Grafiki", schedules);
            StringAssert.IsMatch("Stanowiska", positions);
            StringAssert.IsMatch("Urlopy", leave);
        }