I would recommend having 4 scenarios describing the details of each step, for example:
Given I am on step 2
When I fill in the following:
| company_name | Test Company |
| company_description | Lorem |
| company_telephone | 01928740436 |
| company_email | info@agency.com |
And I press "Create company - Proceed to step 3"
Then I should see "Test Company office(s)"
You can hide any necessary but inappropriate filling out the form in the definition of "Given that I am in step X".
You probably also have a script that covers all combinations, for example:
When I complete step 1 with valid information
And I complete step 2 with valid information
And I complete step 3 with valid information
And I complete step 4 with valid information
Then I should see "Thank you for registering"
source
share