コード例 #1
0
        public void ApplicationBoard_UserProfile_Test_3()
        {
            using (var driver = new ChromeDriver())
            {
                /* Initialization */
                var wait = new WebDriverWait(driver, TimeSpan.FromSeconds(60));

                driver.Manage().Window.Maximize();
                driver.Navigate().GoToUrl("https://tms.lionbridge.com/");

                string       projectTitle = ""; // Project Name
                ProjectsPage testPage     = new ProjectsPage(driver, projectTitle);

                testPage.ClickChosenProject();
                ParticularProjectPage testProjectPage = new ParticularProjectPage(driver);

                ApplicationBoard applicationBoard = new ApplicationBoard(driver);
                applicationBoard.LoggedUserClick(driver);

                applicationBoard.ProfileClick(driver);

                /* Set of assertions */

                Assert.AreEqual(1, applicationBoard.ProfileActivityIsNull);
                Assert.AreEqual(-1, applicationBoard.ProfileActivityIsDisplayed);
                Assert.AreEqual(0, applicationBoard.ProfileWindowIsNull);
                Assert.AreEqual(1, applicationBoard.ProfileWindowIsDisplayed);
            }
        }
コード例 #2
0
        public void AssigneesPage_SectionSelected_Test_1()
        {
            using (var driver = new ChromeDriver())
            {
                /* Initialization */
                var wait = new WebDriverWait(driver, TimeSpan.FromSeconds(60));

                driver.Manage().Window.Maximize();
                driver.Navigate().GoToUrl("https://tms.lionbridge.com/");

                string       projectTitle = ""; // Project Name
                ProjectsPage testPage     = new ProjectsPage(driver, projectTitle);

                testPage.ClickChosenProject();
                ParticularProjectPage testProjectPage = new ParticularProjectPage(driver);

                testProjectPage.StatusClick(driver);
                StatusPage testStatusPage = new StatusPage(driver);

                testStatusPage.AssigneesClick(driver);
                AssigneesPage porscheAssigneesPage = new AssigneesPage(driver);

                /* Set of assertions */

                Assert.AreEqual(0, porscheAssigneesPage.IsActivitiesSelected);
                Assert.AreEqual(1, porscheAssigneesPage.IsAssigneesSelected);
            }
        }
コード例 #3
0
        public void MyProfile_DrobDownButtonClick_Test_1()
        {
            using (var driver = new ChromeDriver())
            {
                /* Initialization */
                var wait = new WebDriverWait(driver, TimeSpan.FromSeconds(60));

                driver.Manage().Window.Maximize();
                driver.Navigate().GoToUrl("https://tms.lionbridge.com/");

                string       projectTitle = ""; // Project Name
                ProjectsPage testPage     = new ProjectsPage(driver, projectTitle);

                testPage.ClickChosenProject();
                ParticularProjectPage testProjectPage = new ParticularProjectPage(driver);
                testProjectPage.ProfileClick(driver);

                MyProfile myProfile = new MyProfile(driver);

                /* Set of assertions */

                Assert.AreEqual(0, myProfile.ItemsDropDownListIsExpanded);

                myProfile.ItemsDropDownButtonClick(driver);
                Assert.AreEqual(1, myProfile.ItemsDropDownListIsExpanded);
            }
        }
        public void ParticularProjectPage_ProfileClick_Test_1()
        {
            using (var driver = new ChromeDriver())
            {
                /* Initialization */
                var wait = new WebDriverWait(driver, TimeSpan.FromSeconds(60));

                driver.Manage().Window.Maximize();
                driver.Navigate().GoToUrl("https://tms.lionbridge.com/");

                string       projectTitle = ""; // Project Name
                ProjectsPage testPage     = new ProjectsPage(driver, projectTitle);

                testPage.ClickChosenProject();
                ParticularProjectPage testProjectPage = new ParticularProjectPage(driver);

                testProjectPage.ProfileClick(driver);
                MyProfile testProfile = new MyProfile(driver);

                /* Set of assertions */

                Assert.IsFalse(testProfile.MyProfileBodyIsNull);
                Assert.AreEqual(0, testProfile.ItemsBodyIsNull);
                Assert.AreEqual(-1, testProfile.ItemsDropDownIsFull);
                Assert.AreEqual(-1, testProfile.ChosenItemsPerPage);
            }
        }
コード例 #5
0
        public void MyProfile_ParsingCorrectly_Test_1()
        {
            using (var driver = new ChromeDriver())
            {
                /* Initialization */
                var wait = new WebDriverWait(driver, TimeSpan.FromSeconds(60));

                driver.Manage().Window.Maximize();
                driver.Navigate().GoToUrl("https://tms.lionbridge.com/");

                string       projectTitle = ""; // Project Name
                ProjectsPage testPage     = new ProjectsPage(driver, projectTitle);

                testPage.ClickChosenProject();
                ParticularProjectPage testProjectPage = new ParticularProjectPage(driver);
                testProjectPage.ProfileClick(driver);

                MyProfile myProfile = new MyProfile(driver);

                /* Set of assertions */

                Assert.AreEqual(1, myProfile.MyProfileBodyIsDisplayed);
                Assert.AreEqual(1, myProfile.CloseButtonIsDisplayed);
                Assert.AreEqual(1, myProfile.ReduceButtonIsDisplayed);
                Assert.AreEqual(1, myProfile.FullscreenButtonIsDisplayed);
                Assert.AreEqual(1, myProfile.SaveButtonIsDisplayed);
                Assert.IsTrue(myProfile.IsParsingCorrect);
            }
        }
