예제 #1
0
        // This test cant be run in parallel across browsers because agendas in the Meeting Agenda dropdown may get mixed up between parallel runs.
        // See RCPSC-547 for the status of a redesign that would fix that
        public void LearnerStageLabelReflectsPromotion()
        {
            // Only running this test in Chrome because it is a long test and we can not run it in parallel. Whenever JIRA task
            // https://code.premierinc.com/issues/browse/RCPSC-547 is complete, we can run this test in parallel because
            // the UI will be redesigned so that the agendas will not get mixed up during parallel runs
            if (BrowserName == BrowserNames.Chrome)
            {
                /// 1. Login as a program admin
                LoginPage        LP = Navigation.GoToLoginPage(browser);
                CBDProgAdminPage PP = LP.LoginAsExistingUser(UserUtils.UserRole.PA, UserUtils.ProgAdmin1Login, ConfigurationManager.AppSettings["LoginPassword"]);

                /// 2. Create an upcoming agenda, then choose this agenda in the Meeting Agenda dropdown
                /// 4. Click on the Set Status button and then set the status of the learner to stage 2
                /// 5. Finalize the Agenda
                PP.CreateChangeAndFinalizeAgendaForLearner(learner1FullNamePerBrowser, "Reviewed", "High", "_TA_AStatic User_CC_001", "Progressing as Expected",
                                                           "Promote Learner - to Stage 3");

                /// 6. Log out then log back in as the learner
                PP.ClickAndWaitBasePage(PP.LogoutLnk);
                Navigation.GoToLoginPage(browser);
                CBDLearnerPage CLP = LP.LoginAsExistingUser(UserUtils.UserRole.LR, learner1LoginPerBrowser, ConfigurationManager.AppSettings["LoginPassword"]);

                /// 7. Assert that the text to the right of the Program label reflects the change to stage 2
                Assert.True(CLP.CurrentStageValueLbl.Text.Contains("Core of Discipline"));

                // Cleanup data by setting the learner back to stage 2
                PP.ClickAndWaitBasePage(PP.LogoutLnk);
                Navigation.GoToLoginPage(browser);
                LP.LoginAsExistingUser(UserUtils.UserRole.PA, UserUtils.ProgAdmin1Login, ConfigurationManager.AppSettings["LoginPassword"]);
                PP.CreateChangeAndFinalizeAgendaForLearner(learner1FullNamePerBrowser, null, null, null, "Progressing as Expected",
                                                           "Promote Learner - to Stage 2");
            }
        }
        // This cant be run in parallel across browsers because agendas in the Meeting Agenda dropdown may get mixed up between parallel runs. See RCPSC-547
        // for the status of a redesign that would fix that
        //[NonParallelizable]
        public void LearnerStageLabelReflectsPromotion()
        {
            /// 1. Login as a program admin
            LoginPage        LP = Navigation.GoToLoginPage(browser);
            CBDProgAdminPage PP = LP.LoginAsExistingUser(UserUtils.UserRole.PA, UserUtils.ProgAdmin1Login, "test");

            /// 2. Create an upcoming agenda, then choose this agenda in the Meeting Agenda dropdown
            /// 4. Click on the Set Status button and then set the status of the learner to stage 2
            /// 5. Finalize the Agenda
            PP.CreateChangeAndFinalizeAgendaForLearner(learnerFullNamePerBrowser, "Reviewed", "High", "_TA_AStatic User_CC_001", "Progressing as Expected",
                                                       "Promote Learner - to Stage 3");

            /// 6. Log out then log back in as the learner
            PP.ClickAndWait(PP.LogoutLnk);
            Navigation.GoToLoginPage(browser);
            CBDLearnerPage CLP = LP.LoginAsExistingUser(UserUtils.UserRole.LR, learnerLoginPerBrowser, "test");

            /// 7. Assert that the text to the right of the Program label reflects the change to stage 2
            Assert.True(CLP.CurrentStageValueLbl.Text.Contains("Core of Discipline"));

            // Cleanup data by setting the learner back to stage 2
            PP.ClickAndWait(PP.LogoutLnk);
            Navigation.GoToLoginPage(browser);
            LP.LoginAsExistingUser(UserUtils.UserRole.PA, UserUtils.ProgAdmin1Login, "test");
            PP.CreateChangeAndFinalizeAgendaForLearner(learnerFullNamePerBrowser, null, null, null, "Progressing as Expected",
                                                       "Promote Learner - to Stage 2");
        }