Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
priyapower committed Jul 17, 2024
1 parent 032207d commit f6e0073
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions spec/components/form/step_navigation_component_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
RSpec.describe Form::StepNavigationComponent, type: :component do
context "can handle enabled button" do
it "enables button if value exists" do
render_inline(described_class.new(nav_back: '/details'))
expect(page).to have_selector(:link_or_button, 'Back step')
render_inline(described_class.new(nav_back: "/details"))
expect(page).to have_selector(:link_or_button, "Back step")
end
end

context "can handle disabled button" do
it "disables buttons if value is nil" do
render_inline(described_class.new())
expect(page).not_to have_selector(:link_or_button, 'Next step')
render_inline(described_class.new)
expect(page).not_to have_selector(:link_or_button, "Next step")
end
end
end

0 comments on commit f6e0073

Please sign in to comment.