Ejemplo n.º 1
0
        /*
         * Environnement:
         *  DEV: https://dev.bimtrack.co/en/Login
         *  QA: https://qa.bimtrack.co/en/Login
         *  PROD: https://bimtrackapp.co/en/Login (edited)
         */

        public void createUser()
        {
            KeyChain kc = CTX.keyChain;

            CTX.driver.Url = kc.UrlBimTrack;

            BTLogin login = new BTLogin();

            login.LogIn(kc.LoginUsername, kc.LoginPassword);

            BTHubsTracks btHubsTracks = new BTHubsTracks();
            ProjectList  prjList      = btHubsTracks.OpenHubByName(kc.HubName);

            prjList.SelectProject(kc.DefaultProject);

            MainProject mainProject = new MainProject();

            SideBarMenu sideBarMenu = mainProject.GetSidebarMenu();

            sideBarMenu.ClickMenuItem("Hub Settings");
            HubSettings        hubSettings = new HubSettings();
            UserManagementForm userForm    = hubSettings.ClickButtonAddUser();

            var emailSuffix = BimTrackUser.GetNewUserSuffix();
            var email       = BimTrackUser.GetUniqueUserEmail(emailSuffix);

            if (userForm.AddNewUser(new BimTrackUser(email, true)))
            {
                // PROCESS EMAIL
                BimEmailProcessor proc   = new BimEmailProcessor();
                string            szLink = null;
                while (szLink == null)
                {
                    szLink = proc.GetLatestActivationForUser(emailSuffix);
                    Console.Out.WriteLine("Loop waiting");
                    Thread.Sleep(1500);
                }

                Console.Out.WriteLine("SzLink == " + szLink);
                CTX.driver.Close();

                // Complete the user creation
                new CompleteUserFormTest().ActivateUser(szLink);

                //hubSettings.FillNewUserInformation(userSuffix, true);

                Thread.Sleep(1500);
            }

            CTX.driver.Close();
        }
Ejemplo n.º 2
0
        /*
         * Environnement:
         *  DEV: https://dev.bimtrack.co/en/Login
         *  QA: https://qa.bimtrack.co/en/Login
         *  PROD: https://bimtrackapp.co/en/Login (edited)
         */

        public void startBimTrack()
        {
//            CTX.driver.Url = "http://bimtrackapp.co";
            CTX.driver.Url = "https://qa.bimtrack.co/";

            BTLogin login = new BTLogin();

            login.LogIn("*****@*****.**", "Z3nt3l1499!");

            BTHubsTracks btHubsTracks = new BTHubsTracks();
            ProjectList  prjList      = btHubsTracks.OpenHubByName("ZenyTest");

            prjList.SelectProject("ZENPROJECT001");

            MainProject mainProject = new MainProject();

            SideBarMenu sideBarMenu = mainProject.GetSidebarMenu();

            sideBarMenu.ClickMenuItem("Hub Settings");
            HubSettings        hubSettings = new HubSettings();
            UserManagementForm userForm    = hubSettings.ClickButtonAddUser();

            var emailSuffix = BimTrackUser.GetNewUserSuffix();
            var email       = BimTrackUser.GetUniqueUserEmail(emailSuffix);

            userForm.AddNewUser(new BimTrackUser(email, true));

            // PROCESS EMAIL
            BimEmailProcessor proc   = new BimEmailProcessor();
            string            szLink = null;

            while (szLink == null)
            {
                szLink = proc.GetLatestActivationForUser(emailSuffix);
                Console.Out.WriteLine("Loop waiting");
                Thread.Sleep(1500);
            }

            Console.Out.WriteLine("SzLink == " + szLink);
            CTX.driver.Close();

            // Complete the user creation
            new CompleteUserFormTest().ActivateUser(szLink);

            //hubSettings.FillNewUserInformation(userSuffix, true);

            Thread.Sleep(1500);
            CTX.driver.Close();
        }