예제 #1
0
        public static PaymentTypes PaymentTypePopup(string[] paymentTypes)
        {
            int paymentTypeChoice = ChooserPopup.ShowPopup("Choose payment method", null, paymentTypes.ToList());

            PluginContext.Log.Info($"Payment method selected with popup: {paymentTypeChoice}");
            return(paymentTypeChoice < 0 ? PaymentTypes.COD : (PaymentTypes)paymentTypeChoice);
        }
예제 #2
0
        public void ManageGuestList()
        {
            string targetStudy = "AutoTest-" + DataGen.String(5);

            CloneEntity("STUDY00000017", targetStudy);

            var ActionsNav = new ActivitiesNav();
            var ManageGuestListPagePopup = new ManageGuestList("STUDY-" + targetStudy, "Manage Guest List");
            var SelectPersonsPage        = new ChooserPopup("Persons", true);

            Store.LoginAsUser(Users.Irbd);

            var studyForReview = new CCElement(By.LinkText(targetStudy));

            studyForReview.Click();

            ActionsNav.LnkManageGuestList.Click();
            ManageGuestListPagePopup.SwitchTo();
            ManageGuestListPagePopup.BtnAddGuest.Click();

            SelectPersonsPage.SwitchTo();
            SelectPersonsPage.SelectValue("Jones (irbc2)", "Last");
            SelectPersonsPage.BtnOk.Click();
            SelectPersonsPage.SwitchBackToParent();

            ManageGuestListPagePopup.BtnOk.Click();
            ManageGuestListPagePopup.SwitchBackToParent();

            Wait.Until(h => new CCElement(By.LinkText("Guest List Updated")).Exists);
            Assert.IsTrue(new CCElement(By.LinkText("Guest List Updated")).Exists, "'Guest List Updated' activity not found for:  " + targetStudy);
        }