From 1983aa1940acc6371ae2b79ad5befd4110754215 Mon Sep 17 00:00:00 2001 From: Paul Robert Lloyd Date: Wed, 1 Dec 2021 18:54:51 +0000 Subject: [PATCH 1/3] Show correct links in header nav when signed in/out --- app/views/layouts/application.html.erb | 5 +++-- spec/features/user_spec.rb | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 19af05162..6a1a25962 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -37,10 +37,11 @@ service_url: '/' ) do |component| if current_user.nil? - component.navigation_item(text: 'Case logs', href: case_logs_path) + component.navigation_item(text: 'Sign in', href: user_session_path) elsif + component.navigation_item(text: 'Case logs', href: case_logs_path) component.navigation_item(text: 'Your organisation', href: "/organisations/#{current_user.organisation.id}") - component.navigation_item(text: 'Your account', href: '/users/account') + component.navigation_item(text: 'Your account', href: users_account_path) component.navigation_item(text: 'Sign out', href: destroy_user_session_path, options: {:method => :delete}) end end diff --git a/spec/features/user_spec.rb b/spec/features/user_spec.rb index 45bf33cb9..d70e33ec8 100644 --- a/spec/features/user_spec.rb +++ b/spec/features/user_spec.rb @@ -87,12 +87,12 @@ RSpec.describe "User Features" do it "Can navigate and sign in page with sign in button" do visit("/") - expect(page).to have_link("Case logs") - click_link("Case logs") + expect(page).to have_link("Sign in") + click_link("Sign in") fill_in("user[email]", with: user.email) fill_in("user[password]", with: "pAssword1") click_button("Sign in") - expect(page).to have_current_path("/case-logs") + expect(page).to have_current_path("/") end it "tries to access account page, redirects to log in page" do From 01a3bd4802fb173b79df115ecc29d2756ee8ba9c Mon Sep 17 00:00:00 2001 From: Paul Robert Lloyd Date: Wed, 1 Dec 2021 18:36:36 +0000 Subject: [PATCH 2/3] Update service name --- app/views/layouts/application.html.erb | 2 +- config/locales/en.yml | 2 +- spec/features/test_spec.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 19af05162..6c1f6d473 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -33,7 +33,7 @@ <%= govuk_header( logotype: 'GOV.UK', - service_name: 'Share Lettings and Sales for Social Housing in England Data with DLUHC', + service_name: t('service_name'), service_url: '/' ) do |component| if current_user.nil? diff --git a/config/locales/en.yml b/config/locales/en.yml index cf9b342d0..957b67284 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -30,4 +30,4 @@ # available at https://guides.rubyonrails.org/i18n.html. en: - hello: "Hello world" + service_name: "Log social housing lettings and sales (CORE)" diff --git a/spec/features/test_spec.rb b/spec/features/test_spec.rb index a17336378..b54b08919 100644 --- a/spec/features/test_spec.rb +++ b/spec/features/test_spec.rb @@ -2,7 +2,7 @@ require "rails_helper" RSpec.describe "Test Features" do it "Displays the name of the app" do visit("/") - expect(page).to have_content("Share Lettings and Sales for Social Housing in England Data with DLUHC") + expect(page).to have_content("Log social housing lettings and sales (CORE)") end it "Links to the About page" do From d7682117bbfafb75fe9d23e68061087b816a7dd2 Mon Sep 17 00:00:00 2001 From: Paul Robert Lloyd Date: Wed, 1 Dec 2021 18:36:42 +0000 Subject: [PATCH 3/3] Update README.md --- README.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 6e472e56c..28d7ab55e 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,13 @@ [![CI/CD Pipeline](https://github.com/communitiesuk/mhclg-data-collection-beta/actions/workflows/pipeline.yml/badge.svg?branch=main&event=push)](https://github.com/communitiesuk/mhclg-data-collection-beta/actions/workflows/pipeline.yml) -# Data Collection App - -This is the codebase for the Ruby on Rails app that will handle the submission of Lettings and Sales of Social Housing in England data. +# Log social housing lettings and sales (CORE) +This is the codebase for the Ruby on Rails app that will handle the submission of lettings and sales of social housing data in England. ## API documentation API documentation can be found here: https://communitiesuk.github.io/mhclg-data-collection-beta/. This is driven by [OpenAPI docs](docs/api/DLUHC-CORE-Data.v1.json) - ## Required Setup Pre-requisites: