<%= govuk_summary_list do |summary_list| %>
+ <%= organisation_name_row(user: current_user, organisation: @organisation, summary_list:) %>
<% @organisation.display_organisation_attributes.each do |attr| %>
<% if can_edit_org?(current_user) && attr[:editable] %>
<%= summary_list.row do |row| %>
diff --git a/spec/models/organisation_spec.rb b/spec/models/organisation_spec.rb
index 0cdfc014e..c6179b34f 100644
--- a/spec/models/organisation_spec.rb
+++ b/spec/models/organisation_spec.rb
@@ -236,16 +236,17 @@ RSpec.describe Organisation, type: :model do
it "does not include data protection agreement" do
expect(organisation.display_organisation_attributes).to eq(
- [{ editable: true, name: "Name", value: "DLUHC" },
- { editable: false, name: "Organisation ID", value: "ORG#{organisation.id}" },
- { editable: true,
- name: "Address",
- value: "2 Marsham Street\nLondon\nSW1P 4DF" },
- { editable: true, name: "Telephone number", value: nil },
- { editable: false, name: "Type of provider", value: "Local authority" },
- { editable: false, name: "Registration number", value: "1234" },
- { editable: false, format: :bullet, name: "Rent periods", value: %w[All] },
- { editable: false, name: "Owns housing stock", value: "Yes" }],
+ [
+ { editable: false, name: "Organisation ID", value: "ORG#{organisation.id}" },
+ { editable: true,
+ name: "Address",
+ value: "2 Marsham Street\nLondon\nSW1P 4DF" },
+ { editable: true, name: "Telephone number", value: nil },
+ { editable: false, name: "Type of provider", value: "Local authority" },
+ { editable: false, name: "Registration number", value: "1234" },
+ { editable: false, format: :bullet, name: "Rent periods", value: %w[All] },
+ { editable: false, name: "Owns housing stock", value: "Yes" },
+ ],
)
end
end
diff --git a/spec/requests/organisations_controller_spec.rb b/spec/requests/organisations_controller_spec.rb
index 7ba7be1b2..896f760ba 100644
--- a/spec/requests/organisations_controller_spec.rb
+++ b/spec/requests/organisations_controller_spec.rb
@@ -262,9 +262,9 @@ RSpec.describe OrganisationsController, type: :request do
expect(response.body).to include(organisation.name)
end
- it "has a change details link" do
+ it "does not include a change details link" do
expected_html = "data-qa=\"change-name\" href=\"/organisations/#{organisation.id}/edit\""
- expect(response.body).to include(expected_html)
+ expect(response.body).not_to include(expected_html)
end
it "displays a link to merge organisations" do
@@ -345,9 +345,9 @@ RSpec.describe OrganisationsController, type: :request do
get "/organisations/#{organisation.id}/edit", headers:, params: {}
end
- it "shows an edit form" do
+ it "shows an edit form without name field" do
expect(response.body).to include("Change #{organisation.name}’s details")
- expect(page).to have_field("organisation-name-field")
+ expect(page).not_to have_field("organisation-name-field")
expect(page).to have_field("organisation-phone-field")
end
end
From d87d6a7fb378fca884b600513a32f979f0b81f83 Mon Sep 17 00:00:00 2001
From: kosiakkatrina <54268893+kosiakkatrina@users.noreply.github.com>
Date: Mon, 24 Jul 2023 10:13:05 +0100
Subject: [PATCH 2/4] Update node version from ^16.0.0 to ^18.0.0 and ruby
3.1.2 to 3.1.4 (#1794)
* Update govuk-prototype-components
* Update node version
* Udate versions in the pipeline
* Do not fix to a specific buildpack version
* Update ruby version
* Upgrade govuk-frontend
* Update summary cards to use govuk frontend component
---
.github/workflows/production_pipeline.yml | 4 +-
.github/workflows/staging_pipeline.yml | 6 +-
.nvmrc | 2 +-
.ruby-version | 2 +-
Dockerfile | 4 +-
Dockerfile_dev | 2 +-
Gemfile | 2 +-
Gemfile.lock | 2 +-
.../bulk_upload_error_row_component.html.erb | 10 +-
...swers_summary_list_card_component.html.erb | 8 +-
app/frontend/application.js | 2 +-
.../controllers/govukfrontend_controller.js | 2 +-
.../_interruption_screen_question.html.erb | 4 +-
app/views/form/review.html.erb | 8 +-
config/cloud_foundry/review_manifest.yml | 2 +-
docs/setup.md | 4 +-
manifest.yml | 2 +-
package.json | 6 +-
.../check_answers_page_lettings_logs_spec.rb | 6 +-
.../check_answers_page_sales_logs_spec.rb | 30 +-
.../show.html.erb_spec.rb | 2 +-
.../summary.html.erb_spec.rb | 2 +-
.../show.html.erb_spec.rb | 2 +-
.../summary.html.erb_spec.rb | 2 +-
webpack.config.js | 2 +-
yarn.lock | 2138 ++++++++---------
26 files changed, 1035 insertions(+), 1221 deletions(-)
diff --git a/.github/workflows/production_pipeline.yml b/.github/workflows/production_pipeline.yml
index 7c0eaca52..fd0a73b9d 100644
--- a/.github/workflows/production_pipeline.yml
+++ b/.github/workflows/production_pipeline.yml
@@ -68,7 +68,7 @@ jobs:
uses: actions/setup-node@v3
with:
cache: yarn
- node-version: 16
+ node-version: 18
- name: Create database
run: |
@@ -127,7 +127,7 @@ jobs:
uses: actions/setup-node@v3
with:
cache: yarn
- node-version: 16
+ node-version: 18
- name: Create database
run: |
diff --git a/.github/workflows/staging_pipeline.yml b/.github/workflows/staging_pipeline.yml
index a5b8cc58a..06f22632b 100644
--- a/.github/workflows/staging_pipeline.yml
+++ b/.github/workflows/staging_pipeline.yml
@@ -60,7 +60,7 @@ jobs:
uses: actions/setup-node@v3
with:
cache: yarn
- node-version: 16
+ node-version: 18
- name: Create database
run: |
@@ -118,7 +118,7 @@ jobs:
uses: actions/setup-node@v3
with:
cache: yarn
- node-version: 16
+ node-version: 18
- name: Create database
run: |
@@ -149,7 +149,7 @@ jobs:
uses: actions/setup-node@v3
with:
cache: yarn
- node-version: 16
+ node-version: 18
- name: Install packages and symlink local dependencies
run: |
diff --git a/.nvmrc b/.nvmrc
index b6a7d89c6..3c032078a 100644
--- a/.nvmrc
+++ b/.nvmrc
@@ -1 +1 @@
-16
+18
diff --git a/.ruby-version b/.ruby-version
index ef538c281..0aec50e6e 100644
--- a/.ruby-version
+++ b/.ruby-version
@@ -1 +1 @@
-3.1.2
+3.1.4
diff --git a/Dockerfile b/Dockerfile
index 65db290a7..43479ee9c 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,5 +1,5 @@
# Build compilation image
-FROM ruby:3.1.2-alpine as builder
+FROM ruby:3.1.4-alpine as builder
# The application runs from /app
WORKDIR /app
@@ -45,7 +45,7 @@ RUN rm -rf node_modules log tmp && \
find /usr/local/bundle/gems -name "*.html" -delete
# Build runtime image
-FROM ruby:3.1.2-alpine as production
+FROM ruby:3.1.4-alpine as production
# The application runs from /app
WORKDIR /app
diff --git a/Dockerfile_dev b/Dockerfile_dev
index 086e874ba..e80f1d816 100644
--- a/Dockerfile_dev
+++ b/Dockerfile_dev
@@ -1,5 +1,5 @@
# Build compilation image
-FROM ruby:3.1.2-alpine
+FROM ruby:3.1.4-alpine
# The application runs from /app
WORKDIR /app
diff --git a/Gemfile b/Gemfile
index 229ae16e6..dacc8458d 100644
--- a/Gemfile
+++ b/Gemfile
@@ -3,7 +3,7 @@
source "https://rubygems.org"
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
-ruby "3.1.2"
+ruby "3.1.4"
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails', branch: 'main'
gem "rails", "~> 7.0.2"
diff --git a/Gemfile.lock b/Gemfile.lock
index 50fbe0b49..be93cd4b3 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -501,7 +501,7 @@ DEPENDENCIES
webmock
RUBY VERSION
- ruby 3.1.2p20
+ ruby 3.1.4p223
BUNDLED WITH
2.3.14
diff --git a/app/components/bulk_upload_error_row_component.html.erb b/app/components/bulk_upload_error_row_component.html.erb
index 54a2c6c93..edf480a1a 100644
--- a/app/components/bulk_upload_error_row_component.html.erb
+++ b/app/components/bulk_upload_error_row_component.html.erb
@@ -1,13 +1,13 @@
-
-