Skip to content

Instantly share code, notes, and snippets.

@chrismckelt
Created March 26, 2023 21:38
Show Gist options
  • Save chrismckelt/b45e6b45ea3665783307d821cc5610c0 to your computer and use it in GitHub Desktop.
Save chrismckelt/b45e6b45ea3665783307d821cc5610c0 to your computer and use it in GitHub Desktop.
Subcutaneous end to end test
using Demo.Core.ReadModels.LoanApplication;
using Demo.TestsUtility.TestAttributes;
using TestStack.BDDfy;
using Xunit;
namespace Demo.Subcutaneous.Tests.Scenarios.V2
{
[Story(
AsA = "As Scenario 1 tester",
IWant = "I want create an end to end small loan quote",
SoThat = "So that I can verify successful creation of a loan including bank statements, contract signing and origination status")]
[Collection("SubcutaneousTest")]
public class EndToEndTest : LoanApplicationV2TestBase
{
public EndToEndTest(SubcutaneousTestFixture fixture) : base(fixture) { }
[SkipTestFact]
public void With_bankstatements_results_in_originations_workflow_at_start_credit_assessment()
{
this.Given(s => s.A_new_loan_application("EndToEndTest.With_bankstatements_results_in_originations_workflow_at_start_credit_assessment"))
.And(s => s.With_mocked_veda_service())
.When(s => s.Start_application_for_small_loan_amount())
.When(s => s.Retrieve_saved_read_model())
.And(s => s.Bank_statements_login_valid_using_cba())
.When(s => s.Submitting_screen_personal_details())
.When(s => s.WaitUntil(AppFormReadModel.Stage.NominateBankAccount))
.Then(s => s.Retrieve_saved_read_model())
.And(s => s.Saving_nominated_bank_account())
.When(s => s.Submitting_screen_financial_postion())
.And(s => s.WaitUntil(AppFormReadModel.Stage.ConditionalOffer))
.Then(s => s.Conditional_offer_is_created())
.When(s => s.Esign_contract())
.And(s => s.Submitting_screen_5())
.Then(s => s.The_application_is_accepted_as_signed())
.And(s => s.WaitUntil(AppFormReadModel.Stage.Completed))
.And(s => s.Origination_workflow_current_step_is_ready_for_funding())
.And(s => s.Information_is_stored_correctly_in_loan_management_system())
.BDDfy("End to end small loan with with bank statements, contract signing and origination workflow complete");
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment