예제 #1
0
        public void MainCyclNotCompleteAfter399Credits()
        {
            /// 1. Create a Mainport user, which has a cycle start date 6 years prior, then Login. We are using a date 6 years in the past because
            /// the end date of the cycle needs to be a past date for the user to be able to advance, and the Main cycle is 5 years
            UserInfo NewUser = UserUtils.CreateAndRegisterUser(UserUtils.Application.Mainport, UserUtils.UserRole.MP, null, null,
                                                               DateTime.Now.AddYears(-6).ToString("yyyy-MM-dd", CultureInfo.InvariantCulture));
            LoginPage       LP = Navigation.GoToLoginPage(browser);
            MyDashboardPage DP = LP.LoginAsNewUser(UserUtils.UserRole.MP, NewUser.Username, ConfigurationManager.AppSettings["LoginPassword"]);

            /// 2. Submit an activity totalling 399 credits, Enter an activity date that falls within the cycle date range.
            /// NOTE: If the activity date falls within cycle date's the last year for a Main cycle, then we wont need to credit validate
            string actDate                     = DateTime.Now.AddYears(-1).ToString("MM/dd/yyyy", CultureInfo.InvariantCulture);
            EnterCPDActivityPage EAP           = DP.ClickAndWait(DP.EnterACPDActivityBtn);
            Activity             ConferenceAct = EAP.AddActivityThenSubmit(Constants.MainportActivityTypes.Sec1_Conference_IfNotAccreditedCutCreditsInHalf, "399", true, actDate);

            /// 3. Login to Lifetime Support and validate the credits that need validated, if applicable. See note above in step 2 about credit validation.
            /// Depending on what day of the year this test is run, it may need credit validation
            LSHelp.Login(browser, "lkaveti", "password");
            LSHelp.GoToParticipantProgramPage(browser, "Royal College of Physicians", NewUser.FullName, "Maintenance of Certification");
            MainportHelperMethods.ValidateCreditsIfApplicable(browser, NewUser, ConferenceAct);

            /// 4. Click on the Details tab and verify that the UI displays In Progress for the Status label, since we did not reach the 400 credits
            // First we have to wait for the windows service to process the credits.
            LSHelp.WaitForProgramCreditsWindowsService(browser, "399 (of 400)");
            Assert.AreEqual("In Progress", LSHelp.GetProgramDetail(browser, "Status"));
        }
예제 #2
0
        public void VerifyThatAssOfficerCanAddLandRecordToCases(
            string login,
            string name,
            string password,
            User user,
            string applicantName,
            string category,
            string LGAName
            )
        {
            loginPage = new LoginPage(Driver);

            var dashboard = loginPage.EnterUsername(login, user)
                            .EnterPassword(password)
                            .ClickLoginButton();

            myDashboard = (MyDashboardPage)dashboard;
            Assert.IsTrue(myDashboard.IsPageLoadComplete());
            Assert.IsTrue(myDashboard.IsOfficerNameDisplayed(name));

            bool landRecordAdded = myDashboard.ClickCreateNewCaseButon()
                                   .SearchAnApplicantWithName(applicantName)
                                   .SelectTheApplicantFromSearchResultWithName(applicantName)
                                   .Continue()
                                   .ClickContinueButton()
                                   .SelectGeneralRequestType()
                                   .SelectCategoryFromDropdown(category)
                                   .EnterDescription("Descr")
                                   .ClickContinueButton()
                                   .AddLandRecordForLGA(LGAName)
                                   .IsLandRecordAdded();

            Assert.IsTrue(landRecordAdded, "Land Record has not been added");
        }
예제 #3
0
        public void UserCanCompleteAllActivities()
        {
            // Only going to run this in Chrome. I create activities in other test methods, so we already cross-browser test that an activity can be
            // completed in all browsers in those tests. If we were to run this method in all browsers, especially IE, it would just increase run time
            // unneccessarily
            if (BrowserName == BrowserNames.Chrome)
            {
                /// 1. Create a Mainport user and Login
                UserInfo        NewUser = UserUtils.CreateAndRegisterUser(UserUtils.Application.Mainport, UserUtils.UserRole.MP);
                LoginPage       LP      = Navigation.GoToLoginPage(browser);
                MyDashboardPage DP      = LP.LoginAsNewUser(UserUtils.UserRole.MP, NewUser.Username, ConfigurationManager.AppSettings["LoginPassword"]);

                /// 2. Add 1 activity for all of section 1's activity types
                /// 3. Add 1 activity for all of section 2's activity types
                /// 4. Add 1 activity for all of section 3's activity types
                foreach (Constants.MainportActivityTypes activityType in Enum.GetValues(typeof(Constants.MainportActivityTypes)))
                {
                    // This will fail until https://code.premierinc.com/issues/browse/RCPSC-772 is fixed. Once fixed, then make sure the Reading dropdown
                    // By is updated and run the test removing this If statement
                    if (activityType != Constants.MainportActivityTypes.Sec2_Reading_FixedCredits1)
                    {
                        EnterCPDActivityPage EAP = DP.ClickAndWait(DP.EnterACPDActivityBtn);
                        EAP.AddActivityThenSubmit(activityType, "10", true);
                    }
                }
            }
        }
예제 #4
0
        public void UserCanDeleteActivityOnMyMOCPage()
        {
            /// 1. Create a Mainport user and Login
            UserInfo        NewUser = UserUtils.CreateAndRegisterUser(UserUtils.Application.Mainport, UserUtils.UserRole.MP);
            LoginPage       LP      = Navigation.GoToLoginPage(browser);
            MyDashboardPage DP      = LP.LoginAsNewUser(UserUtils.UserRole.MP, NewUser.Username, ConfigurationManager.AppSettings["LoginPassword"]);

            /// 2. Enter 2 activities
            EnterCPDActivityPage EAP = DP.ClickAndWait(DP.EnterACPDActivityBtn);
            Activity             ConferenceActivity = EAP.AddActivityThenSubmit(Constants.MainportActivityTypes.Sec1_Conference_IfNotAccreditedCutCreditsInHalf, "10", false);

            DP.ClickAndWait(DP.EnterACPDActivityBtn);
            Activity ConferenceActivity2 = EAP.AddActivityThenSubmit(Constants.MainportActivityTypes.Sec1_Conference_IfNotAccreditedCutCreditsInHalf, "10", false);

            // Have to wait for the credits to be applied before we can proceed
            MainportHelperMethods.WaitForCreditsToBeApplied(browser, DP, Bys.MyDashboardPage.TotalCreditsAppliedValueLbl, "10");

            /// 3. On the My MOC page, open the View Activity form, click the X button for an activity, and verify that it got removed from the table
            MyMOCPage MP = DP.ClickAndWaitBasePage(DP.MyMOCTab);

            MP.OpenViewActivitiesForm(MP.GroupLearnTblUnaccrActRowViewLnk);
            IWebElement row = ElemGet.Grid_GetRowByRowName(MP.ViewActivitiesFormActivitiesTbl, Bys.MyMOCPage.ViewActivitiesFormActivitiesTblBodyRow,
                                                           ConferenceActivity.ActivityName, "td");

            ElemSet.Grid_ClickElementWithoutTextInsideRow(row, "input");
            MP.ClickAndWait(MP.DeleteActivityWarningFormYesBtn);
            Assert.False(ElemGet.Grid_ContainsRecord(Browser, MP.ViewActivitiesFormActivitiesTbl, Bys.MyMOCPage.ViewActivitiesFormActivitiesTblBodyRow, 0,
                                                     ConferenceActivity.ActivityName, "td"));
        }
