Example #1
0
        public void TestQA()
        {
            InitDriver(this);
            HomePage homePage = new HomePage(Driver);

            string         department     = "Quality Assurance";
            DepartmentPage departmentPage = homePage.SelectDepartment("it")
                                            .SelectSubDepartment(department);
            Dictionary <string, Offer> jobOffers = departmentPage.GetJobOffers(department);

            foreach (KeyValuePair <string, Offer> offer in jobOffers)
            {
                departmentPage = departmentPage.OpenJobOfferDetail(offer.Value, department)
                                 .CheckOffer(offer.Value)
                                 .BackToDepartmentPage();
            }
        }
Example #2
0
        public async Task <IActionResult> Page(Guid id, bool draft = false)
        {
            try
            {
                var model = await _loader.GetPageAsync <StandardPage>(id, HttpContext.User, draft);

                if (model != null)
                {
                    return(View(model));
                }
                else
                {
                    DepartmentPage model2 = await _loader.GetPageAsync <DepartmentPage>(id, HttpContext.User, draft);

                    return(View("DepartmentPage", model2));
                }
            }
            catch (UnauthorizedAccessException)
            {
                return(Unauthorized());
            }
        }