Ejemplo n.º 1
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();
        }
Ejemplo n.º 2
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));
        }
Ejemplo n.º 3
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"));
        }