예제 #1
0
        public override void TestInitialize()
        {
            this.usersPage = new UsersPage();

            LoginSteps.LoginAdmin();
            NavigateTo.Page(this.usersPage);
            this.Browser.WaitUntilReady();
        }
예제 #2
0
 public void FilterPopupCancelButton_ShouldCloseThePopup()
 {
     LoginSteps.LoginAdmin();
     this.usersPage.NavigateTo();
     this.usersPage.OpenFilteringPopUp();
     this.usersPage.FilterPopup.Elements.PopupCancelButton.Click();
     this.usersPage.FilterPopup.Validator.FilterUsersPopupIsClosed();
 }
예제 #3
0
        public void FilterUsersByInvalidId_ShouldResultAnError()
        {
            LoginSteps.LoginAdmin();
            this.usersPage.NavigateTo();
            var id = this.usersPage.GetFirstUserId();

            this.usersPage.FilterUsersById(id + 10);
            this.usersPage.FilterPopup.Validator.FilterUsersPopupIsOpened();
        }
예제 #4
0
        public void FilterUsersByEmail_ShouldProceedCorrectly()
        {
            LoginSteps.LoginAdmin();
            this.usersPage.NavigateTo();
            var email = this.usersPage.GetFirstUserEmail();

            this.usersPage.FilterUsersByEmail(email);
            this.usersPage.Validator.UsersPresentByEmail(email);
        }
예제 #5
0
        public void FilterUsersByUsername_ShouldProceedCorrectly()
        {
            LoginSteps.LoginAdmin();
            this.usersPage.NavigateTo();
            var username = this.usersPage.GetFirstUserUsername();

            this.usersPage.FilterUsersByUsername(username);
            this.usersPage.Validator.UsersPresentByUsername(username);
        }
예제 #6
0
        public void FilterUsersById_ShouldProceedCorrectly()
        {
            LoginSteps.LoginAdmin();
            this.usersPage.NavigateTo();
            var id = this.usersPage.GetFirstUserId();

            this.usersPage.FilterUsersById(id);
            this.usersPage.Validator.UsersPresentdById(id);
        }
예제 #7
0
        public void DeleteUserFuction_ShouldDeleteUsersSuccessfully()
        {
            var username = this.registrationPage.RegisterUniqueUser(RegistrationUsers.GetValidTemplate());

            LoginSteps.LoginAdmin();
            this.usersPage.NavigateTo();
            this.usersPage.DeleteUser(username);
            this.usersPage.Validator.UserIsDeleted(username);
        }
예제 #8
0
        public void EditUserButton_ShouldOpenEditFormCorrectly()
        {
            LoginSteps.LoginAdmin();
            this.usersPage.NavigateTo();
            this.usersPage.OpenFirstUserEditPopUp();
            string username = this.usersPage.GetFirstUserUsername();

            this.usersPage.EditPopup.Validator.EditUserPopupIsOpened(username);
        }
예제 #9
0
        public void CancelEditUserButton_ShouldCloseEditFormCorrectly()
        {
            LoginSteps.LoginAdmin();
            this.usersPage.NavigateTo();
            this.usersPage.OpenFirstUserEditPopUp();
            string username = this.usersPage.GetFirstUserUsername();

            this.usersPage.EditPopup.Validator.EditUserPopupIsOpened(username);
            this.usersPage.EditPopup.Elements.CancelButton.Click();
            this.usersPage.EditPopup.Validator.EditUserPopupIsClosed();
        }
예제 #10
0
        public void AddRoleWithValidData()
        {
            LoginSteps.LoginAdmin();
            NavigateTo.Url(this.rolesPage.Url);
            this.rolesPage.Elements.AnchorAddNewRole.Click();
            this.rolesPage.Elements.Name.Text = VadlidName;
            this.rolesPage.Elements.UpdateButton.Click();

            var text = this.Browser.ViewSourceString;

            bool result = text.Contains(VadlidName);

            Assert.IsTrue(result);
        }
예제 #11
0
        public void AddTownWithValidData()
        {
            LoginSteps.LoginAdmin();
            NavigateTo.Url(this.TownsPage.Url);
            // this.Browser.RefreshDomTree();
            //this.TownsPage.Elements.AnchorAddNewTown.Wait.ForExists(5000);
            this.TownsPage.Elements.AnchorAddNewTown.Click();
            this.TownsPage.Elements.NameBulgarian.Text = ValidNameBulgarian;
            this.TownsPage.Elements.NameEnglish.Text   = ValidNameEnglish;
            this.TownsPage.Elements.UpdateButton.Click();

            var text = this.Browser.ViewSourceString;

            bool result = text.Contains(ValidNameBulgarian);

            Assert.IsTrue(result);
        }
        public void AddNewUniversityWithValidData()
        {
            LoginSteps.LoginAdmin();
            NavigateTo.Url(this.universitiesPage.Url);
            this.universitiesPage.Elements.AnchorAddNewTown.Click();
            this.universitiesPage.Elements.Name.Text    = ValidName;
            this.universitiesPage.Elements.Website.Text = ValidWebSite;
            //   this.universitiesPage.Elements.Order.Text = ValidOrder;
            Thread.Sleep(10000);
            this.Browser.RefreshDomTree();
            this.universitiesPage.Elements.UpdateButton.Click();
            var text = this.Browser.ViewSourceString;

            bool result = text.Contains(ValidName);

            Assert.IsTrue(result);
        }
예제 #13
0
 public void EditUserWithValidDetails_ShouldProceedCorrectly()
 {
     LoginSteps.LoginAdmin();
     this.usersPage.NavigateTo();
     this.usersPage.EditFirstUser(TestUsersDetails.GetValidDetails());
 }