From ea328c1f905b585e12c8f378ee1e5564b719d222 Mon Sep 17 00:00:00 2001 From: JG Date: Mon, 23 May 2022 12:38:51 +0100 Subject: [PATCH] viewing your account feature code --- .../step_definitions/data_coordinator_steps.rb | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/features/step_definitions/data_coordinator_steps.rb b/features/step_definitions/data_coordinator_steps.rb index 84155c744..efc8e5e4e 100644 --- a/features/step_definitions/data_coordinator_steps.rb +++ b/features/step_definitions/data_coordinator_steps.rb @@ -30,3 +30,18 @@ end Then("the about your organisation navigation bar is highlighted") do expect(page).to have_css('[aria-current="page"]', text: "About your organisation") end + +When("I visit the your account page") do + click_link("Your account") +end + +Then("I see information about my account") do + expect(page.body).to have_content @user.name + expect(page.body).to have_content @user.email + expect(page.body).to have_content @user.organisation.name +end + +Then("the no links in navigation bar are highlighted") do + expect(page).not_to have_css('[aria-current="page"]', text: "Users") + expect(page).not_to have_css('[aria-current="page"]', text: "About your organisation") +end