From eacf3e1ad4befa0fdf71a86dda8d0853d7256e9e Mon Sep 17 00:00:00 2001 From: JG Date: Mon, 23 May 2022 12:15:52 +0100 Subject: [PATCH] checking that navigation tab is highlighted --- features/step_definitions/data_coordinator_steps.rb | 6 ++++++ features/users/data_coordinator.feature | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/features/step_definitions/data_coordinator_steps.rb b/features/step_definitions/data_coordinator_steps.rb index c41796466..fdab99278 100644 --- a/features/step_definitions/data_coordinator_steps.rb +++ b/features/step_definitions/data_coordinator_steps.rb @@ -12,3 +12,9 @@ Then("I see information about those users") do expect(page.body).to have_content user.email end end + +Then('the user navigation bar is highlighted') do + expect(page).to have_css('[aria-current="page"]', text: "Users") + expect(page).not_to have_css('[aria-current="page"]', text: "About your organisation") + expect(page).not_to have_css('[aria-current="page"]', text: "Logs") +end diff --git a/features/users/data_coordinator.feature b/features/users/data_coordinator.feature index d5d78add5..20751cfcf 100644 --- a/features/users/data_coordinator.feature +++ b/features/users/data_coordinator.feature @@ -4,5 +4,6 @@ Feature: Data Coordinator Features Scenario: Viewing users Given there are multiple users in the same organization - And I visit the users page + When I visit the users page Then I see information about those users + And the user navigation bar is highlighted