Making the Switch

Our goal is to introduce a user interface for requesting the cash withdrawal. We want Cucumber to cover us as we make these changes, so we need to change how our test code interacts with the application. Up until now, all our step definitions were talking directly to the domain model. We’re going to change that so that some of them hit the new user interface instead (see Figure 8, Introducing the user interface). Which steps need to change?

images/support-add-ui.png
Figure 8. Introducing the user interface

Let’s take a look at our scenario again:

support_code/11/features/cash_withdrawal.feature
 
Feature:​ Cash Withdrawal​​
 
Scenario:​ Successful ...

Get The Cucumber Book now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.