コード例 #1
0
        private void verifyBeforeActAddresseeCells()
        {
            var cells = ParentalSalutationAndAddresseeDetail.GetCellText(DefaultAddresseeColumn);

            Assert.AreEqual(cells[0], FirstAddresseeName);
            Assert.AreEqual(cells[cells.Count - 1], LastAddresseeName);
        }
コード例 #2
0
        public void Can_FloodFill_Applicant_Parental_Salutation_With_Override_Not_Checked()
        {
            lock (_commonObject)
            {
                // Initialise
                string firstSalutationName;
                string lastSalutationName;
                string firstAddresseeName;
                string lastAddresseeName;

                //Arrange
                DataPackage dataPackage = GetDataPackage("BU_APP_PSA_T2", out firstSalutationName, out lastSalutationName, out firstAddresseeName, out lastAddresseeName);

                using (new DataSetup(purgeBeforeInsert: false, purgeAfterTest: false, packages: dataPackage))
                {
                    NavigateToBulkUpdateApplicantParentalSalutationDetailScreen();

                    //Act
                    ParentalSalutationAndAddresseeDetail.ExecuteJavaScriptToBulkSelectParentalSalutation();

                    SeleniumHelper.WaitForElementClickableThenClick(ParentalSalutationAndAddresseeDetail.FloodFillGenerateForSelected);

                    IWebElement IsDirtyIndicator = SeleniumHelper.Get(ParentalSalutationAndAddresseeDetail.IsDirtyIndicator);

                    //Assert
                    Assert.IsFalse(IsDirtyIndicator.Displayed, "Page is not dirty");
                }
            }
        }
コード例 #3
0
        public void Can_Update_individual_Applicant_Parental_Addressee()
        {
            lock (_commonObject)
            {
                string firstSalutationName;
                string lastSalutationName;
                string firstAddresseeName;
                string lastAddresseeName;

                var dataPackage = GetDataPackage("BU_APP_PSA_T4", out firstSalutationName, out lastSalutationName,
                                                 out firstAddresseeName, out lastAddresseeName);

                using (new DataSetup(purgeBeforeInsert: false, purgeAfterTest: false, packages: dataPackage))
                {
                    NavigateToBulkUpdateApplicantParentalSalutationDetailScreen();

                    //Act
                    ParentalSalutationAndAddresseeDetail.DeleteParentalAddresseeColumnValues();
                    ParentalSalutationAndAddresseeDetail.ClickFirstCellofColumn(DefaultAddresseeColumn);
                    ParentalSalutationAndAddresseeDetail.ExecuteJavaScriptToBulkParentalAddresseeFloodFillMenuClick();
                    ParentalSalutationAndAddresseeDetail.FloodFillAddresseeColumnWithOverride();

                    //Assert
                    var cells = ParentalSalutationAndAddresseeDetail.GetCellText(DefaultAddresseeColumn);
                    Assert.AreEqual(cells[0], firstAddresseeName);
                    Assert.AreEqual(cells[1], string.Empty);

                    IWebElement IsDirtyIndicator = SeleniumHelper.Get(ParentalSalutationAndAddresseeDetail.IsDirtyIndicator);
                    Assert.IsTrue(IsDirtyIndicator.Displayed);
                }
            }
        }
コード例 #4
0
        public void Can_FloodFill_Pupil_Parental_Addressee_With_Override_Not_Checked()
        {
            lock (_lockObject)
            {
                try
                {
                    //Arrange
                    DataPackage dataPackage = GetDataPackage("BU_PUP_PSA_T4", 6);
                    using (new DataSetup(purgeBeforeInsert: false, purgeAfterTest: false, packages: dataPackage))
                    {
                        Select_Year_And_NavigateToBulkUpdateDetailScreen();
                        verifyBeforeActAddresseeCells();

                        //Act
                        ParentalSalutationAndAddresseeDetail.ExecuteJavaScriptToBulkSelectParentalAddressee();
                        Wait.WaitForAjaxReady(By.ClassName("locking-mask"));
                        IWebElement applyToSelected = SeleniumHelper.Get(ParentalSalutationAndAddresseeDetail.ParentalAddresseeFloodFillGenerateForSelected);
                        applyToSelected.Click();
                        Wait.WaitForAjaxReady(By.ClassName("locking-mask"));
                        IWebElement IsDirtyIndicator = SeleniumHelper.Get(ParentalSalutationAndAddresseeDetail.IsDirtyIndicator);

                        //Assert
                        Assert.IsFalse(IsDirtyIndicator.Displayed);
                    }
                }
                finally
                {
                    //
                }
            }
        }
コード例 #5
0
        public void Can_Update_individual_Parental_Addressee()
        {
            lock (_lockObject)
            {
                try
                {
                    //Arrange
                    DataPackage dataPackage = GetDataPackage("BU_PUP_PSA_T3", 3);
                    using (new DataSetup(purgeBeforeInsert: false, purgeAfterTest: false, packages: dataPackage))
                    {
                        Select_Year_And_NavigateToBulkUpdateDetailScreen();
                        verifyBeforeActAddresseeCells();

                        //Act
                        ParentalSalutationAndAddresseeDetail.DeletePupilParentalAddresseeColumnValues();
                        ParentalSalutationAndAddresseeDetail.ClickFirstCellofColumn(DefaultAddresseeColumn);
                        Wait.WaitForAjaxReady(By.ClassName("locking-mask"));
                        ParentalSalutationAndAddresseeDetail.ExecuteJavaScriptToBulkParentalAddresseeFloodFillMenuClick();
                        Wait.WaitForAjaxReady(By.ClassName("locking-mask"));
                        ParentalSalutationAndAddresseeDetail.FloodFillAddresseeColumnWithOverride();

                        //Assert
                        var cells = (ParentalSalutationAndAddresseeDetail.GetCellText(DefaultAddresseeColumn));
                        Assert.IsTrue(cells[0] == FirstAddresseeName);
                        IWebElement IsDirtyIndicator = SeleniumHelper.Get(ParentalSalutationAndAddresseeDetail.IsDirtyIndicator);
                        Assert.IsTrue(IsDirtyIndicator.Displayed);
                    }
                }
                finally
                {
                    //
                }
            }
        }
コード例 #6
0
        public void Can_FloodFill_Pupil_Parental_Addressee()
        {
            lock (_lockObject)
            {
                try
                {
                    //Arrange
                    DataPackage dataPackage = GetDataPackage("BU_PUP_PSA_T2", 15);
                    using (new DataSetup(purgeBeforeInsert: false, purgeAfterTest: false, packages: dataPackage))
                    {
                        Select_Year_And_NavigateToBulkUpdateDetailScreen();
                        verifyBeforeActAddresseeCells();

                        //Act
                        ParentalSalutationAndAddresseeDetail.DeletePupilParentalAddresseeColumnValues();
                        ParentalSalutationAndAddresseeDetail.ExecuteJavaScriptToBulkSelectParentalAddressee();
                        ParentalSalutationAndAddresseeDetail.FloodFillAddresseeColumnWithOverride();

                        //Assert
                        verifyAfterActAddresseeCells();
                    }
                }
                finally
                {
                    //
                }
            }
        }
        private void CommonFloodFillTest()
        {
            lock (_commonObject)
            {
                // Initialise
                string firstSalutationName;
                string lastSalutationName;
                string firstAddresseeName;
                string lastAddresseeName;

                //Arrange
                var dataPackage = GetDataPackage("BU_APP_PSA_T1", out firstSalutationName, out lastSalutationName,
                                                 out firstAddresseeName, out lastAddresseeName);

                using (new DataSetup(purgeBeforeInsert: false, purgeAfterTest: false, packages: dataPackage))
                {
                    NavigateToBulkUpdateApplicantParentalSalutationDetailScreen();

                    //Act
                    ParentalSalutationAndAddresseeDetail.DeleteParentalSalutationColumnValues();
                    ParentalSalutationAndAddresseeDetail.ExecuteJavaScriptToBulkSelectParentalSalutation();
                    ParentalSalutationAndAddresseeDetail.FloodFillSalutationColumnWithOverride();

                    //Assert
                    var cells = ParentalSalutationAndAddresseeDetail.GetCellText(DefaultSalutationColumn);

                    Assert.AreEqual(cells[0], firstSalutationName);
                    Assert.AreEqual(cells[1], lastSalutationName);

                    IWebElement IsDirtyIndicator = SeleniumHelper.Get(ParentalSalutationAndAddresseeDetail.IsDirtyIndicator);

                    Assert.IsTrue(IsDirtyIndicator.Displayed, "Page Dirty Indicator");
                }
            }
        }
