Example #1
0
        public void WhenIChangeTheNumberOfApprentices()
        {
            EditApprenticeshipsPage editApprenticeshipsPage = new EditApprenticeshipsPage(WebSite.getDriver());

            editApprenticeshipsPage.ChangeTheNumberOfApprentice("2");
            editApprenticeshipsPage.ClickOnPageHeader();
        }
Example #2
0
        public void WhenIEnterATrainingCostMoreThanTheFundingCap()
        {
            EditApprenticeshipsPage editApprenticeshipsPage = new EditApprenticeshipsPage(WebSite.getDriver());

            editApprenticeshipsPage.ChangeTheFunding("99,000");
            editApprenticeshipsPage.ContinueButton.Click();
        }
Example #3
0
 public void WhenISelectTheButton(string p0)
 {
     if (p0 == "Check if I can fund this")
     {
         EditApprenticeshipsPage editApprenticeshipsPage = new EditApprenticeshipsPage(WebSite.getDriver());
         editApprenticeshipsPage.ContinueButton.Click();
     }
 }
Example #4
0
        public void WhenIEnterAStartDateBeforeTheMayTwentyEighteen()
        {
            EditApprenticeshipsPage editApprenticeshipsPage = new EditApprenticeshipsPage(WebSite.getDriver());

            editApprenticeshipsPage.ChangeStartDateMonth("3");
            editApprenticeshipsPage.ChangeStartDateYear("2015");
            editApprenticeshipsPage.ContinueButton.Click();
        }
Example #5
0
        public void WhenIEnterAStartDateBeforeTheCurrentMonth()
        {
            EditApprenticeshipsPage editApprenticeshipsPage = new EditApprenticeshipsPage(WebSite.getDriver());
            string month = (DateTime.Now.Month - 1).ToString();
            string year  = (DateTime.Now.Year - 1).ToString();

            editApprenticeshipsPage.ChangeStartDateMonth(month);
            editApprenticeshipsPage.ChangeStartDateYear(year);
            editApprenticeshipsPage.ContinueButton.Click();
        }
Example #6
0
        public void ThenTheDefaultDetailsAreThoseOfTheApprenticeshipIWishToEdit()
        {
            EditApprenticeshipsPage editApprenticeshipsPage = new EditApprenticeshipsPage(WebSite.getDriver());

            Assert.IsTrue(editApprenticeshipsPage.ApprentishipName.Equals("Actuary - Level: Actuary"));
            Assert.IsTrue(editApprenticeshipsPage.NumberOfApprenticeships.Equals("1"));
            Assert.IsTrue(editApprenticeshipsPage.ApprenticeshipLength.Equals("36"));
            Assert.IsTrue(editApprenticeshipsPage.StartDateMonth.Equals("10"));
            Assert.IsTrue(editApprenticeshipsPage.StartDateYear.Equals("2019"));
            Assert.IsTrue(editApprenticeshipsPage.TotalFundingCost.Equals("18,000"));
        }
Example #7
0
        public void ThenTheErrorMessageIsDisplayed(string p0)
        {
            if (p0 == "The start date cannot be in the past")
            {
                EditApprenticeshipsPage editApprenticeshipsPage = new EditApprenticeshipsPage(WebSite.getDriver());
                Assert.IsTrue(editApprenticeshipsPage.IsErrorSummaryDisplayed);
                Assert.IsTrue(editApprenticeshipsPage.IsTheStartDateCannotBeInThePastErrorDisplayed);
            }

            if (p0 == "The start date must be on or after 05 2018")
            {
                EditApprenticeshipsPage editApprenticeshipsPage = new EditApprenticeshipsPage(WebSite.getDriver());
                Assert.IsTrue(editApprenticeshipsPage.IsErrorSummaryDisplayed);
                Assert.IsTrue(editApprenticeshipsPage.IsTheStartDateCannotBeInThePastErrorDisplayed);
            }

            if (p0 == "The start date cannot be in the past")
            {
                EditApprenticeshipsPage editApprenticeshipsPage = new EditApprenticeshipsPage(WebSite.getDriver());
                Assert.IsTrue(editApprenticeshipsPage.IsErrorSummaryDisplayed);
                Assert.IsTrue(editApprenticeshipsPage.IsTheStartDateCannotBeInThePastErrorDisplayed);
            }
        }
Example #8
0
        public void ThenTheEditApprenticeshipPageIsDisplayed()
        {
            EditApprenticeshipsPage editApprenticeshipsPage = new EditApprenticeshipsPage(WebSite.getDriver());

            Assert.IsTrue(editApprenticeshipsPage.IsPageLoaded);
        }
Example #9
0
        public void ThenTheTotalCostValueIsUpdated()
        {
            EditApprenticeshipsPage editApprenticeshipsPage = new EditApprenticeshipsPage(WebSite.getDriver());

            Assert.IsTrue(editApprenticeshipsPage.TotalFundingCost.Equals("36,000"));
        }
Example #10
0
        public void ThenTheGovernmentFundingCapIsUpdated()
        {
            EditApprenticeshipsPage editApprenticeshipsPage = new EditApprenticeshipsPage(WebSite.getDriver());

            Assert.IsTrue(editApprenticeshipsPage.TotalFundingCapDetails.Equals("£36,000"));
        }
Example #11
0
        public void WhenIUpdateTheDetailsChooseAnyEditableFields()
        {
            EditApprenticeshipsPage editApprenticeshipsPage = new EditApprenticeshipsPage(WebSite.getDriver());

            editApprenticeshipsPage.ChangeTheNumberOfApprentice("2");
        }