Beispiel #1
0
 public void CanLoginToUmbraco()
 {
     _backOffice = new BackOffice(WebSiteRoot, _browserType);
     _backOffice.Login(UserName, Password);
     //Assert.That(_backOffice.Selenium.Driver.Url,Is.EqualTo("https://dev.appstract.dk/umbraco#/umbraco"));
     Assert.Pass("Login passed");
 }
Beispiel #2
0
        public void CanGetContentTree()
        {
            _backOffice = new BackOffice(WebSiteRoot, _browserType);
            _backOffice.Login(UserName, Password);
            var contentMenu = _backOffice.Sections.Section(Sections.SectionEnum.Content);

            contentMenu.Click();
            PrintAllNodes(contentMenu.ContentTree.GetNodeByTitle("DK").ContentTree);
        }
Beispiel #3
0
        public void CanGetContentTreeRoot()
        {
            _backOffice = new BackOffice(WebSiteRoot, _browserType);
            _backOffice.Login(UserName, Password);
            var content = _backOffice.Sections.Section(Sections.SectionEnum.Content);

            foreach (var treeNode in content.ContentTree)
            {
                Console.WriteLine($"Root:{treeNode.Title} - {treeNode.ContentId}");
            }
        }
Beispiel #4
0
 public void CanGetSections()
 {
     _backOffice = new Selenium.Umbraco.BackOffice(WebSiteRoot, _browserType);
     _backOffice.Login(UserName, Password);
     foreach (var section in _backOffice.Sections)
     {
         Console.WriteLine($"Section:{section.Title}");
         section.Click();
         //Thread.Sleep(1000);
     }
 }
Beispiel #5
0
        public void CanClickOnContentTreeOptions()
        {
            _backOffice = new BackOffice(WebSiteRoot, _browserType);
            _backOffice.Login(UserName, Password);
            var content = _backOffice.Sections.Section(Sections.SectionEnum.Content);

            foreach (var treeNode in content.ContentTree)
            {
                Console.WriteLine($"Root:{treeNode.Title} - {treeNode.ContentId}");
                treeNode.Click();                 // tree node must be visible to be possible to click on its Options
                treeNode.Options.Click();
                Thread.Sleep(1000);
            }
        }
Beispiel #6
0
        public void CanGetContentForm()
        {
            _backOffice = new BackOffice(WebSiteRoot, _browserType);
            _backOffice.Login(UserName, Password);
            var content = _backOffice.Sections.Section(Sections.SectionEnum.Content);

            content.Click();
            var form = content.ContentTree.GetNodeByTitle("DK").ContentForm;

            foreach (var tab in form.Tabs)
            {
                Console.WriteLine($"Tab:'{tab.Title}'");
            }
        }
Beispiel #7
0
        public void CanGetSiteMap()
        {
            var webSiteRoot = "http://lbf.dev.appstract.dk";
            var userName    = "******";
            var password    = "******";

            _backOffice = new BackOffice(webSiteRoot, _browserType);
            _backOffice.Login(userName, Password);
            var content = _backOffice.Sections.Section(Sections.SectionEnum.Content);

            foreach (var child in content.ContentTree.Where(node => node.Title != "Recycle Bin"))
            {
                PrintAllUrls(child.ContentTree);
            }
        }
Beispiel #8
0
        void getStoreInfo()
        {
            //server side field validation totr ensure not too long or \
            //pw not over 25, greater than 5 characters, alphanumberic only letter and number plus
            string l_strEmail    = usernamefield.Text;
            string l_strPassword = passwordfield.Text;
            string l_strError    = "";

            errorLabel.Text = "";
            bool l_bValid = false;

            if (CyberpassReg.VerifyEmail(l_strEmail, out l_strError))
            {
                if (CyberpassReg.VerifyPassword(l_strPassword, out l_strError))
                {
                    l_bValid = true;
                }
            }
            if (l_bValid)
            {
                //login in the member. If they don't have a parent store, create one. Then save the ManageStore object to the session
                if (c_ManageStore.Login(usernamefield.Text, passwordfield.Text) == true)
                {
                    Session["UserNameField"] = usernamefield.Text;
                    Session["PasswordField"] = passwordfield.Text;

                    // Initialize the BrandBuilder object for use with the Subscription Plan code <CarlB 08-01-2018>
                    BackOffice l_BackOffice = new BackOffice("");
                    if (l_BackOffice.Login(Session["UserNameField"].ToString(), Session["PasswordField"].ToString()) == true)
                    {
                        Session["BackOffice"] = l_BackOffice.BrandBuilderInfo.Serialize();
                    }
                    else
                    {
                        Session["BackOffice"] = null;
                    }

                    c_Parents = c_ManageStore.StoreInfo.StoreInfoList;

                    if (c_Parents.Count > 0)
                    {
                        //It worked
                        if (c_Parents.Count > 1)
                        {
                            //they need to pick what parent they would like to manage
                            global.SaveManageStore(c_ManageStore.StoreInfo);
                        }
                        else
                        {
                            StoreInformationServer l_Parent = (CBQ.StoreInformationServer)c_Parents[0];

                            Session["parent"] = l_Parent.Serialize();

                            //might be a better place for this. This should be the only place this happens, but might want to put this out at global
                            //this really needs to pull from the database so we will do that instead, using parameterized queries of course
                            if (l_Parent.SalesAgentID == "palmetto01")
                            {
                                Session["partnerID"] = "1";
                                handleBrand();
                            }
                            else if (l_Parent.SalesAgentID == "ignite01")
                            {
                                Session["partnerID"] = "2";
                                handleBrand();
                            }
                            else if (l_Parent.SalesAgentID == "cbq")
                            {
                                Session["partnerID"] = "0";
                                handleBrand();
                            }
                            else if (l_Parent.SalesAgentID == "blackstone01")
                            {
                                Session["partnerID"] = "3";
                                handleBrand();
                            }
                            else if (l_Parent.SalesAgentID == "vantiv01")
                            {
                                Session["partnerID"] = "4";
                                handleBrand();
                            }
                            else if (l_Parent.SalesAgentID == "globalpayments01")
                            {
                                Session["partnerID"] = "5";
                                handleBrand();
                            }
                            else if (l_Parent.SalesAgentID == "usacard01")
                            {
                                Session["partnerID"] = "6";
                                handleBrand();
                            }

                            global.SaveManageStore(c_ManageStore.StoreInfo);
                        }
                    }
                    else
                    {
                        l_strError = "Your Login Is Correct But There Was An Error Generating Your Store. Please Contact Us.";
                        showError(l_strError);
                    }
                }
                else
                {
                    l_strError = "Your Login Information is Incorrect. Please Try Again.";
                    showError(l_strError);
                }
            }
            else
            {
                //display an error. message is in l_strError
                showError(l_strError);
            }
        }