Skip to content

Instantly share code, notes, and snippets.

@marduke182
Created April 17, 2018 12:29
Show Gist options
  • Select an option

  • Save marduke182/dad799f01464aab5a6a058e31f0f4da3 to your computer and use it in GitHub Desktop.

Select an option

Save marduke182/dad799f01464aab5a6a058e31f0f4da3 to your computer and use it in GitHub Desktop.
functional
const requestWithCardAndNewCustomer = flexRequestBuilder.build(
flexRequestBuilder.withNewCustomer,
flexRequestBuilder.withCard,
);
const paymentMethodApplication = loanApplicatioBuilder.build(
loanApplicatioBuilder.withMoreInfo,
loanApplicatioBuilder.withComponent('payment-method'),
);
test('should show only card', () => {
fakeLoanApplication.getFlexRequest(requestWithCardAndNewCustomer);
fakeLoanApplication.putLoanApplication(paymentMethodApplication);
await page.goto(home);
await page.waitFor(cardFormSelector);
const cardForm = element(cardFormSelector);
const paypalForm = element(paypalFormSelector);
expect(cardForm).toExist();
expect(paypalForm ).not.toExist();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment