Ejemplo n.º 1
0
        public void Plasc_Create_New_Return_Test()
        {
            //Arrange
            LoginAndNavigateToPlascScreen();

            PlascTripletPage plascTripletPage = new PlascTripletPage();

            //Act - Open add dialog and create new return
            PlascCreateDialog plascCreateDialog = plascTripletPage.OpenPlascCreateDialog();

            plascCreateDialog.ReturnTypeDropdown        = PLASC2017.Return_Type;
            plascCreateDialog.ReturnTypeVersionDropdown = PLASC2017.Return_Version;
            plascTripletPage = plascCreateDialog.ClickOkButtonAndWaitAjaxForCompletion();

            #region commented code - Alternate way to assert

            /*
             * //Search and verify if return is created
             * plascTripletPage.SearchCriteria.ReturnTypeDropdown = this.Return_Type;
             * plascTripletPage.SearchCriteria.ReturnTypeVersionDropdown = this.Return_Version;
             * Wait.WaitTillAllAjaxComplete();
             *
             * var plascSearchTiles = plascTripletPage.SearchCriteria.Search();
             *
             * Assert.IsTrue(plascSearchTiles.Count() > 0);
             */
            #endregion

            //Assert - Let detail view refresh
            Assert.IsTrue(plascTripletPage.WaitForDetailsViewAutoRefresh(120));
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Loads return page, searches return, creates a return if needed and populates detail screen panel
        /// </summary>
        private void LoadReturnDetailPanel()
        {
            //Navigate to statutory return screen
            LoginAndNavigateToPlascScreen();

            PlascTripletPage plascTripletPage = new PlascTripletPage();

            //Perform search
            plascTripletPage.SearchCriteria.ReturnTypeDropdown        = PLASC2017.Return_Type;
            plascTripletPage.SearchCriteria.ReturnTypeVersionDropdown = PLASC2017.Return_Version;
            Wait.WaitTillAllAjaxCallsComplete();

            var plascSearchTiles = plascTripletPage.SearchCriteria.Search();

            if (plascTripletPage.SearchCriteria.ClickSearchResultItemIfAny())
            {
                //wait till details are loaded
                Wait.WaitTillAllAjaxCallsComplete();
            }
            else
            {
                /**no Serach results, let's create one**/

                //Open add dialog and create new return
                PlascCreateDialog plascCreateDialog = plascTripletPage.OpenPlascCreateDialog();
                plascCreateDialog.ReturnTypeDropdown        = PLASC2017.Return_Type;
                plascCreateDialog.ReturnTypeVersionDropdown = PLASC2017.Return_Version;
                plascTripletPage = plascCreateDialog.ClickOkButtonAndWaitAjaxForCompletion();

                //Let search result refresh
                plascTripletPage.WaitForDetailsViewAutoRefresh(120);

                //wait till details are loaded
                Wait.WaitTillAllAjaxCallsComplete();
            }
        }