From 915ed5a3b890a441144752c23a8f06db648bc9e7 Mon Sep 17 00:00:00 2001 From: Kat Date: Mon, 31 Jan 2022 15:09:57 +0000 Subject: [PATCH] fix tab navigation component spec offences --- spec/components/tab_navigation_component_spec.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/spec/components/tab_navigation_component_spec.rb b/spec/components/tab_navigation_component_spec.rb index f2436650f..9500e2118 100644 --- a/spec/components/tab_navigation_component_spec.rb +++ b/spec/components/tab_navigation_component_spec.rb @@ -7,16 +7,16 @@ RSpec.describe TabNavigationComponent, type: :component do { name: "Timeline", url: "#" }] end - context "nav tabs appearing as selected" do - it "when the item is 'current' then that tab is selected" do + context "when the item is 'current' in nav tabs" do + it "then that tab appears as selected" do result = render_inline(described_class.new(items: items)) expect(result.css('.app-tab-navigation__link[aria-current="page"]').text).to include("Application") end end - context "rendering tabs" do - it "renders all of the nav tabs specified in the items hash passed to it" do + context "when rendering tabs" do + it "all of the nav tabs specified in the items hash are passed to it" do result = render_inline(described_class.new(items: items)) expect(result.text).to include("Application")