コード例 #6
0
        public void StatusPage_ParsingCorrectly_Test_2()
        {
            using (var driver = new ChromeDriver())
            {
                /* Initialization */
                var wait = new WebDriverWait(driver, TimeSpan.FromSeconds(60));

                driver.Manage().Window.Maximize();
                driver.Navigate().GoToUrl("https://tms.lionbridge.com/");

                string       projectTitle = "Corteva";
                ProjectsPage testPage     = new ProjectsPage(driver, projectTitle);

                testPage.ClickChosenProject();
                ParticularProjectPage testProjectPage = new ParticularProjectPage(driver);

                testProjectPage.StatusClick(driver);
                StatusPage testStatusPage = new StatusPage(driver);

                /* Set of assertions */

                Assert.IsTrue(testStatusPage.IsParsingCorrect);
                Assert.AreEqual("status", testStatusPage.GetPageName);

                Assert.AreEqual(1, testStatusPage.IsActivitiesSelected);
                Assert.AreEqual(0, testStatusPage.IsAssigneesSelected);

                Assert.AreEqual("", testStatusPage.ActivitiesFilterSelection);
                Assert.AreEqual("", testStatusPage.LanguagesFilterSelection);
            }
        }
        public void ParticularProjectPage_StatusClick_Test_2()
        {
            using (var driver = new ChromeDriver())
            {
                /* Initialization */
                string sectionName = "Status";
                var    wait        = new WebDriverWait(driver, TimeSpan.FromSeconds(60));

                driver.Manage().Window.Maximize();
                driver.Navigate().GoToUrl("https://tms.lionbridge.com/");

                string       projectTitle = ""; // Project Name
                ProjectsPage testPage     = new ProjectsPage(driver, projectTitle);

                testPage.ClickChosenProject();
                ParticularProjectPage testProjectPage = new ParticularProjectPage(driver);

                /* Set of assertions */

                testProjectPage.StatusClick(driver);
                testProjectPage = new ParticularProjectPage(driver);

                Assert.AreEqual(1, testProjectPage.StatusViewIsClicked);
                Assert.AreEqual(sectionName, testProjectPage.GetNameOfClickedView);

                IReadOnlyCollection <IWebElement> auxiliaryCollection = driver.FindElements(By.Id("sel_mnu_itm"));

                Assert.IsTrue(auxiliaryCollection.Count > 0);
                Assert.AreEqual(sectionName.ToLower().Trim(), auxiliaryCollection.ElementAt(0).Text.ToLower().Trim());
            }
        }
コード例 #8
0
        public void MenuLeftContent_ParsingCorrectly_Test_1()
        {
            using (var driver = new ChromeDriver())
            {
                /* Initialization */
                var wait = new WebDriverWait(driver, TimeSpan.FromSeconds(60));

                driver.Manage().Window.Maximize();
                driver.Navigate().GoToUrl("https://tms.lionbridge.com/");

                string       projectTitle = ""; // Project Name
                ProjectsPage testPage     = new ProjectsPage(driver, projectTitle);

                testPage.ClickChosenProject();
                ParticularProjectPage testProjectPage = new ParticularProjectPage(driver);

                TabMenu tabMenu = new TabMenu(driver);

                /* Set of assertions */

                Assert.AreEqual(false, tabMenu.TabMenuPanelIsNull);
                Assert.AreEqual(0, tabMenu.TabMenuOptionsIsNull);
                Assert.AreEqual(4, tabMenu.TabMenuOptionListCount);
                Assert.AreEqual(1, tabMenu.OpenedProjectsListCount);
                Assert.IsTrue(tabMenu.IsParsingCorrect);
            }
        }
コード例 #9
0
        public void PageBar_GoToNextPage_Test_1()
        {
            using (var driver = new ChromeDriver())
            {
                /* Initialization */
                var wait = new WebDriverWait(driver, TimeSpan.FromSeconds(60));

                driver.Manage().Window.Maximize();
                driver.Navigate().GoToUrl("https://tms.lionbridge.com/");

                string       projectTitle = "Qlik";
                ProjectsPage testPage     = new ProjectsPage(driver, projectTitle);

                testPage.ClickChosenProject();
                ParticularProjectPage testProjectPage = new ParticularProjectPage(driver);

                testProjectPage.ProfileClick(driver);
                testProjectPage.ChangeItemsPerPageMin(driver);

                testProjectPage.StatusClick(driver);
                StatusPage testStatusPage = new StatusPage(driver);

                PageBar testPageBar = new PageBar(driver);

                /* Set of assertions */

                Assert.AreEqual(0, testPageBar.CurrentPageIsNull);
                Assert.AreEqual(1, testPageBar.CurrentPageIsFirst);
                Assert.AreEqual(0, testPageBar.CurrentPageIsLast);

                Assert.AreEqual(1, testPageBar.GetCurrentPageNumber);
                Assert.AreEqual(1, testPageBar.PreviousPageIsNull);
                Assert.AreEqual(0, testPageBar.NextPageIsNull);
            }
        }
コード例 #10
0
        public void PageBar_ItemsPerPageSetMaxMinValue_Test_2()
        {
            using (var driver = new ChromeDriver())
            {
                /* Initialization */
                var wait = new WebDriverWait(driver, TimeSpan.FromSeconds(60));

                driver.Manage().Window.Maximize();
                driver.Navigate().GoToUrl("https://tms.lionbridge.com/");

                string       projectTitle = "Qlik";
                ProjectsPage testPage     = new ProjectsPage(driver, projectTitle);

                testPage.ClickChosenProject();
                ParticularProjectPage testProjectPage = new ParticularProjectPage(driver);

                testProjectPage.StatusClick(driver);
                StatusPage testStatusPage = new StatusPage(driver);

                PageBar testPageBar = new PageBar(driver);

                /* Set of assertions */

                Assert.IsTrue(testPageBar.IsParsingCorrect);
                Assert.AreEqual(0, testPageBar.ItemsPerPageOptionsContainerIsDisplayed);

                Assert.AreEqual("250", testPageBar.ItemsPerPageCurrentSelection);
                testPageBar.ItemsPerPageSetMinimalValue(driver);

                testPageBar = new PageBar(driver);

                Assert.AreEqual(0, testPageBar.ItemsPerPageOptionsContainerIsDisplayed);
                Assert.AreEqual("25", testPageBar.ItemsPerPageCurrentSelection);
            }
        }
コード例 #11
0
        public void ViewsMenu_ParsingCorrectly_Test_1()
        {
            using (var driver = new ChromeDriver())
            {
                /* Initialization */
                var wait = new WebDriverWait(driver, TimeSpan.FromSeconds(60));

                driver.Manage().Window.Maximize();
                driver.Navigate().GoToUrl("https://tms.lionbridge.com/");

                string       projectTitle = ""; // Project Name
                ProjectsPage testPage     = new ProjectsPage(driver, projectTitle);

                testPage.ClickChosenProject();
                ParticularProjectPage testProjectPage = new ParticularProjectPage(driver);

                ViewsMenu viewsMenu = new ViewsMenu(driver);

                /* Set of assertions */

                Assert.IsFalse(viewsMenu.ViewsPanelIsNull);
                //Assert.AreEqual(1, viewsMenu.ViewsListIsFull);
                //Assert.IsTrue(viewsMenu.IsParsingCorrect);
            }
        }
コード例 #12
0
        public void ViewsMenu_ViewClicked_Test_1()
        {
            using (var driver = new ChromeDriver())
            {
                /* Initialization */
                var wait = new WebDriverWait(driver, TimeSpan.FromSeconds(60));

                driver.Manage().Window.Maximize();
                driver.Navigate().GoToUrl("https://tms.lionbridge.com/");

                string       projectTitle = ""; // Project Name
                ProjectsPage testPage     = new ProjectsPage(driver, projectTitle);

                testPage.ClickChosenProject();
                ParticularProjectPage testProjectPage = new ParticularProjectPage(driver);

                ViewsMenu viewsMenu = new ViewsMenu(driver);

                /* Set of assertions */

                Assert.AreEqual(0, viewsMenu.JobsView.ButtonIsClicked);
                Assert.AreEqual(0, viewsMenu.PlanningView.ButtonIsClicked);
                Assert.AreEqual(0, viewsMenu.StatusView.ButtonIsClicked);
            }
        }
コード例 #13
0
        public void Assignees_ParsingCorrectly_Test_6()
        {
            using (var driver = new ChromeDriver())
            {
                /* Initialization */
                Assignee auxiliaryAssignee;
                var      wait = new WebDriverWait(driver, TimeSpan.FromSeconds(60));

                driver.Manage().Window.Maximize();
                driver.Navigate().GoToUrl("https://tms.lionbridge.com/");

                string       projectTitle = ""; // Project Name
                ProjectsPage testPage     = new ProjectsPage(driver, projectTitle);

                testPage.ClickChosenProject();
                ParticularProjectPage testProjectPage = new ParticularProjectPage(driver);

                testProjectPage.StatusClick(driver);
                StatusPage testStatusPage = new StatusPage(driver);

                testStatusPage.AssigneesClick(driver);
                AssigneesPage assigneesPage = new AssigneesPage(driver);

                PageBar assigneesPageBar = new PageBar(driver);
                assigneesPageBar.ItemsPerPageSetMaximalValue(driver);

                assigneesPage = new AssigneesPage(driver);
                assigneesPage.ChosenActivityClick(driver, "InternalReview");

                IReadOnlyCollection <IWebElement> r_LHObjects = driver.FindElements(By.ClassName("r_LH"));
                List <Assignee> assignees = new List <Assignee>();

                foreach (IWebElement r_LH in r_LHObjects)
                {
                    auxiliaryAssignee = new Assignee(r_LH);
                    assignees.Add(auxiliaryAssignee);
                }

                /* Set of assertions */

                Assert.AreNotEqual(0, assignees.Count);

                foreach (Assignee assignee in assignees)
                {
                    Assert.IsFalse(assignee.AssigneeNameObjectIsNull);
                    Assert.AreEqual(1, assignee.AssigneeNameObjectIsEnabled);
                    Assert.AreEqual(0, assignee.AssigneeJobsNumberIsNull);
                    Assert.AreEqual(true, assignee.IsParsingCorrect);

                    Assert.AreNotEqual("", assignee.GetAssigneeName);
                    Assert.AreNotEqual("", assignee.GetAssigneeJobsNumberString);
                    Assert.AreNotEqual(0, assignee.GetAssingeeJobsNumberInt);
                }
            }
        }
