From a1ea2a09ec9cc5e95e25759e7eb997a7113aebb2 Mon Sep 17 00:00:00 2001 From: Adam Townsend Date: Sun, 1 Oct 2023 12:14:41 -0700 Subject: [PATCH] expanded click button to click any button for easier use --- features/homepage.feature | 2 +- features/step_definitions/steps.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/features/homepage.feature b/features/homepage.feature index bd6b761..3322c55 100644 --- a/features/homepage.feature +++ b/features/homepage.feature @@ -12,6 +12,6 @@ Feature: Homepage Scenario: Submitting the form without entering a URL Given I visit the '/' page - When I click the submit button + When I click the "Submit" button Then I should be on "/" page diff --git a/features/step_definitions/steps.rb b/features/step_definitions/steps.rb index affa75a..7698ccb 100644 --- a/features/step_definitions/steps.rb +++ b/features/step_definitions/steps.rb @@ -6,8 +6,8 @@ end # WHEN -When('I click the submit button') do - click_button "Submit" +When('I click the {string} button') do |string| + click_button {string} end # THEN