Esempio n. 1
0
        public void AdminOnboardSubscriptionTest(CreatePlanData planData, string subscriptionName)
        {
            Log.Information("---Open Add-ons List Page...---");
            TestInitialize();
            var smpPage = new SmpPage(this.driver);

            Log.Information("---Open Add-ons List Page...---");
            Log.Information("Find main menu ...");
            smpPage.GetMainMenu_AdminPortal();
            smpPage.OpenMenuPlans();

            var page = new AddonListPage(this.driver);

            Log.Information("---Select Add-ons tab...---");
            page.SelectPlansTab();

            Log.Information("---Click Add-on " + planData.planName + " and check details...---");
            page.SelectPlanInTableAndCheckDatails(planData.planName);

            var configPage = new AddonConfigPage(this.driver); string name = "Cmp Wap Extension";

            Log.Information("---Click Add-on service " + name + " and check details...---");
            configPage.SelectAddonServiceInTableAndCheckDatails(name);

            var subscptPage = new SubscriptionPage(this.driver);

            Log.Information("---Onboarding subscripton...---");
            subscptPage.OnboardSubscription(planData, subscriptionName);

            Log.Information("Added subscription to plan");
        }
Esempio n. 2
0
        public void CreatePlanFromNewButton(CreatePlanData data)
        {
            Log.Information("---Click New button---");
            Browser.WaitForAjax();
            OpenDrawer();
            Log.Information("---Select Create Plan---");

            Browser.WaitForAjax();

            this.drawer.SelectItem("PLAN");

            Browser.WaitForAjax();
            this.drawer.SelectItem("CREATE PLAN");

            Log.Information("---Go through wizard to create plan---");
            var createPlanWizard = new CreatePlanWizard(this.Browser);

            System.Threading.Thread.Sleep(1000 * 2);
            createPlanWizard.Step1(data); createPlanWizard.GoNext();
            System.Threading.Thread.Sleep(1000 * 2);
            createPlanWizard.Step2(data); createPlanWizard.GoNext();
            System.Threading.Thread.Sleep(1000 * 2);
            createPlanWizard.Step3(data); createPlanWizard.Complete();
            System.Threading.Thread.Sleep(1000);
            Log.Information("---Create plan request send successfully---");
        }
Esempio n. 3
0
        public void AdminCreatePlanTest(CreatePlanData data)
        {
            Log.Information("---Start AdminCreatePlanTest---");
            TestInitialize();
            var smpPage = new SmpPage(this.driver);

            smpPage.CreatePlanFromNewButton(data);
        }
Esempio n. 4
0
        public void OnboardSubscription(CreatePlanData data, string subscriptionName) // , string cId, string cKey, string tId, string subscpt
        {
            Log.Information("---Input onboard subscription parameters...---");
            var         frame = this.Browser.SwitchTo().Frame("plansIframeWind");
            IWebElement e;

            e         = frame.FindElement(By.Id("name"));
            this.name = new HtmlTextBox(this, e);
            this.name.Input(subscriptionName);

            e = frame.FindElement(By.Id("description"));
            this.description = new HtmlTextBox(this, e);
            this.description.Input(subscriptionName);

            e             = frame.FindElement(By.Id("clientID"));
            this.clientId = new HtmlTextBox(this, e);
            this.clientId.Input(data.clientId);

            e = frame.FindElement(By.Id("clientKey"));
            this.clientKey = new HtmlTextBox(this, e);
            this.clientKey.Input(data.clientKey);

            e             = frame.FindElement(By.Id("tenantID"));
            this.tenantId = new HtmlTextBox(this, e);
            this.tenantId.Input(data.tenantId);

            e = frame.FindElement(By.Id("accountId"));
            this.azureSuscription = new HtmlTextBox(this, e);
            this.azureSuscription.Input(data.azureSubscription);
            this.AddSelectedSubscrpt = new HtmlButton(this, frame.FindElement(By.Id("azuresub-btn-add-to-plan")));
            this.Save           = new HtmlButton(this, frame.FindElement(By.Id("save-plan-config")));
            this.AddSubcrpt     = new HtmlButton(this, frame.FindElement(By.Id("azuresub-btn-add")));
            this.RemoveSubscrpt = new HtmlButton(this, frame.FindElement(By.Id("azuresub-btn-remove-from-plan")));

            e = frame.FindElement(By.Id("save-plan-config"));

            this.AddSubcrpt.Click();

            SelectSubscription(subscriptionName);

            this.AddSelectedSubscrpt.Click();
            this.Save.Click();

            Log.Information("---Onboarding subscription " + subscriptionName + " success.---");

            ScrollToElement(e, this.Browser);
            ConfigPlan();
            this.Save.Click();
        }
Esempio n. 5
0
        public void AdminChangePlanAccess(CreatePlanData planData)
        {
            Log.Information("---Open Add-ons List Page...---");
            TestInitialize();
            var smpPage = new SmpPage(this.driver);

            Log.Information("---Open Add-ons List Page...---");
            Log.Information("Find main menu ...");
            smpPage.GetMainMenu_AdminPortal();
            smpPage.OpenMenuPlans();

            var page = new AddonListPage(this.driver);

            Log.Information("---Select Add-ons tab...---");
            page.SelectPlansTab();

            Log.Information("---Click Add-on " + planData.planName + " and check details...---");
            page.SelectPlanInTable(planData.planName);
            page.ChangePlanAccess();
        }
Esempio n. 6
0
 public void Step3(CreatePlanData data)
 {
 }
Esempio n. 7
0
 public void Step2(CreatePlanData data)
 {
     this.cmpWapExtension = new HtmlCheckBox(this, By.Name("CmpWapExtension"));
     this.cmpWapExtension.Check();
 }
Esempio n. 8
0
 public void Step1(CreatePlanData data)
 {
     Log.Information("Input Plan Friendly Name.");
     this.planEntityFriendlyName.SetText(data.planName);
 }