Browse Source

CLDC-3719: Move sale completion date question to start of setup section (#2750)

* CLDC-3716: Allow 25/26 form use on dev, review, and staging environments

* Remove empty line

* CLDC-3719: Move sale completion date question to start of setup section

* Fix test

* Update test fixture csv order
pull/2740/head^2
Rachael Booth 2 months ago committed by GitHub
parent
commit
224e49825e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      app/models/form/sales/subsections/setup.rb
  2. 6
      spec/fixtures/files/sales_logs_csv_export_codes_23.csv
  3. 6
      spec/fixtures/files/sales_logs_csv_export_codes_24.csv
  4. 6
      spec/fixtures/files/sales_logs_csv_export_labels_23.csv
  5. 6
      spec/fixtures/files/sales_logs_csv_export_labels_24.csv
  6. 6
      spec/fixtures/files/sales_logs_csv_export_non_support_labels_24.csv
  7. 4
      spec/models/form/sales/subsections/setup_spec.rb
  8. 4
      spec/models/form_spec.rb

2
app/models/form/sales/subsections/setup.rb

@ -7,10 +7,10 @@ class Form::Sales::Subsections::Setup < ::Form::Subsection
def pages def pages
@pages ||= [ @pages ||= [
Form::Sales::Pages::SaleDate.new(nil, nil, self),
Form::Sales::Pages::OwningOrganisation.new(nil, nil, self), Form::Sales::Pages::OwningOrganisation.new(nil, nil, self),
Form::Sales::Pages::ManagingOrganisation.new(nil, nil, self), Form::Sales::Pages::ManagingOrganisation.new(nil, nil, self),
Form::Sales::Pages::CreatedBy.new(nil, nil, self), Form::Sales::Pages::CreatedBy.new(nil, nil, self),
Form::Sales::Pages::SaleDate.new(nil, nil, self),
Form::Sales::Pages::PurchaserCode.new(nil, nil, self), Form::Sales::Pages::PurchaserCode.new(nil, nil, self),
Form::Sales::Pages::OwnershipScheme.new(nil, nil, self), Form::Sales::Pages::OwnershipScheme.new(nil, nil, self),
Form::Sales::Pages::SharedOwnershipType.new(nil, nil, self), Form::Sales::Pages::SharedOwnershipType.new(nil, nil, self),

6
spec/fixtures/files/sales_logs_csv_export_codes_23.csv vendored

File diff suppressed because one or more lines are too long

6
spec/fixtures/files/sales_logs_csv_export_codes_24.csv vendored

File diff suppressed because one or more lines are too long

6
spec/fixtures/files/sales_logs_csv_export_labels_23.csv vendored

File diff suppressed because one or more lines are too long

6
spec/fixtures/files/sales_logs_csv_export_labels_24.csv vendored

File diff suppressed because one or more lines are too long

6
spec/fixtures/files/sales_logs_csv_export_non_support_labels_24.csv vendored

File diff suppressed because one or more lines are too long

4
spec/models/form/sales/subsections/setup_spec.rb

@ -28,10 +28,10 @@ RSpec.describe Form::Sales::Subsections::Setup, type: :model do
it "has correct pages" do it "has correct pages" do
expect(setup.pages.map(&:id)).to eq( expect(setup.pages.map(&:id)).to eq(
%w[ %w[
completion_date
owning_organisation owning_organisation
managing_organisation managing_organisation
assigned_to assigned_to
completion_date
purchaser_code purchaser_code
ownership_scheme ownership_scheme
shared_ownership_type shared_ownership_type
@ -54,10 +54,10 @@ RSpec.describe Form::Sales::Subsections::Setup, type: :model do
it "has correct pages" do it "has correct pages" do
expect(setup.pages.map(&:id)).to eq( expect(setup.pages.map(&:id)).to eq(
%w[ %w[
completion_date
owning_organisation owning_organisation
managing_organisation managing_organisation
assigned_to assigned_to
completion_date
purchaser_code purchaser_code
ownership_scheme ownership_scheme
shared_ownership_type shared_ownership_type

4
spec/models/form_spec.rb

@ -387,10 +387,6 @@ RSpec.describe Form, type: :model do
expect(form.sections[0].class).to eq(Form::Sales::Sections::Setup) expect(form.sections[0].class).to eq(Form::Sales::Sections::Setup)
expect(form.subsections.count).to eq(1) expect(form.subsections.count).to eq(1)
expect(form.subsections.first.id).to eq("setup") expect(form.subsections.first.id).to eq("setup")
expect(form.pages.count).to eq(13)
expect(form.pages.first.id).to eq("owning_organisation")
expect(form.questions.count).to eq(14)
expect(form.questions.first.id).to eq("owning_organisation_id")
expect(form.start_date).to eq(Time.zone.parse("2022-04-01")) expect(form.start_date).to eq(Time.zone.parse("2022-04-01"))
expect(form.new_logs_end_date).to eq(Time.zone.parse("2023-11-20")) expect(form.new_logs_end_date).to eq(Time.zone.parse("2023-11-20"))
expect(form.edit_end_date).to eq(Time.zone.parse("2023-11-20")) expect(form.edit_end_date).to eq(Time.zone.parse("2023-11-20"))

Loading…
Cancel
Save