示例#1
0
        private void FillInPaymentDetails(BsgForm bsg)
        {
            var form = App.FormForModel <PaymentDetails>();

            form.GetRadio("Verify existing HasBankAccount populated", m => m.HasBankAccount, t => t.Should().Be(bsg.PaymentDetails.HasBankAccount.ToString()));

            form.SelectRadio(m => m.HasBankAccount, true);
            form.TypeText(m => m.NameOfAccountHolder, "coc account holder");
            form.TypeText(m => m.NameOfBank, "coc bank name");
            form.TypeText(m => m.SortCode, "02-03-04");
            form.TypeText(m => m.AccountNumber, "12345678");
            form.TypeText(m => m.RollNumber, "coc_roll_number");
        }
示例#2
0
        private void FillInApplicantDetails(BsgForm bsg)
        {
            var form = App.FormForModel <ApplicantDetails>();

            form.GetText("Verify existing Title populated", m => m.Title, t => t.Should().NotBeNullOrWhiteSpace());
            form.GetText("Verify existing FullName", m => m.FullName, t => t.Should().NotBeNullOrWhiteSpace());
            form.GetText("Verify existing Address.Line1", m => m.Address.Line1, t => t.Should().NotBeNullOrWhiteSpace());
            form.GetText("Verify existing MobilePhoneNumber", m => m.MobilePhoneNumber, t => t.Should().NotBeNullOrWhiteSpace());
            form.GetText("Verify existing HomePhoneNumer", m => m.HomePhoneNumer, t => t.Should().NotBeNullOrWhiteSpace());
            form.GetText("Verify existing EmailAddress", m => m.EmailAddress, t => t.Should().NotBeNullOrWhiteSpace());

            form.TypeText(m => m.Title, "coc title");
            form.TypeText(m => m.FullName, "coc full name");
            form.TypeText(m => m.Address.Line1, "coc a.line1");
            form.TypeText(m => m.Address.Line2, "coc a.line2");
            form.TypeText(m => m.Address.Line3, "coc a.line3");
            form.TypeText(m => m.Address.Postcode, "CO1 1CP");
            form.TypeText(m => m.MobilePhoneNumber, "1234567");
            form.TypeText(m => m.HomePhoneNumer, "2345678");
            form.TypeText(m => m.EmailAddress, "*****@*****.**");
        }
示例#3
0
        public void CompleteApplication()
        {
            var     userId = "*****@*****.**";
            BsgForm bsg    = null;

            Db(r =>
            {
                bsg =
                    new BestStartGrantBuilder("existingForm")
                    .PreviousApplicationFor(userId)
                    .Insert(f =>
                {
                    f.ApplicantDetails.FirstName = "st_fn";
                });
            });

            App.GoTo(FormUI.Controllers.Home.HomeActions.Index());
            App.VerifyCanSeeText("Tell us if something has changed");
            App.Submit();

            FillInConsent();
            App.Submit();

            FillInIdentity(userId);
            App.VerifyCanSeeText("confirm who you are");
            App.Submit();

            FillInOptions();
            App.Submit();

            FillInApplicantDetails(bsg);
            App.Submit();

            var expectancyDate = DateTime.UtcNow.Date.AddDays(100);

            FillInExpectedChildren(expectancyDate);
            App.Submit();

            FillInHealthProfessional();
            App.Submit();

            FillInPaymentDetails(bsg);
            App.Submit();

            var filename = FillInEvidence();

            App.ClickButton("");

            FillInDeclaration();
            App.Submit();

            App.VerifyCanSeeText("Thank you");

            Db(r =>
            {
                var doc = r.Query <ChangeOfCircs>().ToList().Single();

                VerifyConsent(doc);
                VerifyIdentity(doc, userId);
                VerifyOptions(doc);
                VerifyApplicantDetails(doc);
                VerifyExpectedChildren(doc, expectancyDate);
                VerifyHealthProfessional(doc);
                VerifyPaymentDetails(doc);
                VerifyEvidence(doc, filename);
                VerifyDeclaration(doc);
            });
        }