CLDC-4432: Skip invalid field errors if the question is not routed to (#3322)
* CLDC-4432: Skip invalid field errors if the question is not routed to
* CLDC-4432: Add tests
* CLDC-4432: Lint
* fixup! CLDC-4432: Add tests
comment test dependencies
@ -659,6 +659,19 @@ RSpec.describe BulkUpload::Lettings::Year2025::RowParser do
expect(parser.errors[:field_45]).toinclude(I18n.t("validations.lettings.2025.bulk_upload.invalid_option",question:"What is the lead tenant’s nationality?"))
expect(parser.errors[:field_45]).toinclude(I18n.t("validations.lettings.2025.bulk_upload.invalid_option",question:"What is the lead tenant’s nationality?"))
end
end
end
end
context"when a field has been marked as invalid but it is not routed to"do
@ -551,6 +551,19 @@ RSpec.describe BulkUpload::Lettings::Year2026::RowParser do
expect(parser.errors[:field_46]).toinclude(match(I18n.t("validations.lettings.2026.bulk_upload.invalid_option",question:"What is the lead tenant’s nationality?")))
expect(parser.errors[:field_46]).toinclude(match(I18n.t("validations.lettings.2026.bulk_upload.invalid_option",question:"What is the lead tenant’s nationality?")))
end
end
end
end
context"when a field has been marked as invalid but it is not routed to"do
@ -351,6 +352,19 @@ RSpec.describe BulkUpload::Sales::Year2025::RowParser do
expect(parser.errors[:field_31]).toinclude(match(I18n.t("validations.sales.2025.bulk_upload.invalid_option",question:"What is buyer 1’s nationality?")))
expect(parser.errors[:field_31]).toinclude(match(I18n.t("validations.sales.2025.bulk_upload.invalid_option",question:"What is buyer 1’s nationality?")))
end
end
end
end
context"when a field has been marked as invalid but it is not routed to"do
@ -357,6 +358,19 @@ RSpec.describe BulkUpload::Sales::Year2026::RowParser do
expect(parser.errors[:field_34]).toinclude(match(I18n.t("validations.sales.2026.bulk_upload.invalid_option",question:"What is buyer 1's nationality?")))
expect(parser.errors[:field_34]).toinclude(match(I18n.t("validations.sales.2026.bulk_upload.invalid_option",question:"What is buyer 1's nationality?")))
end
end
end
end
context"when a field has been marked as invalid but it is not routed to"do