예제 #5
0
        public void UIUpdatesAfterUserMeetsSectionCreditMinimumRequirement()
        {
            /// 1. Create a Mainport user and Login
            UserInfo        NewUser = UserUtils.CreateAndRegisterUser(UserUtils.Application.Mainport, UserUtils.UserRole.MP);
            LoginPage       LP      = Navigation.GoToLoginPage(browser);
            MyDashboardPage DP      = LP.LoginAsNewUser(UserUtils.UserRole.MP, NewUser.Username, ConfigurationManager.AppSettings["LoginPassword"]);

            /// 2. Submit an activity in each section, ensuring that 25 credits have been met in each section
            EnterCPDActivityPage EAP           = DP.ClickAndWait(DP.EnterACPDActivityBtn);
            Activity             ConferenceAct = EAP.AddActivityThenSubmit(Constants.MainportActivityTypes.Sec1_Conference_IfNotAccreditedCutCreditsInHalf, "25", true);

            DP.ClickAndWait(DP.EnterACPDActivityBtn);
            Activity FellowshipAct = EAP.AddActivityThenSubmit(Constants.MainportActivityTypes.Sec2_Fellowship_FixedCredits25);

            DP.ClickAndWait(DP.EnterACPDActivityBtn);
            Activity MultiSourceFeedbackAct = EAP.AddActivityThenSubmit(Constants.MainportActivityTypes.Sec3_MultisourceFeedback_CreditsTripled, "10");

            // Have to wait for the credits to be applied before we can proceed
            MainportHelperMethods.WaitForCreditsToBeApplied(browser, DP, Bys.MyDashboardPage.TotalCreditsAppliedValueLbl, "80");

            /// 3. Verify that the MOC Section Requirements labels show as blue/gray, and that the checkmark shows for each box
            Assert.AreEqual("showGrey", DP.MOCSectionReqsGraphGroupLearningSquare.GetAttribute("class"));
            Assert.AreEqual("showGrey", DP.MOCSectionReqsGraphSelfLearningSquare.GetAttribute("class"));
            Assert.AreEqual("showGrey", DP.MOCSectionReqsGraphAssessmentSquare.GetAttribute("class"));
            Assert.True(DP.MOCSectionReqsGraphGroupLearningTickBox.Displayed);
            Assert.True(DP.MOCSectionReqsGraphSelfLearningTickBox.Displayed);
            Assert.True(DP.MOCSectionReqsGraphAssessmentTickBox.Displayed);

            /// 4. Go to the My MOC tab and verify that the "section minimum requirement was met" label is shown
            DP.ClickAndWaitBasePage(DP.MyMOCTab);
            Assert.True(Browser.Exists(Bys.MyMOCPage.GroupLearnTblYouHaveMetMinCredsLbl, ElementCriteria.IsVisible));
            Assert.True(Browser.Exists(Bys.MyMOCPage.SelfLearningTblYouHaveMetMinCredsLbl, ElementCriteria.IsVisible));
            Assert.True(Browser.Exists(Bys.MyMOCPage.AssessmentTblYouHaveMetMinCredsLbl, ElementCriteria.IsVisible));
        }
        public void VerifyOfficerCanReachLandDetailsScreen(string login, string name, string password, User user, string applicantName)
        {
            loginPage = new LoginPage(Driver);

            var dashboard = loginPage.EnterUsername(login, user)
                            .EnterPassword(password)
                            .ClickLoginButton();

            myDashboard = (MyDashboardPage)dashboard;
            Assert.IsTrue(myDashboard.IsPageLoadComplete());
            Assert.IsTrue(myDashboard.IsOfficerNameDisplayed(name));

            bool isLandRecordPageLoaded = myDashboard.ClickCreateNewCaseButon()
                                          .SearchAnApplicantWithName(applicantName)
                                          .SelectTheApplicantFromSearchResultWithName(applicantName)
                                          .Continue()
                                          .ClickContinueButton()
                                          .SelectGeneralRequestType()
                                          .SelectCategoryFromDropdown("Easement")
                                          .EnterDescription("Case created by Automation testing script for an Easement")
                                          .ClickCLEFRequestCheckbox()
                                          .ClickApplicantSignedCheckbox()
                                          .EnterDateSigned()
                                          .EnterDateReceived()
                                          .UploadDocument("Document_1.txt")
                                          .ClickContinueButton()
                                          .IsPageLoaded();

            Assert.IsTrue(isLandRecordPageLoaded, "Land Record page has not loaded");
        }
예제 #7
0
        public void PRACycleCompleteAfter80Credits()
        {
            /// 1. Create a Mainport user, then place the user in the PRA cycle through LTS
            UserInfo NewUser = UserUtils.CreateAndRegisterUser(UserUtils.Application.Mainport, UserUtils.UserRole.MP);

            LSHelp.Login(browser, "lkaveti", "password");
            LSHelp.GoToParticipantProgramPage(browser, "Royal College of Physicians", NewUser.FullName, "Maintenance of Certification");
            LSHelp.RCP_AddProgramAdjustment(browser, NewUser.FullName, LSConstants.AdjustmentCodes.PRA);

            /// 2. Custom date the cycle end date so that it is in the past. This is so that the user is able to be marked as Complete (Sort of hacking
            /// the system). First, We have to move the start date back
            LSHelp.RCP_AdjustMOCDate(browser, NewUser.FullName, "Start", DateTime.Now.AddYears(-2).ToString("yyyy-MM-dd", CultureInfo.InvariantCulture));
            LSHelp.RCP_AdjustMOCDate(browser, NewUser.FullName, "End", DateTime.Now.AddYears(-1).ToString("yyyy-MM-dd", CultureInfo.InvariantCulture));

            /// 3. Login to Mainport and submit an activity totalling 80 credits. Enter an activity date that falls within the cycle date range.
            string               actDate       = DateTime.Now.AddMonths(-13).ToString("MM/dd/yyyy", CultureInfo.InvariantCulture);
            LoginPage            LP            = Navigation.GoToLoginPage(browser);
            MyDashboardPage      DP            = LP.LoginAsNewUser(UserUtils.UserRole.MP, NewUser.Username, ConfigurationManager.AppSettings["LoginPassword"]);
            EnterCPDActivityPage EAP           = DP.ClickAndWait(DP.EnterACPDActivityBtn);
            Activity             ConferenceAct = EAP.AddActivityThenSubmit(Constants.MainportActivityTypes.Sec1_Conference_IfNotAccreditedCutCreditsInHalf, "80", true,
                                                                           actDate);

            /// 4. Login to Lifetime Support and validate the credits
            LSHelp.Login(browser, "lkaveti", "password");
            LSHelp.ValidateCredit(browser, "Royal College of Physicians", NewUser.FullName, "Maintenance of Certification", ConferenceAct.ActivityName);

            /// 5. Click on the Details tab and verify that the UI displays Complete for the Status label
            // First we have to wait for the windows service to process the credits.
            LSHelp.WaitForProgramCreditsWindowsService(browser, "80 (of 80)");
            Assert.AreEqual("Complete", LSHelp.GetProgramDetail(browser, "Status"));
        }
예제 #8
0
        //[Test]
        public void sandboxtest()
        {
            UserInfo        NewUser = UserUtils.CreateAndRegisterUser(UserUtils.Application.Mainport, UserUtils.UserRole.MP);
            LoginPage       LP      = Navigation.GoToLoginPage(browser);
            MyDashboardPage DP      = LP.LoginAsNewUser(UserUtils.UserRole.MP, NewUser.Username, ConfigurationManager.AppSettings["LoginPassword"]);

            EnterCPDActivityPage EAP = DP.ClickAndWait(DP.EnterACPDActivityBtn);
            Activity             ConferenceActivity = EAP.AddActivityThenSendToHoldingArea(Constants.MainportActivityTypes.Sec1_Conference_IfNotAccreditedCutCreditsInHalf,
                                                                                           "10", true);
        }
예제 #9
0
        public void Publish()
        {
            string activityName = "";

            if (BrowserName == BrowserNames.Chrome)
            {
                activityName = "TestAuto Activity 3 Chrome";
            }
            if (BrowserName == BrowserNames.InternetExplorer)
            {
                activityName = "TestAuto Activity 3 IE";
            }
            if (BrowserName == BrowserNames.Firefox)
            {
                activityName = "TestAuto Activity 3 FF";
            }

            string portalName = "_Test Portal";

            /// 1. Login as TestAuto_TestPortal_User1
            LoginPage       LP  = Navigation.GoToLoginPage(browser);
            MyDashboardPage MDP = LP.Login("TestAuto_TestPortal_User1", "password");

            /// 2. Open the "TestAuto Activity 1" activity
            SearchResultsPage SP  = MDP.Search(activityName);
            ActivityMainPage  AMP = SP.GoToActivity(activityName);

            /// 3. Get the AID of the activity, navigate to the test portal's Final environment, login, and assert that the activity does not show up
            /// since we did not publish it yet
            // First, we should check to make sure the activity is not published (if it is, then the test failed at some point, and didnt reach
            // the part of the test where it cleans itself up and unpublished the activity). So if its not unpublished, then we will unpublish
            AMP.UnpublishActivity();
            AMP.ClickAndWait(AMP.DetailsTab);
            string AID = AMP.DetailsTabActivityNumberLbl.Text;

            // The following is commented until the create user API is developed
            //TestPortalHelp.Login(browser, "testauto_user1", "test");
            //Assert.True(TestPortalHelp.ActivityNotAppearingWithAID(browser, AID));

            /// 4. Go back to CME360, publish the activity, go to the test portal and assert that the activity is now appearing
            //Navigation.GoToMyDashboardPage(browser);
            //MDP.GoToRecentItem(CMEConstants.RecentItemCategory.Activity, activityName);
            AMP.PublishActivity();
            TestPortalHelp.Login(browser, "testauto_user1", "test");
            Assert.True(TestPortalHelp.ActivityAppearingWithAID(browser, AID));

            // Data cleanup
            Navigation.GoToMyDashboardPage(browser);
            MDP.Search(activityName);
            SP.GoToActivity(activityName);
            AMP.UnpublishActivity();
        }
        public void VerifyThatAssOfficerIsAbleToPerformNewCaseSubmission(
            string login,
            string name,
            string password,
            User user,
            string applicantName,
            string category,
            string LGAName
            )
        {
            loginPage = new LoginPage(Driver);

            var dashboard = loginPage.EnterUsername(login, user)
                            .EnterPassword(password)
                            .ClickLoginButton();

            myDashboard = (MyDashboardPage)dashboard;
            Assert.IsTrue(myDashboard.IsPageLoadComplete());
            Assert.IsTrue(myDashboard.IsOfficerNameDisplayed(name));

            myDashboard.ClickCreateNewCaseButon()
            .SearchAnApplicantWithName(applicantName)
            .SelectTheApplicantFromSearchResultWithName(applicantName)
            .Continue()
            .ClickContinueButton()
            .SelectGeneralRequestType()
            .SelectCategoryFromDropdown(category)
            .EnterDescription("Descr")
            .ClickCLEFRequestCheckbox()
            .ClickApplicantSignedCheckbox()
            .EnterDateSigned()
            .EnterDateReceived()
            .UploadDocument("Document_1.txt")
            .ClickContinueButton()
            .AddLandRecordForLGA(LGAName)
            .ClickContinueButton()
            .ClickLGACheckboxToConsult()
            .HasLGABeenConsultedRadioButtonResponse(Decision.Yes)
            .ClickUpdateButton()
            .ClickContinueButton()
            .ClickContinueButton()
            .ClickCheckBox()
            .ClickContinueButton()
            .SendCaseSummaryToApplicantRadioButton(Decision.Yes)
            .SelectMethodOfContact(ContactMethod.Email)
            .AnyOtherDocumentsToSend(Decision.No)
            .ClickReadyToEmailConfirmationCheckbox()
            .ClickDoneButton();
        }
예제 #11
0
        public void WhenTheOfficerEntersUsernameAndPasswordToLogin(string username, string password)
        {
            loginPage.EnterUsername(username, User.Officer);
            loginPage.EnterPassword(password);
            switch (loginPage.userProfile)
            {
            case User.Manager:
                teamDashboard = (TeamDashboardPage)loginPage.ClickLoginButton();
                break;

            case User.Officer:
                myDashboard = (MyDashboardPage)loginPage.ClickLoginButton();
                break;
            }
        }
예제 #12
0
        public void VerifyThatAssOfficerCanReviewCaseInfo(
            string login,
            string name,
            string password,
            User user,
            string applicantName,
            string category,
            string LGAName
            )
        {
            loginPage = new LoginPage(Driver);

            var dashboard = loginPage.EnterUsername(login, user)
                            .EnterPassword(password)
                            .ClickLoginButton();

            myDashboard = (MyDashboardPage)dashboard;
            Assert.IsTrue(myDashboard.IsPageLoadComplete());
            Assert.IsTrue(myDashboard.IsOfficerNameDisplayed(name));

            bool termsAndConditionsPageLoaded = myDashboard.ClickCreateNewCaseButon()
                                                .SearchAnApplicantWithName(applicantName)
                                                .SelectTheApplicantFromSearchResultWithName(applicantName)
                                                .Continue()
                                                .ClickContinueButton()
                                                .SelectGeneralRequestType()
                                                .SelectCategoryFromDropdown(category)
                                                .EnterDescription("Descr")
                                                .ClickCLEFRequestCheckbox()
                                                .ClickApplicantSignedCheckbox()
                                                .EnterDateSigned()
                                                .EnterDateReceived()
                                                .UploadDocument("Document_1.txt")
                                                .ClickContinueButton()
                                                .AddLandRecordForLGA(LGAName)
                                                .ClickContinueButton()
                                                .ClickLGACheckboxToConsult()
                                                .HasLGABeenConsultedRadioButtonResponse(Decision.Yes)
                                                .ClickUpdateButton()
                                                .ClickContinueButton()
                                                .ClickContinueButton()
                                                .ClickCheckBox()
                                                .ClickContinueButton()
                                                .IsPageLoaded();

            Assert.IsTrue(termsAndConditionsPageLoaded, "Termas and consitions page is not loaded.");
        }
예제 #13
0
        public void VerifyThatAnOfficerCanSearchAnApplicantLogin(string login, string name, string password, User user, string applicantName)
        {
            loginPage = new LoginPage(Driver);

            var dashboard = loginPage.EnterUsername(login, user)
                            .EnterPassword(password)
                            .ClickLoginButton();

            myDashboard = (MyDashboardPage)dashboard;
            Assert.IsTrue(myDashboard.IsPageLoadComplete());
            Assert.IsTrue(myDashboard.IsOfficerNameDisplayed(name));

            myDashboard.ClickCreateNewCaseButon()
            .SearchAnApplicantWithName(applicantName)
            .SelectTheApplicantFromSearchResultWithName(applicantName)
            .Continue();
        }
예제 #14
0
        public void ActivityAwaitingValidationShowsInCoorespondingTable()
        {
            /// 1. Create a Mainport user and Login
            UserInfo        NewUser = UserUtils.CreateAndRegisterUser(UserUtils.Application.Mainport, UserUtils.UserRole.MP);
            LoginPage       LP      = Navigation.GoToLoginPage(browser);
            MyDashboardPage DP      = LP.LoginAsNewUser(UserUtils.UserRole.MP, NewUser.Username, ConfigurationManager.AppSettings["LoginPassword"]);

            /// 2. Enter an activity which requires credit validation
            EnterCPDActivityPage EAP     = DP.ClickAndWait(DP.EnterACPDActivityBtn);
            Activity             Actvity = EAP.AddActivityThenSubmit(Constants.MainportActivityTypes.Sec2_BulkJournalReadingwithTranscript_ValidationRequired, "10");

            /// 3. Click the My Holding Area table, then verify that the activity appears in the Activity Awaiting Credit Validation table
            MyHoldingAreaPage MP = DP.ClickAndWaitBasePage(DP.MyHoldingAreaTab);

            Assert.True(ElemGet.Grid_ContainsRecord(browser, MP.AwaitingCredValidationTbl, Bys.MyHoldingAreaPage.AwaitingCredValidationTblBody, 0,
                                                    Actvity.ActivityName, "a"));
        }
예제 #15
0
        public void DistributionTest3()
        {
            /// 1. Navigate to the login page
            LoginPage LP = Navigation.GoToLoginPage(browser);
            //Assert.True(false);
            MyDashboardPage MDP = LP.Login("cap_admin", "password");

            DistributionPage DP = MDP.ClickAndWaitBasePage(MDP.DistributionTab);

            DP.ClickAndWait(DP.PortalsLnk);

            PortalPage PP = DP.GoToPortalDetails("CAP Learning", "img", "Edit");

            PP.ClickAndWait(PP.CatAndActTab);

            PP.RemoveCatalog("test catalog", "input", "Remove Catalog");
        }
예제 #16
0
        public void UserCanCreateAGoal()
        {
            // Remove this if statement when bug https://code.premierinc.com/issues/browse/RCPSC-793 is fixed
            if (BrowserName == BrowserNames.Chrome)
            {
                /// 1. Create a Mainport user and Login
                UserInfo        NewUser = UserUtils.CreateAndRegisterUser(UserUtils.Application.Mainport, UserUtils.UserRole.MP);
                LoginPage       LP      = Navigation.GoToLoginPage(browser);
                MyDashboardPage DP      = LP.LoginAsNewUser(UserUtils.UserRole.MP, NewUser.Username, ConfigurationManager.AppSettings["LoginPassword"]);

                /// 2. Click the Add a Goal button, fill in the information, click Next, then click Close
                string goalName = DP.AddAGoal();

                /// 3. Verify that the goals table populates with this goal
                Assert.True(ElemGet.Grid_ContainsRecord(browser, DP.GoalsTbl, Bys.MyDashboardPage.GoalsTblBody, 0, goalName, "span"));
            }
        }
예제 #17
0
        public void MainCycleAdvancesToMain2CycleAfter400Credits()
        {
            // Not running this test on Feb 1st of any year, because Mainport has some weird gracce period rule where the user gets auto-advanced without
            // the Admin having to manually advance him, so it messes with the test
            if (DateTime.Now.Date.ToString() != "2/1/2018 12:00:00 AM")
            {
                /// 1. Create a Mainport user, which has a cycle start date 6 years prior, then Login. We are using a date 6 years in the past because
                /// the end date of the cycle needs to be a past date for the user to be able to advance, and the Main cycle is 5 years
                UserInfo NewUser = UserUtils.CreateAndRegisterUser(UserUtils.Application.Mainport, UserUtils.UserRole.MP, null, null,
                                                                   DateTime.Now.AddYears(-6).ToString("yyyy-MM-dd", CultureInfo.InvariantCulture));
                LoginPage       LP = Navigation.GoToLoginPage(browser);
                MyDashboardPage DP = LP.LoginAsNewUser(UserUtils.UserRole.MP, NewUser.Username, ConfigurationManager.AppSettings["LoginPassword"]);

                /// 2. Submit an activity totalling 400 credits, Enter an activity date that falls within the cycle date range.
                /// NOTE: If the activity date falls within the cycle date's last year for a Main cycle, then we wont need to credit validate
                string actDate                     = DateTime.Now.AddYears(-1).ToString("MM/dd/yyyy", CultureInfo.InvariantCulture);
                EnterCPDActivityPage EAP           = DP.ClickAndWait(DP.EnterACPDActivityBtn);
                Activity             ConferenceAct = EAP.AddActivityThenSubmit(Constants.MainportActivityTypes.Sec1_Conference_IfNotAccreditedCutCreditsInHalf, "400", true, actDate);

                /// 3. Login to Lifetime Support and validate the credit that needs validated, if applicable. See note above in step 2 about credit validation.
                /// Depending on what day of the year this test is run, it may need credit validation
                LSHelp.Login(browser, "lkaveti", "password");
                LSHelp.GoToParticipantProgramPage(browser, "Royal College of Physicians", NewUser.FullName, "Maintenance of Certification");
                MainportHelperMethods.ValidateCreditsIfApplicable(browser, NewUser, ConferenceAct);

                /// 4. Click on the Details tab and verify that the UI displays Complete for the Status label
                // First we have to wait for the windows service to process the credits.
                LSHelp.WaitForProgramCreditsWindowsService(browser, "400 (of 400)");
                Assert.AreEqual("Complete", LSHelp.GetProgramDetail(browser, "Status"));

                /// 5. Add a Main cycle adjustment, then verify that the UI displays In Progress for the Status label, and "Main 2nd or Later Cycle" for the
                /// program label. NOTE: We can not automate the "automatic" cycle advacement because it relies on a windows service that gets run overnight.
                /// Going from Main 1 to Main2/EXT, etc. usually occurs automatically for clients with the overnight windows service. We are sort of hacking
                /// the system by manually setting this user to Main 2, and not truly testing that a user gets put into Main 2 once he meets his credit
                /// minimum. Basically, you can place a user into any cycle through LTS, even if the user did not meet credit minimum
                LSHelp.RCP_AddProgramAdjustment(browser, NewUser.FullName, LSConstants.AdjustmentCodes.MainProgram, DateTime.Now.ToString("yyyy-MM-dd", CultureInfo.InvariantCulture));
                Assert.AreEqual(DateTime.Now.ToString("M/d/yyyy", CultureInfo.InvariantCulture), LSHelp.GetProgramDetail(browser, "Starts"));
                Assert.AreEqual("Main 2nd or Later Cycle", LSHelp.GetProgramDetail(browser, "Program"));

                /// 6. Go back to Mainport and verify that the user is in a new cycle by checking that the credits reset to 0
                Navigation.GoToMyDashboardPage(browser);
                Assert.AreEqual("0", DP.TotalCreditsSubmittedValueLbl.Text);
                Assert.AreEqual("0", DP.TotalCreditsAppliedValueLbl.Text);
            }
        }
예제 #18
0
        public void UserCanSendActivityToHoldingAreaThenCompleteActivity()
        {
            /// 1. Create a Mainport user and Login
            UserInfo        NewUser = UserUtils.CreateAndRegisterUser(UserUtils.Application.Mainport, UserUtils.UserRole.MP);
            LoginPage       LP      = Navigation.GoToLoginPage(browser);
            MyDashboardPage DP      = LP.LoginAsNewUser(UserUtils.UserRole.MP, NewUser.Username, ConfigurationManager.AppSettings["LoginPassword"]);

            /// 2. Click the Enter a CPD Activity button, fill in the fields, click Send to Holding Area, then click Close
            /// Do this again for a second activity
            EnterCPDActivityPage EAP = DP.ClickAndWait(DP.EnterACPDActivityBtn);
            Activity             ConferenceActivity = EAP.AddActivityThenSendToHoldingArea(Constants.MainportActivityTypes.Sec1_Conference_IfNotAccreditedCutCreditsInHalf,
                                                                                           "10", true);

            DP.ClickAndWait(DP.EnterACPDActivityBtn);
            Activity ConferenceActivity2 = EAP.AddActivityThenSendToHoldingArea(Constants.MainportActivityTypes.Sec1_Conference_IfNotAccreditedCutCreditsInHalf,
                                                                                "10", true);

            /// 3. Verify that the activity shows in the My Holding Area table
            Assert.True(ElemGet.Grid_ContainsRecord(browser, DP.MyHoldingAreaTbl, Bys.MyDashboardPage.MyHoldingAreaTblBody, 0,
                                                    ConferenceActivity2.ActivityName, "span"));

            /// 4. Click the View More button underneath the My Holding Area table, then verify that the activity is showing in the
            /// Incomplete Activities. Click Complete Activity, then click the Continue button and complete the activity and verify
            /// that it disappears from the Incomplete Activites table
            MyHoldingAreaPage MP = DP.ClickAndWait(DP.ViewMoreBtn);

            Assert.True(ElemGet.Grid_ContainsRecord(browser, MP.IncompleteActivitiesTbl, Bys.MyHoldingAreaPage.IncompleteActivitiesTblBody, 0,
                                                    ConferenceActivity2.ActivityName, "a"));
            MP.ClickCompleteActivityBtn(MP.IncompleteActivitiesTbl, Bys.MyHoldingAreaPage.IncompleteActivitiesTblBodyRow, ConferenceActivity2.ActivityName);
            // Not running this in firefox. For some reason, when I enter the date in the above AddActivityThenSendToHoldingArea method, the date enters fine
            // and the activity completes, but when I open the activity from this window, then the date isnt there, so this is an automation bug. Revisit
            if (BrowserName != BrowserNames.Firefox)
            {
                EAP.ClickAndWait(EAP.ContinueBtn);
                EAP.ClickAndWait(EAP.OptionalTabSubmitBtn);
                EAP.CloseBtn.Click();
                // Very tired right now. Add dynamic wait here later
                Thread.Sleep(5000);
                browser.SwitchTo().DefaultContent();
                Assert.False(ElemGet.Grid_ContainsRecord(browser, MP.IncompleteActivitiesTbl, Bys.MyHoldingAreaPage.IncompleteActivitiesTblBody, 0,
                                                         ConferenceActivity2.ActivityName, "a"));
            }
        }
예제 #19
0
        public void UserCanDeleteActivityFromMyHoldingArea()
        {
            /// 1. Create a Mainport user and Login
            UserInfo        NewUser = UserUtils.CreateAndRegisterUser(UserUtils.Application.Mainport, UserUtils.UserRole.MP);
            LoginPage       LP      = Navigation.GoToLoginPage(browser);
            MyDashboardPage DP      = LP.LoginAsNewUser(UserUtils.UserRole.MP, NewUser.Username, ConfigurationManager.AppSettings["LoginPassword"]);

            /// 2. Click the Enter a CPD Activity button, fill in the fields, click Continue, then click Send to Holding Area, then click Close
            EnterCPDActivityPage EAP = DP.ClickAndWait(DP.EnterACPDActivityBtn);
            Activity             ConferenceActivity = EAP.AddActivityThenSendToHoldingArea(Constants.MainportActivityTypes.Sec1_Conference_IfNotAccreditedCutCreditsInHalf,
                                                                                           "10", true);

            /// 3. Click the My Holding Area tab, click the X button to delete the activity, then verify that it disappears from the Incomplete Activites table
            MyHoldingAreaPage MP = DP.ClickAndWaitBasePage(DP.MyHoldingAreaTab);

            MP.DeleteActivity(ConferenceActivity.ActivityName);
            Assert.False(ElemGet.Grid_ContainsRecord(browser, MP.IncompleteActivitiesTbl, Bys.MyHoldingAreaPage.IncompleteActivitiesTblBody, 0,
                                                     ConferenceActivity.ActivityName, "a"));
        }
예제 #20
0
        public void UserCanEditActivityOnMyMOCPage()
        {
            /// 1. Create a Mainport user and Login
            UserInfo        NewUser = UserUtils.CreateAndRegisterUser(UserUtils.Application.Mainport, UserUtils.UserRole.MP);
            LoginPage       LP      = Navigation.GoToLoginPage(browser);
            MyDashboardPage DP      = LP.LoginAsNewUser(UserUtils.UserRole.MP, NewUser.Username, ConfigurationManager.AppSettings["LoginPassword"]);

            /// 2. Enter an activity
            EnterCPDActivityPage EAP = DP.ClickAndWait(DP.EnterACPDActivityBtn);
            Activity             NewConferenceActivity = EAP.AddActivityThenSubmit(Constants.MainportActivityTypes.Sec1_Conference_IfNotAccreditedCutCreditsInHalf, "20", true);

            /// 3. Click to the MyMOC page, click on the View link for the activity that was created, click on the Pencil icon in the Activities table on the popup,
            /// then verify that the information on this form is correct
            // Gotta wait for the windows service first to apply the credits
            MainportHelperMethods.WaitForCreditsToBeApplied(browser, DP, Bys.MyDashboardPage.TotalCreditsAppliedValueLbl, "20");
            MyMOCPage MP = DP.ClickAndWaitBasePage(DP.MyMOCTab);

            MP.OpenEditActivityForm(MP.GroupLearnTblAccrActRowViewLnk, NewConferenceActivity.ActivityName);

            /// 4. Edit the activity. Change accredited to not accredited. Change the credits from 20 to 10. Change the name. Close the form. Verify that the
            /// amount of credits gets updated on all related labels, verify that the activity was moved from the accredited table to the not accredited table,
            /// and verify the name change
            Activity EditedConferenceActivity = EAP.EditActivity(Constants.MainportActivityTypes.Sec1_Conference_IfNotAccreditedCutCreditsInHalf, "10", false);

            Browser.SwitchTo().DefaultContent();
            MP.ClickAndWaitBasePage(MP.MyDashboardTab);
            MainportHelperMethods.WaitForCreditsToBeApplied(browser, DP, Bys.MyDashboardPage.TotalCreditsAppliedValueLbl, "5");
            // Overall label
            DP.ClickAndWaitBasePage(DP.MyMOCTab);
            Assert.AreEqual("5 of 400", MP.OverallCreditsAppliedLbl.Text);
            // Credits Applied to Date labels
            Assert.AreEqual(EditedConferenceActivity.Credits + " Credits", MP.GroupLearnTblCreditsAppliedValueLbl.Text);
            // Credits Reported column
            Assert.AreEqual("-", MP.GroupLearnTblAccrActRowCredsRptLbl.Text);
            Assert.AreEqual(EditedConferenceActivity.Credits, MP.GroupLearnTblUnaccrActRowCredsRptLbl.Text);

            /// 5. Click back to the Dashboard page and verify that the credit amount change is reflected there
            MP.ClickAndWaitBasePage(MP.MyDashboardTab);
            Assert.AreEqual("5", DP.TotalCreditsSubmittedValueLbl.Text);
            Assert.AreEqual("5", DP.TotalCreditsAppliedValueLbl.Text);
        }
예제 #21
0
        public void CustomFee()
        {
            string activityName = "";

            if (BrowserName == BrowserNames.Chrome)
            {
                activityName = "TestAuto Activity 2 Chrome";
            }
            if (BrowserName == BrowserNames.InternetExplorer)
            {
                activityName = "TestAuto Activity 2 IE";
            }
            if (BrowserName == BrowserNames.Firefox)
            {
                activityName = "TestAuto Activity 2 FF";
            }

            string portalName = "_Test Portal";

            /// 1. Login as TestAuto_TestPortal_User1
            LoginPage       LP  = Navigation.GoToLoginPage(browser);
            MyDashboardPage MDP = LP.Login("TestAuto_TestPortal_User1", "password");

            /// 2. Open the "TestAuto Activity 1" activity
            SearchResultsPage SP  = MDP.Search(activityName);
            ActivityMainPage  AMP = SP.GoToActivity(activityName);

            /// 3. Go to the Publishing Details tab, then modify the Custom fee for the portal that the activity is associated to
            string newFee = string.Format("{0}.00", DataUtils.GetRandomInteger(200).ToString());

            AMP.ChangeCustomFee(portalName, newFee);

            /// 4. Get the AID of the activity, navigate to the test portal's Final environment, login, and assert that new fee is reflected on the
            /// Activity Details page
            AMP.ClickAndWait(AMP.DetailsTab);
            string AID = AMP.DetailsTabActivityNumberLbl.Text;

            TestPortalHelp.Login(browser, "testauto_user1", "test");
            Assert.AreEqual("$" + newFee, TestPortalHelp.ActivityFee(browser, AID));
        }
        public void VerifyOfficerCanCreateAnEvent(string login, string name, string password, User user, string applicantName)
        {
            loginPage = new LoginPage(Driver);

            var dashboard = loginPage.EnterUsername(login, user)
                            .EnterPassword(password)
                            .ClickLoginButton();

            myDashboard = (MyDashboardPage)dashboard;
            Assert.IsTrue(myDashboard.IsPageLoadComplete());
            Assert.IsTrue(myDashboard.IsOfficerNameDisplayed(name));

            RequestDetailsMileStone requestDetails = myDashboard.ClickCreateNewCaseButon()
                                                     .SearchAnApplicantWithName(applicantName)
                                                     .SelectTheApplicantFromSearchResultWithName(applicantName)
                                                     .Continue()
                                                     .ClickContinueButton()
                                                     .SelectEventRequestType()
                                                     .CompleteEventDetails();

            Thread.Sleep(7000);
        }
예제 #23
0
        public void NewActivityAppearsAndDisappearsFromGrid()
        {
            /// 1. Login as an existing user
            LoginPage       LP = Navigation.GoToLoginPage(browser);
            MyDashboardPage DP = LP.LoginAsExistingUser(UserUtils.UserRole.MP, UserUtils.MainportUser1Login, ConfigurationManager.AppSettings["LoginPassword"]);

            /// 2. Add an activity
            EnterCPDActivityPage EAP = DP.ClickAndWait(DP.EnterACPDActivityBtn);
            Activity             NewConferenceActivity = EAP.AddActivityThenSubmit(Constants.MainportActivityTypes.Sec1_Conference_IfNotAccreditedCutCreditsInHalf, "10", false);

            /// 3. Navigate to the My CPD Activities List page and verify that the activity got added to the the table
            MyCPDActivitiesListPage MCP = DP.ClickAndWaitBasePage(DP.MyCPDActivitiesTab);

            Assert.True(ElemGet.Grid_ContainsRecord(browser, MCP.ActivityTblBody, Bys.MyCPDActivitiesListPage.ActivityTblBody, 0,
                                                    NewConferenceActivity.ActivityName, "a"), "The activity has not been added to the grid");

            /// 4. Click the X button on the activity inside the grid, then click Ok on the popup to delete the activity, and make sure the activity
            /// disappears from the grid
            MCP.DeleteActivityFromGrid(NewConferenceActivity.ActivityName);
            Assert.False(ElemGet.Grid_ContainsRecord(browser, MCP.ActivityTblBody, Bys.MyCPDActivitiesListPage.ActivityTblBody, 0,
                                                     NewConferenceActivity.ActivityName, "a"), "The activity has not been deleted");
        }
예제 #24
0
        public void VerifyThatUserCanLogin(string login, string name, string password, User user)
        {
            loginPage = new LoginPage(Driver);

            var dashboard = loginPage.EnterUsername(login, user)
                            .EnterPassword(password)
                            .ClickLoginButton();

            switch (loginPage.userProfile)
            {
            case User.Manager:
                teamDashboard = (TeamDashboardPage)dashboard;
                Assert.IsTrue(teamDashboard.IsPageLoadComplete());
                Assert.IsTrue(teamDashboard.IsManagerNameDisplayed(name));
                break;

            case User.Officer:
                myDashboard = (MyDashboardPage)dashboard;
                Assert.IsTrue(myDashboard.IsPageLoadComplete());
                Assert.IsTrue(myDashboard.IsOfficerNameDisplayed(name));
                break;
            }
        }
예제 #25
0
        public void VerifyThatAssOfficerCanAddAdditionalInfoToCases(
            string login,
            string name,
            string password,
            User user,
            string applicantName,
            string category,
            string LGAName
            )
        {
            loginPage = new LoginPage(Driver);

            var dashboard = loginPage.EnterUsername(login, user)
                            .EnterPassword(password)
                            .ClickLoginButton();

            myDashboard = (MyDashboardPage)dashboard;
            Assert.IsTrue(myDashboard.IsPageLoadComplete());
            Assert.IsTrue(myDashboard.IsOfficerNameDisplayed(name));

            myDashboard.ClickCreateNewCaseButon()
            .SearchAnApplicantWithName(applicantName)
            .SelectTheApplicantFromSearchResultWithName(applicantName)
            .Continue()
            .ClickContinueButton()
            .SelectGeneralRequestType()
            .SelectCategoryFromDropdown(category)
            .EnterDescription("Descr")
            .ClickContinueButton()
            .AddLandRecordForLGA(LGAName)
            .ClickContinueButton()
            .ClickLGACheckboxToConsult()
            .HasLGABeenConsultedRadioButtonResponse(Decision.Yes)
            .ClickUpdateButton()
            .ClickContinueButton()
            .ClickContinueButton();
        }
        public void ChangeCountryInBillingAddress()
        {
            LoginPageActions.Login(driver);
            test.Log(LogStatus.Info, "Logged in successfully");

            MyDashboardPage myDashboardPage = new MyDashboardPage(driver);

            myDashboardPage.lnkBillingAddress.Click();
            test.Log(LogStatus.Info, "Clicked on billing address link successfully");

            AddNewAddressPage addNewAddressPage = new AddNewAddressPage(driver);

            addNewAddressPage.txtStreetAddress1.SendKeys(RandomNumberAndStringGenerator.GenerateRandomString(false, 20));
            test.Log(LogStatus.Info, "Street addres 1 updated from random string generator class");

            addNewAddressPage.txtStreetAddress2.SendKeys(RandomNumberAndStringGenerator.GenerateRandomString(false, 20));
            test.Log(LogStatus.Info, "Street addres 2 updated from random string generator class");

            addNewAddressPage.txtCity.SendKeys(RandomNumberAndStringGenerator.GenerateRandomString(true, 25));
            test.Log(LogStatus.Info, "City updated from random string generator class");

            addNewAddressPage.txtState.SendKeys(RandomNumberAndStringGenerator.GenerateRandomString(true, 25));
            test.Log(LogStatus.Info, "State updated from random string generator class");

            addNewAddressPage.txtZipCode.SendKeys(RandomNumberAndStringGenerator.GenerateRandomNumber(100000, 999999).ToString());
            test.Log(LogStatus.Info, "Zip code updated from random string generator class");

            selectElement = new SelectElement(addNewAddressPage.ddCountry);
            selectElement.SelectByText("Bhutan");
            test.Log(LogStatus.Info, "Bhutan country selected successfully");

            // This is how we handle ajax calls
            // wait.Until(ExpectedConditions.InvisibilityOfElementLocated(By.Id("")));

            test.Log(LogStatus.Pass, TestContext.TestName + " is passed.");
        }
예제 #27
0
        public void DistributionTest()
        {
            /// 1. Navigate to the login page
            LoginPage LP = Navigation.GoToLoginPage(browser);
            //Assert.True(false);
            MyDashboardPage MDP = LP.Login("TestAuto_TestPortal_User1", "password");

            DistributionPage DP = MDP.ClickAndWaitBasePage(MDP.DistributionTab);
            CatalogsPage     CP = DP.ClickAndWait(DP.CatalogsLnk);


            Assert.True(DP.FilterByLbl.Displayed);
            Assert.True(DP.CatalogLibraryLbl.Displayed);


            AddCatalogPage ACP = CP.ClickAndWait(CP.AddNewCatalogLnk);


            ACP.DetailsTabCatalogNameTxt.SendKeys("TestLK");
            ACP.DetailsTabShortLabelTxt.SendKeys("Short Label Test");
            ACP.DetailsTabDescriptionTxt.SendKeys("Description Test LK");

            ACP.ClickAndWait(ACP.DetailsTabCancelBtn);
        }
예제 #28
0
        public void CreditLabelVerification()
        {
            // Not runing firefox right now due to Lifetime support Actions button being a hover dropdown. Revisit this and fix in firefox,
            // Will probably just need to add a line of code to hover over Actions instead of clicking on it.
            if (BrowserName == BrowserNames.Chrome || BrowserName == BrowserNames.InternetExplorer)
            {
                /// 1. Create a Mainport user and Login
                UserInfo        NewUser = UserUtils.CreateAndRegisterUser(UserUtils.Application.Mainport, UserUtils.UserRole.MP);
                LoginPage       LP      = Navigation.GoToLoginPage(browser);
                MyDashboardPage DP      = LP.LoginAsNewUser(UserUtils.UserRole.MP, NewUser.Username, ConfigurationManager.AppSettings["LoginPassword"]);

                /// 2. Add at least 1 activity for each activity type

                /// 3. Choose 1 activity which cuts the credits in half per hour/article when the No radio button is clicked.
                EnterCPDActivityPage EAP = DP.ClickAndWait(DP.EnterACPDActivityBtn);
                Activity             ConferenceActivity = EAP.AddActivityThenSubmit(Constants.MainportActivityTypes.Sec1_Conference_IfNotAccreditedCutCreditsInHalf, "10", false);

                /// 4. Choose 1 activity which has a fixed amount of credits
                DP.ClickAndWait(DP.EnterACPDActivityBtn);
                Activity FellowshipActivity = EAP.AddActivityThenSubmit(Constants.MainportActivityTypes.Sec2_Fellowship_FixedCredits25);

                /// 5. Choose 1 activity which triples credits
                DP.ClickAndWait(DP.EnterACPDActivityBtn);
                Activity AccreditedSelAssessActivity = EAP.AddActivityThenSubmit(Constants.MainportActivityTypes.Sec3_AccreditedSelfAssessmentPrograms_CreditsTripled, "10");

                /// 6. Choose 1 activity that requires validation
                DP.ClickAndWait(DP.EnterACPDActivityBtn);
                Activity BulkJournalActivity = EAP.AddActivityThenSubmit(Constants.MainportActivityTypes.Sec2_BulkJournalReadingwithTranscript_ValidationRequired, "10");

                /// 7. Log on to the Lifetime Support site and validate the credit
                LSHelp.Login(browser, "lkaveti", "password");
                LSHelp.ValidateCredit(browser, "Royal College of Physicians", NewUser.FullName, "Maintenance of Certification", BulkJournalActivity.ActivityName);

                /// 8. Go back to the Mainport app, and on the My Dashboard page, verify that the Total Credits Submitted and Applied labels reflect the amount of
                /// credits that were added above. Also verify the "MOC Section Requirements" graph labels get reflected. Based on the above activites, the
                /// Submitted label should have 5 for Conference, + 25 for fellowship, + 30 for accreditedselfassess, + 10 for bulkjournal. So total we should see 70
                Navigation.GoToMyDashboardPage(browser);
                MainportHelperMethods.WaitForCreditsToBeApplied(browser, DP, Bys.MyDashboardPage.TotalCreditsAppliedValueLbl, "70");
                Assert.AreEqual("70", DP.TotalCreditsSubmittedValueLbl.Text);
                Assert.AreEqual("70", DP.TotalCreditsAppliedValueLbl.Text);
                Assert.AreEqual(string.Format("Section 1Group Learning{0}/25 Credits", ConferenceActivity.Credits),
                                DP.MOCSectionReqsGraphGroupLearningCreditLbl.GetAttribute("textContent"));
                int totalSelfLearningCredits = Int32.Parse(FellowshipActivity.Credits) + Int32.Parse(BulkJournalActivity.Credits); // For the Section 2 Self Learning activities, we completed 2 of them, so we have to add those 2 credits to get the total label
                Assert.AreEqual(string.Format("Section 2Self Learning{0}/25 Credits", totalSelfLearningCredits.ToString()),
                                DP.MOCSectionReqsGraphSelfLearningCreditLbl.GetAttribute("textContent"));
                Assert.AreEqual(string.Format("Section 3Assessment{0}/25 Credits", AccreditedSelAssessActivity.Credits),
                                DP.MOCSectionReqsGraphAssessmentCreditLbl.GetAttribute("textContent"));

                /// 9. On the My MOC page, verify that the credits are reflected in the Overall label, reflected in each Credits Applied to Date labels,
                /// and in each row under the Credits Reported column
                MyMOCPage MP = DP.ClickAndWaitBasePage(DP.MyMOCTab);
                // Overall label
                Assert.AreEqual("70 of 400", MP.OverallCreditsAppliedLbl.Text);
                // Credits Applied to Date labels
                Assert.AreEqual(ConferenceActivity.Credits + " Credits", MP.GroupLearnTblCreditsAppliedValueLbl.Text);
                Assert.AreEqual(totalSelfLearningCredits.ToString() + " Credits", MP.SelfLearningTblCreditsAppliedValueLbl.Text);
                Assert.AreEqual(AccreditedSelAssessActivity.Credits + " Credits", MP.AssessmentTblCreditsAppliedValueLbl.Text);
                // Credits Reported column
                Assert.AreEqual(ConferenceActivity.Credits, MP.GroupLearnTblUnaccrActRowCredsRptLbl.Text);
                Assert.AreEqual(FellowshipActivity.Credits, MP.SelfLearningTblPlanLearnActRowCredsRptLbl.Text);
                Assert.AreEqual(BulkJournalActivity.Credits, MP.SelfLearningTblScanActRowCredsRptLbl.Text);
                Assert.AreEqual(AccreditedSelAssessActivity.Credits, MP.AssessmentTblKnowledgeAssRowCredsRptLbl.Text);

                /// 10. Click on the View link for one of the activities, verify the credits are reflected correctly on the popup, click the Pencil icon
                /// to view the activity in read-only mode to verify that it appears
                MP.OpenViewActivitiesForm(MP.GroupLearnTblUnaccrActRowViewLnk);
                Assert.AreEqual(ElemGet.Grid_GetCellTextByRowNameAndColumnName(MP.ViewActivitiesFormActivitiesTbl, MP.ViewActivitiesFormActivitiesTblThead,
                                                                               Bys.MyMOCPage.ViewActivitiesFormActivitiesTblBody, ConferenceActivity.ActivityName, "td", "Credits Reported"), ConferenceActivity.Credits);
                MP.ClickAndWait(MP.ViewActivitiesFormCloseBtn);
            }
        }
예제 #29
0
        public void SearchAddRemoveCatalogAndPortalDependency()
        {
            string activityName = "";

            if (BrowserName == BrowserNames.Chrome)
            {
                activityName = "TestAuto Activity 1 Chrome";
            }
            if (BrowserName == BrowserNames.InternetExplorer)
            {
                activityName = "TestAuto Activity 1 IE";
            }
            if (BrowserName == BrowserNames.Firefox)
            {
                activityName = "TestAuto Activity 1 FF";
            }

            string catalogName = "TestAuto Catalog 1";

            string portalName = "_Test Portal";

            /// 1. Login as TestAuto_TestPortal_User1
            LoginPage       LP  = Navigation.GoToLoginPage(browser);
            MyDashboardPage MDP = LP.Login("TestAuto_TestPortal_User1", "password");

            /// 2. Open the "TestAuto Activity 1" activity
            SearchResultsPage SP  = MDP.Search(activityName);
            ActivityMainPage  AMP = SP.GoToActivity(activityName);

            /// 3. Go to the Publishing Details and do a search for "TestAuto Catalog 1" and verify that it shows in the available table
            // First, we should check to make sure that this catalog is not in the Selected table (if it is, then the test failed at some point, and didnt reach
            // the part of the test where it moves the catalog back to the available list). So if its not in the available list, then we need to put it back
            AMP.ClickAndWait(AMP.PubDetailsTab);
            if (ElemGet.Grid_ContainsRecord(browser, AMP.PubDetailsTabSelCatTbl, Bys.ActivityMainPage.PubDetailsTabSelCatTblBodyRow, 1,
                                            catalogName, "td"))
            {
                AMP.RemoveCatalogFromActivity(catalogName);
            }
            AMP.SearchForAvailableCatalog(catalogName);
            Assert.True(ElemGet.Grid_ContainsRecord(browser, AMP.PubDetailsTabAvailCatTbl, Bys.ActivityMainPage.PubDetailsTabAvailCatTblBodyRow, 1,
                                                    "TestAuto Catalog 1", "td", Bys.ActivityMainPage.PubDetailsTabAvailCatTblFirstBtn, Bys.ActivityMainPage.PubDetailsTabAvailCatTblNextBtn));

            /// 4. Click the + icon in the catalog row of the available table and verify that it gets added to the selected table and removed from
            /// the available table
            AMP.AddCatalogToActivity(catalogName);
            Assert.False(ElemGet.Grid_ContainsRecord(browser, AMP.PubDetailsTabAvailCatTbl, Bys.ActivityMainPage.PubDetailsTabAvailCatTblBodyRow, 1,
                                                     catalogName, "td", Bys.ActivityMainPage.PubDetailsTabAvailCatTblFirstBtn, Bys.ActivityMainPage.PubDetailsTabAvailCatTblNextBtn));
            Assert.True(ElemGet.Grid_ContainsRecord(browser, AMP.PubDetailsTabSelCatTbl, Bys.ActivityMainPage.PubDetailsTabSelCatTblBodyRow, 1,
                                                    catalogName, "td"));

            /// 5. Verify that the Portals table populates with the cooresponding portal that the Catalog is associated to
            Assert.True(ElemGet.Grid_ContainsRecord(browser, AMP.PubDetailsTabPortalsTbl, Bys.ActivityMainPage.PubDetailsTabPortalsTblBodyRow, 0,
                                                    portalName, "td"));

            /// 6. Click the X icon in the catalog row of the selected table and verify that it gets removed from the selected table and added to
            /// the available table. Also verify that the portal gets removed from the portals table
            AMP.RemoveCatalogFromActivity(catalogName);
            Assert.True(ElemGet.Grid_ContainsRecord(browser, AMP.PubDetailsTabAvailCatTbl, Bys.ActivityMainPage.PubDetailsTabAvailCatTblBodyRow, 1,
                                                    catalogName, "td", Bys.ActivityMainPage.PubDetailsTabAvailCatTblFirstBtn, Bys.ActivityMainPage.PubDetailsTabAvailCatTblNextBtn));
            Assert.False(ElemGet.Grid_ContainsRecord(browser, AMP.PubDetailsTabSelCatTbl, Bys.ActivityMainPage.PubDetailsTabSelCatTblBodyRow, 1,
                                                     catalogName, "td"));
            Assert.False(ElemGet.Grid_ContainsRecord(browser, AMP.PubDetailsTabPortalsTbl, Bys.ActivityMainPage.PubDetailsTabPortalsTblBodyRow, 0,
                                                     portalName, "td"));
        }