コード例 #8
0
        private void verifyAfterActAddresseeCells()
        {
            var cells = ParentalSalutationAndAddresseeDetail.GetCellText(DefaultAddresseeColumn);

            Assert.IsTrue(cells[0] == FirstAddresseeName);
            Assert.IsTrue(cells[cells.Count - 1] == LastAddresseeName);
            IWebElement IsDirtyIndicator = SeleniumHelper.Get(ParentalSalutationAndAddresseeDetail.IsDirtyIndicator);

            Assert.IsTrue(IsDirtyIndicator.Displayed, "Dirty indicator expected");
        }
コード例 #9
0
        public void Can_Save_BulkUpdate_Applicant_Parental_Salutation_Save()
        {
            lock (_commonObject)
            {
                string firstSalutationName;
                string lastSalutationName;
                string firstAddresseeName;
                string lastAddresseeName;

                //Arrange
                DataPackage dataPackage = GetDataPackageWithNoSalutation("BU_APP_PSA_T2", out firstSalutationName,
                                                                         out lastSalutationName, out firstAddresseeName, out lastAddresseeName);
                using (new DataSetup(purgeBeforeInsert: false, purgeAfterTest: false, packages: dataPackage))
                {
                    var bulkUpdateNavigation = new AdmissionsBulkUpdateNavigation();
                    bulkUpdateNavigation.NavgateToPupilBulkUpdate_SubMenu(
                        AdmissionsBulkUpdateElements.BulkUpdate.MenuItems.ApplicantSalutationAddresseeMenuItem, LoginAs);

                    SeleniumHelper.ToggleCheckbox(AdmissionsBulkUpdateElements.BulkUpdate.Search.MissingSalutationCheckboxName);
                    SeleniumHelper.ToggleCheckbox(AdmissionsBulkUpdateElements.BulkUpdate.Search.MissingAddresseeCheckboxName);

                    SeleniumHelper.ChooseSelectorOption(ParentalSalutationAndAddresseeDetail.YearGroupDropDownList, _admissionYear);

                    SeleniumHelper.ChooseSelectorOption(ParentalSalutationAndAddresseeDetail.SchoolIntakeDropDownList,
                                                        _schoolIntakeName);

                    SeleniumHelper.ChooseSelectorOption(ParentalSalutationAndAddresseeDetail.AdmissionGroupDropDownList,
                                                        _admissionGroupName);

                    //SeleniumHelper.FindAndClick(PupilBulkUpdateElements.BulkUpdate.Search.SearchButton, TimeSpan.FromSeconds(20));
                    SeleniumHelper.WaitForElementClickableThenClick(AdmissionsBulkUpdateElements.BulkUpdate.Search.SearchButton);
                    var rowCount = SeleniumHelper.Get(AdmissionsBulkUpdateElements.BulkUpdate.Detail.RowCount);
                    Assert.AreEqual("Rows: 2", rowCount.Text);

                    ParentalSalutationAndAddresseeDetail.ClickFirstCellofColumn(DefaultSalutationColumn);
                    ParentalSalutationAndAddresseeDetail.GetEditor().SendKeys("test");

                    SeleniumHelper.WaitForElementClickableThenClick(
                        AdmissionsBulkUpdateElements.BulkUpdate.MenuItems.PupilBulkUpdateSaveButton);

                    WebDriverWait waiter = new WebDriverWait(WebContext.WebDriver,
                                                             TimeSpan.FromSeconds(AdmissionsBulkUpdateElements.BulkUpdate.Detail.Timeout));

                    waiter.Until(ExpectedConditions.ElementIsVisible(AdmissionsBulkUpdateElements.BulkUpdate.Detail.SaveMessageCss));
                    string actualText = WebContext.WebDriver.FindElement(AdmissionsBulkUpdateElements.BulkUpdate.Detail.SaveMessageCss).Text;
                    Assert.AreEqual(AdmissionsBulkUpdateElements.BulkUpdate.Detail.SaveMessage, actualText);
                }
            }
        }