コード例 #14
0
        public void WholeProgram_NewParsingCorrectly_Test_2()
        {
            using (var driver = new ChromeDriver())
            {
                /* Initialization */
                var wait = new WebDriverWait(driver, TimeSpan.FromSeconds(60));

                driver.Manage().Window.Maximize();
                driver.Navigate().GoToUrl("https://tms.lionbridge.com/");

                string       projectName = ""; // Project Name
                ProjectsPage testPage    = new ProjectsPage(driver, projectName);

                testPage.ClickChosenProject();
                ParticularProjectPage testProjectPage = new ParticularProjectPage(driver);

                testProjectPage.ProfileClick(driver);
                testProjectPage.ChangeItemsPerPageMin(driver);

                ViewsMenu assigneesViewsMenu = new ViewsMenu(driver);
                assigneesViewsMenu.JobsView.ButtonClick();

                Thread.Sleep(5000);


                //IWebElement auxiliaryJob2 = driver.FindElements(By.ClassName("r_L")).ElementAt(2);



                //driver.FindElement(By.Id("jobsactivity")).Click();
                //Thread.Sleep(7000);
                //driver.FindElement(By.Id("SelectDeselectAll")).Click();
                //Thread.Sleep(7000);

                //auxiliaryJob.FindElement(By.TagName("div")).Click();
                //Thread.Sleep(7000);

                IWebElement auxiliaryJob = driver.FindElements(By.ClassName("r_L")).ElementAt(0);
                IReadOnlyCollection <IWebElement> childNodes = auxiliaryJob.FindElements(By.TagName("td"));

                ((IJavaScriptExecutor)driver).ExecuteScript("arguments[0].dispatchEvent(new Event('rowSelected'))", auxiliaryJob);

                Actions Action = new Actions(driver);

                for (int i = 0; i < 100; i++)
                {
                    Action.MoveToElement(auxiliaryJob).MoveByOffset(-100 - 1, 14).Click().Build().Perform();
                    Thread.Sleep(7000);
                }
                childNodes.ElementAt(0).Click();
                Thread.Sleep(7000);
            }
        }
コード例 #15
0
        public void StatusFilters_ChosenActivityClick_Test_2()
        {
            using (var driver = new ChromeDriver())
            {
                /* Initialization */
                var wait = new WebDriverWait(driver, TimeSpan.FromSeconds(60));

                driver.Manage().Window.Maximize();
                driver.Navigate().GoToUrl("https://tms.lionbridge.com/");

                string       projectTitle = "Corteva";
                ProjectsPage testPage     = new ProjectsPage(driver, projectTitle);

                testPage.ClickChosenProject();
                ParticularProjectPage testProjectPage = new ParticularProjectPage(driver);

                testProjectPage.ProfileClick(driver);
                testProjectPage.ChangeItemsPerPageMin(driver);

                testProjectPage.StatusClick(driver);
                StatusFilters statusFiltersTest = new StatusFilters(driver);

                statusFiltersTest.FiltersPanelInitialization(driver);
                statusFiltersTest.ChosenActivityClick(driver, "Buffer_For_FreewayReview_H");

                statusFiltersTest = new StatusFilters(driver);
                statusFiltersTest.FiltersPanelInitialization(driver);

                /* Set of assertions */

                Assert.IsFalse(statusFiltersTest.FiltersButtonIsNull);
                Assert.AreEqual(1, statusFiltersTest.FiltersButtonIsDisplayed);
                Assert.AreEqual(1, statusFiltersTest.FiltersButtonIsClicked);

                Assert.AreEqual(0, statusFiltersTest.FiltersPanelIsNull);
                Assert.AreEqual(1, statusFiltersTest.FiltersPanelIsDisplayed);

                Assert.AreEqual(0, statusFiltersTest.LanguageFilterIsNull);
                Assert.AreEqual(1, statusFiltersTest.LanguageFilterIsDisplayed);
                Assert.AreEqual(0, statusFiltersTest.LanguagesFilterIsExpanded);
                Assert.AreEqual("Target Language", statusFiltersTest.LanguageFilterSelection);

                Assert.AreEqual(0, statusFiltersTest.ActivitiesFilterIsNull);
                Assert.AreEqual(1, statusFiltersTest.ActivitiesFilterIsDisplayed);
                Assert.AreEqual(0, statusFiltersTest.ActivitiesFilterIsExpanded);
                Assert.AreEqual("Buffer_For_FreewayReview_H", statusFiltersTest.ActivitiesFilterSelection);

                Assert.IsFalse(statusFiltersTest.ShowAllButtonIsNull);
                Assert.AreEqual(1, statusFiltersTest.ShowAllButtonIsEnabled);
                Assert.AreEqual(0, statusFiltersTest.ShowAllButtonIsClicked);
            }
        }
コード例 #16
0
        public void PageBar_ParsingCorrectly_Test_2()
        {
            using (var driver = new ChromeDriver())
            {
                /* Initialization */
                var wait = new WebDriverWait(driver, TimeSpan.FromSeconds(60));

                driver.Manage().Window.Maximize();
                driver.Navigate().GoToUrl("https://tms.lionbridge.com/");

                string       projectTitle = "Qlik";
                ProjectsPage testPage     = new ProjectsPage(driver, projectTitle);

                testPage.ClickChosenProject();
                ParticularProjectPage testProjectPage = new ParticularProjectPage(driver);

                testProjectPage.ProfileClick(driver);
                testProjectPage.ChangeItemsPerPageMin(driver);

                testProjectPage.StatusClick(driver);
                StatusPage testStatusPage = new StatusPage(driver);

                testStatusPage.ActivitiesFilterClick(driver);
                testStatusPage.ChosenActivityClick(driver, "Buffer_for_FreewayReview_H");

                PageBar testPageBar = new PageBar(driver);

                /* Set of assertions */

                Assert.IsFalse(testPageBar.PageBarContainerIsNull);
                Assert.AreEqual(1, testPageBar.PageBarContainerIsDisplayed);

                Assert.AreEqual(0, testPageBar.NumberOfAllItemsIsNull);
                Assert.AreEqual(1, testPageBar.NumberOfAllItemsIsDisplayed);

                Assert.IsTrue(testPageBar.IsParsingCorrect);
                Assert.IsTrue(testPageBar.GetNumberOfAllItems > 0);

                Assert.AreEqual(1, testPageBar.PageNavigationContainerIsNull);

                Assert.AreEqual(-1, testPageBar.CurrentPageIsFirst);
                Assert.AreEqual(-1, testPageBar.GetCurrentPageNumber);

                Assert.AreEqual(-1, testPageBar.CurrentPageIsLast);
                Assert.AreEqual(-1, testPageBar.GetLastPageNumber);

                Assert.AreEqual(-1, testPageBar.NextPageIsNull);
                Assert.AreEqual(-1, testPageBar.PreviousPageIsNull);
            }
        }
コード例 #17
0
        public void AssigneeJobs_ParsingCorrectly_Test_3()
        {
            using (var driver = new ChromeDriver())
            {
                /* Initialization */
                var wait = new WebDriverWait(driver, TimeSpan.FromSeconds(60));

                driver.Manage().Window.Maximize();
                driver.Navigate().GoToUrl("https://tms.lionbridge.com/");

                string       projectTitle = "Corteva";
                ProjectsPage testPage     = new ProjectsPage(driver, projectTitle);

                testPage.ClickChosenProject();
                ParticularProjectPage testProjectPage = new ParticularProjectPage(driver);

                testProjectPage.StatusClick(driver);
                StatusPage testStatusPage = new StatusPage(driver);

                testStatusPage.AssigneesClick(driver);
                AssigneesPage porscheAssigneesPage = new AssigneesPage(driver);

                porscheAssigneesPage.ChosenActivityClick(driver, "Buffer_For_FreewayReview_H");
                porscheAssigneesPage = new AssigneesPage(driver);

                IReadOnlyCollection <IWebElement> r_LObjects = driver.FindElements(By.ClassName("r_L"));
                List <AssigneeJobs> assigneesJobs            = new List <AssigneeJobs>();

                AssigneeJobs auxiliaryAssigneesJob;

                /* Set of assertions */

                foreach (IWebElement r_L in r_LObjects)
                {
                    auxiliaryAssigneesJob = new AssigneeJobs(r_L);
                    assigneesJobs.Add(auxiliaryAssigneesJob);

                    Assert.AreEqual(0, auxiliaryAssigneesJob.JobsButtonIsNull);
                    Assert.IsFalse(auxiliaryAssigneesJob.JobsNameIsNull);
                    Assert.IsTrue(auxiliaryAssigneesJob.IsParsingCorrect);
                    Assert.AreNotEqual("", auxiliaryAssigneesJob.GetJobsName);
                    Assert.AreNotEqual("", auxiliaryAssigneesJob.GetSourceLanguage);
                    Assert.AreNotEqual("", auxiliaryAssigneesJob.GetTargetLanguage);
                }

                Assert.AreEqual(15, assigneesJobs.Count);
            }
        }
コード例 #18
0
        public void AssigneesAndJobs_TaggingSingleJob_Test_2()
        {
            using (var driver = new ChromeDriver())
            {
                /* Initialization */
                var wait = new WebDriverWait(driver, TimeSpan.FromSeconds(60));

                driver.Manage().Window.Maximize();
                driver.Navigate().GoToUrl("https://tms.lionbridge.com/");

                string       projectTitle = ""; // Project Name
                ProjectsPage testPage     = new ProjectsPage(driver, projectTitle);

                testPage.ClickChosenProject();
                ParticularProjectPage testProjectPage = new ParticularProjectPage(driver);

                testProjectPage.StatusClick(driver);
                StatusPage testStatusPage = new StatusPage(driver);

                testStatusPage.AssigneesClick(driver);
                AssigneesPage porscheAssigneesPage = new AssigneesPage(driver);

                porscheAssigneesPage.ChosenActivityClick(driver, "InternalReview");
                porscheAssigneesPage = new AssigneesPage(driver);

                AssigneesAndJobs asob    = new AssigneesAndJobs(driver);
                string           jobName = asob.GetListOfAssigneesJobNames.ElementAt(asob.GetAssigneeJobsListSize - 1);

                /* Set of assertions */

                asob.TagSingleJob(driver, asob.GetAssigneeJobsListSize - 1);

                porscheAssigneesPage = new AssigneesPage(driver);
                asob = new AssigneesAndJobs(driver);

                Assert.AreEqual(true, asob.IsParsingCorrect);
                Assert.AreNotEqual(0, asob.GetAssigneeJobsListSize);
                Assert.AreNotEqual(0, asob.GetAssigneesListSize);

                foreach (string searchJobName in asob.GetListOfAssigneesJobNames)
                {
                    Assert.AreEqual(jobName, searchJobName);
                }
            }
        }
コード例 #19
0
        public void AssigneesAndJobs_SelectingMultipleJobs_Test_4()
        {
            using (var driver = new ChromeDriver())
            {
                /* Initialization */
                var wait = new WebDriverWait(driver, TimeSpan.FromSeconds(60));

                driver.Manage().Window.Maximize();
                driver.Navigate().GoToUrl("https://tms.lionbridge.com/");

                string       projectTitle = ""; // Project Name
                ProjectsPage testPage     = new ProjectsPage(driver, projectTitle);

                testPage.ClickChosenProject();
                ParticularProjectPage testProjectPage = new ParticularProjectPage(driver);

                testProjectPage.StatusClick(driver);
                StatusPage testStatusPage = new StatusPage(driver);

                testStatusPage.AssigneesClick(driver);
                AssigneesPage porscheAssigneesPage = new AssigneesPage(driver);

                porscheAssigneesPage.ChosenActivityClick(driver, "InternalReview");
                porscheAssigneesPage = new AssigneesPage(driver);

                AssigneesAndJobs asob = new AssigneesAndJobs(driver);

                /* Set of assertions */

                asob.SelectMultipleJobs(driver, asob.GetAssigneeJobsListSize - 2, asob.GetAssigneeJobsListSize - 1);

                AssingeesOnClickJobsMenu testMenu = new AssingeesOnClickJobsMenu(driver);
                Assert.AreEqual(1, testMenu.MenuContainerIsDisplayed);

                foreach (AssigneeJobs assigneeJob in asob.assigneesJobsList.GetRange(asob.GetAssigneeJobsListSize - 2, 2))
                {
                    Assert.AreEqual(1, assigneeJob.JobIsSelected);
                }

                Assert.AreEqual(true, asob.IsParsingCorrect);
                Assert.AreNotEqual(0, asob.GetAssigneeJobsListSize);
                Assert.AreNotEqual(0, asob.GetAssigneesListSize);
            }
        }
コード例 #20
0
        public void AssigneesAndJobs_ParsingCorrectly_Test_2()
        {
            using (var driver = new ChromeDriver())
            {
                /* Initialization */
                var wait = new WebDriverWait(driver, TimeSpan.FromSeconds(60));

                driver.Manage().Window.Maximize();
                driver.Navigate().GoToUrl("https://tms.lionbridge.com/");

                string       projectTitle = ""; // Project Name
                ProjectsPage testPage     = new ProjectsPage(driver, projectTitle);

                testPage.ClickChosenProject();
                ParticularProjectPage testProjectPage = new ParticularProjectPage(driver);

                testProjectPage.StatusClick(driver);
                StatusPage testStatusPage = new StatusPage(driver);

                testStatusPage.AssigneesClick(driver);
                AssigneesPage porscheAssigneesPage = new AssigneesPage(driver);

                porscheAssigneesPage.ChosenActivityClick(driver, "InternalReview");
                porscheAssigneesPage = new AssigneesPage(driver);

                AssigneesAndJobs asob = new AssigneesAndJobs(driver);

                /* Set of assertions */

                Assert.IsFalse(asob.AssigneesListIsEmpty);
                Assert.AreNotEqual(0, asob.GetAssigneesListSize);

                Assert.IsFalse(asob.AssigneesJobsListIsEmpty);
                Assert.AreNotEqual(0, asob.GetAssigneeJobsListSize);

                Assert.AreNotEqual(0, asob.GetListOfAssigneeNames.Count);
                Assert.AreNotEqual(0, asob.GetListOfAssigneesJobNames.Count);
                Assert.AreNotEqual(0, asob.GetListOfJobsSourceLanguages.Count);
                Assert.AreNotEqual(0, asob.GetListOfJobsTargetLanguages.Count);

                Assert.IsTrue(asob.IsParsingCorrect);
            }
        }
コード例 #21
0
        public void StatusNavigationBat_AssigneesButton_Test_2()
        {
            using (var driver = new ChromeDriver())
            {
                /* Initialization */
                var wait = new WebDriverWait(driver, TimeSpan.FromSeconds(60));

                driver.Manage().Window.Maximize();
                driver.Navigate().GoToUrl("https://tms.lionbridge.com/");

                string       projectTitle = "Corteva";
                ProjectsPage testPage     = new ProjectsPage(driver, projectTitle);

                testPage.ClickChosenProject();
                ParticularProjectPage testProjectPage = new ParticularProjectPage(driver);

                testProjectPage.ProfileClick(driver);
                testProjectPage.ChangeItemsPerPageMin(driver);

                testProjectPage.StatusClick(driver);
                StatusNavigationBar testNavigationBar = new StatusNavigationBar(driver);

                testNavigationBar.AssigneesClick(driver);
                testNavigationBar = new StatusNavigationBar(driver);

                testNavigationBar.AssigneesClick(driver);
                testNavigationBar = new StatusNavigationBar(driver);

                /* Set of assertions */

                Assert.IsFalse(testNavigationBar.NavigationPanelIsNull);
                Assert.AreEqual(1, testNavigationBar.NavigationPanelIsDisplayed);
                Assert.AreEqual("status", testNavigationBar.GetPageName);

                Assert.AreEqual(0, testNavigationBar.ActivitiesSubpageIsNull);
                Assert.AreEqual(1, testNavigationBar.ActivitiesSubpageIsDisplayed);
                Assert.AreEqual(0, testNavigationBar.ActivitiesSubpageIsClicked);

                Assert.AreEqual(0, testNavigationBar.AssigneesSubpageIsNull);
                Assert.AreEqual(1, testNavigationBar.AssigneesSubpageIsDisplayed);
                Assert.AreEqual(1, testNavigationBar.AssigneesSubpageIsClicked);
            }
        }
コード例 #22
0
        public void MyProfile_ChangeNumberOfItems_Test_1()
        {
            using (var driver = new ChromeDriver())
            {
                /* Initialization */
                var wait = new WebDriverWait(driver, TimeSpan.FromSeconds(60));

                driver.Manage().Window.Maximize();
                driver.Navigate().GoToUrl("https://tms.lionbridge.com/");

                string       projectTitle = ""; // Project Name
                ProjectsPage testPage     = new ProjectsPage(driver, projectTitle);

                testPage.ClickChosenProject();
                ParticularProjectPage testProjectPage = new ParticularProjectPage(driver);

                testProjectPage.ProfileClick(driver);
                MyProfile myProfile = new MyProfile(driver);

                /* Set of assertions */

                myProfile.DropDownInitialization(driver);
                Assert.AreEqual(250, myProfile.ChosenItemsPerPage);

                myProfile.ChangeNumberOfItems(driver, 25);

                Assert.AreEqual(0, myProfile.MyProfileBodyIsDisplayed);

                driver.Navigate().Refresh();

                testPage = new ProjectsPage(driver, projectTitle);
                testPage.ClickChosenProject();

                testProjectPage = new ParticularProjectPage(driver);
                testProjectPage.ProfileClick(driver);

                myProfile = new MyProfile(driver);

                myProfile.DropDownInitialization(driver);
                Assert.AreEqual(25, myProfile.ChosenItemsPerPage);
            }
        }
コード例 #23
0
        public void AssingeesOnClickJobsMenu_ParsingCorrectly_Test_1()
        {
            using (var driver = new ChromeDriver())
            {
                /* Initialization */
                var wait = new WebDriverWait(driver, TimeSpan.FromSeconds(60));

                driver.Manage().Window.Maximize();
                driver.Navigate().GoToUrl("https://tms.lionbridge.com/");

                string       projectTitle = ""; // Project Name
                ProjectsPage testPage     = new ProjectsPage(driver, projectTitle);

                testPage.ClickChosenProject();
                ParticularProjectPage testProjectPage = new ParticularProjectPage(driver);

                testProjectPage.StatusClick(driver);
                StatusPage testStatusPage = new StatusPage(driver);

                testStatusPage.AssigneesClick(driver);
                AssigneesPage porscheAssigneesPage = new AssigneesPage(driver);

                IReadOnlyCollection <IWebElement> r_LObjects = driver.FindElements(By.ClassName("r_L"));
                List <AssigneeJobs> assigneesJobs            = new List <AssigneeJobs>();

                AssigneeJobs auxiliaryAssigneesJob = new AssigneeJobs(r_LObjects.ElementAt(0));
                assigneesJobs.Add(auxiliaryAssigneesJob);

                auxiliaryAssigneesJob.AssigneeJobButtonClick(driver);
                AssingeesOnClickJobsMenu testJobMenu = new AssingeesOnClickJobsMenu(driver);

                /* Set of assertions */

                Assert.IsFalse(testJobMenu.MenuContainerIsNull);
                Assert.AreEqual(1, testJobMenu.MenuContainerIsDisplayed);
                Assert.AreEqual(0, testJobMenu.TagJobButtonIsNull);
                Assert.AreEqual(1, testJobMenu.TagJobButtonIsEnabled);
            }
        }
コード例 #24
0
        public void ParticularProjectPage_ParsingCorrectly_Test_1()
        {
            using (var driver = new ChromeDriver())
            {
                /* Initialization */
                var wait = new WebDriverWait(driver, TimeSpan.FromSeconds(60));

                driver.Manage().Window.Maximize();
                driver.Navigate().GoToUrl("https://tms.lionbridge.com/");

                string       projectTitle = ""; // Project Name
                ProjectsPage testPage     = new ProjectsPage(driver, projectTitle);

                testPage.ClickChosenProject();
                ParticularProjectPage testProjectPage = new ParticularProjectPage(driver);

                /* Set of assertions */

                Assert.AreEqual(projectTitle.ToLower().Trim(), testProjectPage.GetSelectedProjectName);
                Assert.IsTrue(testProjectPage.IsParsingCorrect);
            }
        }
コード例 #25
0
        public void ParticularProjectPage_LoggedUserClick_Test_1()
        {
            using (var driver = new ChromeDriver())
            {
                /* Initialization */
                var wait = new WebDriverWait(driver, TimeSpan.FromSeconds(60));

                driver.Manage().Window.Maximize();
                driver.Navigate().GoToUrl("https://tms.lionbridge.com/");

                string       projectTitle = ""; // Project Name
                ProjectsPage testPage     = new ProjectsPage(driver, projectTitle);

                testPage.ClickChosenProject();
                ParticularProjectPage testProjectPage = new ParticularProjectPage(driver);

                /* Set of assertions */
                Assert.IsFalse(testProjectPage.UserActivitiesAreClicked);

                testProjectPage.LoggedUserClick(driver);
                Assert.IsTrue(testProjectPage.UserActivitiesAreClicked);
            }
        }
コード例 #26
0
        public void ApplicationBoard_LoggedUser_Test_1()
        {
            using (var driver = new ChromeDriver())
            {
                /* Initialization */
                var wait = new WebDriverWait(driver, TimeSpan.FromSeconds(60));

                driver.Manage().Window.Maximize();
                driver.Navigate().GoToUrl("https://tms.lionbridge.com/");

                string       projectTitle = ""; // Project Name
                ProjectsPage testPage     = new ProjectsPage(driver, projectTitle);

                testPage.ClickChosenProject();
                ParticularProjectPage testProjectPage = new ParticularProjectPage(driver);

                ApplicationBoard applicationBoard = new ApplicationBoard(driver);

                /* Set of assertions */

                Assert.AreEqual(0, applicationBoard.LoggedUserIsNull);
                Assert.AreEqual("Parol Aleksander", applicationBoard.GetUserName);
            }
        }
コード例 #27
0
        public void MenuLeftContent_CurrentProject_Test_1()
        {
            using (var driver = new ChromeDriver())
            {
                /* Initialization */
                var wait = new WebDriverWait(driver, TimeSpan.FromSeconds(60));

                driver.Manage().Window.Maximize();
                driver.Navigate().GoToUrl("https://tms.lionbridge.com/");

                string       projectTitle = ""; // Project Name
                ProjectsPage testPage     = new ProjectsPage(driver, projectTitle);

                testPage.ClickChosenProject();
                ParticularProjectPage testProjectPage = new ParticularProjectPage(driver);

                TabMenu tabMenu = new TabMenu(driver);

                /* Set of assertions */

                Assert.IsFalse(tabMenu.CurrentProjectIsNull);
                Assert.AreEqual("porsche bal 2.0", tabMenu.CurrentProjectName);
            }
        }
コード例 #28
0
        public void ParticularProjectPage_ChangingItemsPerPage_Test_1()
        {
            using (var driver = new ChromeDriver())
            {
                /* Initialization */
                var wait = new WebDriverWait(driver, TimeSpan.FromSeconds(60));

                driver.Manage().Window.Maximize();
                driver.Navigate().GoToUrl("https://tms.lionbridge.com/");

                string       projectTitle = ""; // Project Name
                ProjectsPage testPage     = new ProjectsPage(driver, projectTitle);

                testPage.ClickChosenProject();
                ParticularProjectPage testProjectPage = new ParticularProjectPage(driver);

                testProjectPage.ProfileClick(driver);
                testProjectPage.ChangeItemsPerPageMin(driver);

                /* Set of assertions */

                Assert.AreEqual("Your Profile has been saved successfully!", testProjectPage.GetInfoMessage);
            }
        }
コード例 #29
0
        public void AssingeeJobs_AssigneeJobButtonClick_Test_1()
        {
            using (var driver = new ChromeDriver())
            {
                /* Initialization */
                var wait = new WebDriverWait(driver, TimeSpan.FromSeconds(60));

                driver.Manage().Window.Maximize();
                driver.Navigate().GoToUrl("https://tms.lionbridge.com/");

                string       projectTitle = ""; // Project Name
                ProjectsPage testPage     = new ProjectsPage(driver, projectTitle);

                testPage.ClickChosenProject();
                ParticularProjectPage testProjectPage = new ParticularProjectPage(driver);

                testProjectPage.StatusClick(driver);
                StatusPage testStatusPage = new StatusPage(driver);

                testStatusPage.AssigneesClick(driver);
                AssigneesPage porscheAssigneesPage = new AssigneesPage(driver);

                IReadOnlyCollection <IWebElement> r_LObjects = driver.FindElements(By.ClassName("r_L"));
                List <AssigneeJobs> assigneesJobs            = new List <AssigneeJobs>();

                AssigneeJobs auxiliaryAssigneesJob = new AssigneeJobs(r_LObjects.ElementAt(0));
                assigneesJobs.Add(auxiliaryAssigneesJob);

                auxiliaryAssigneesJob.AssigneeJobButtonClick(driver);
                IWebElement dropDownElement = driver.FindElement(By.XPath("//*[@class=\"m1 lay_flt\"]"));

                /* Set of assertions */

                Assert.IsTrue(dropDownElement.Displayed);
            }
        }
コード例 #30
0
        public void AssigneesAndJobs_ListOfDifferentLanguages_Test_2()
        {
            using (var driver = new ChromeDriver())
            {
                /* Initialization */
                var wait = new WebDriverWait(driver, TimeSpan.FromSeconds(60));

                driver.Manage().Window.Maximize();
                driver.Navigate().GoToUrl("https://tms.lionbridge.com/");

                string       projectTitle = ""; // Project Name
                ProjectsPage testPage     = new ProjectsPage(driver, projectTitle);

                testPage.ClickChosenProject();
                ParticularProjectPage testProjectPage = new ParticularProjectPage(driver);

                testProjectPage.StatusClick(driver);
                StatusPage testStatusPage = new StatusPage(driver);

                testStatusPage.AssigneesClick(driver);
                AssigneesPage porscheAssigneesPage = new AssigneesPage(driver);

                porscheAssigneesPage.ChosenActivityClick(driver, "Agency_NoReview");
                porscheAssigneesPage = new AssigneesPage(driver);

                AssigneesAndJobs asob = new AssigneesAndJobs(driver);

                /* Set of assertions */

                Assert.AreEqual(asob.GetListOfAssigneesJobNames.Count, asob.GetListOfJobsAllSourceLanguages.Count);
                Assert.AreEqual(asob.GetListOfAssigneesJobNames.Count, asob.GetListOfJobsAllTargetLanguages.Count);

                Assert.AreEqual(2, asob.GetListOfJobsSourceLanguages.Count);
                Assert.AreEqual(15, asob.GetListOfJobsTargetLanguages.Count);
            }
        }