diff --git a/app/controllers/amend/WhatDoYouWantToAmendStandardController.scala b/app/controllers/amend/WhatDoYouWantToAmendStandardController.scala new file mode 100644 index 00000000..9fda39b7 --- /dev/null +++ b/app/controllers/amend/WhatDoYouWantToAmendStandardController.scala @@ -0,0 +1,71 @@ +/* + * Copyright 2026 HM Revenue & Customs + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package controllers.amend + +import controllers.actions._ +import forms.amend.WhatDoYouWantToAmendStandardFormProvider +import javax.inject.Inject +import models.NormalMode +import navigation.Navigator +import pages.amend.WhatDoYouWantToAmendStandardPage +import play.api.i18n.{I18nSupport, MessagesApi} +import play.api.mvc.{Action, AnyContent, MessagesControllerComponents} +import repositories.SessionRepository +import uk.gov.hmrc.play.bootstrap.frontend.controller.FrontendBaseController +import views.html.amend.WhatDoYouWantToAmendStandardView + +import scala.concurrent.{ExecutionContext, Future} + +class WhatDoYouWantToAmendStandardController @Inject() ( + override val messagesApi: MessagesApi, + sessionRepository: SessionRepository, + navigator: Navigator, + identify: IdentifierAction, + getData: DataRetrievalAction, + requireData: DataRequiredAction, + formProvider: WhatDoYouWantToAmendStandardFormProvider, + val controllerComponents: MessagesControllerComponents, + view: WhatDoYouWantToAmendStandardView +)(implicit ec: ExecutionContext) + extends FrontendBaseController + with I18nSupport { + + val form = formProvider() + + def onPageLoad(): Action[AnyContent] = (identify andThen getData andThen requireData) { implicit request => + + val preparedForm = request.userAnswers.get(WhatDoYouWantToAmendStandardPage) match { + case None => form + case Some(value) => form.fill(value) + } + + Ok(view(preparedForm)) + } + + def onSubmit(): Action[AnyContent] = (identify andThen getData andThen requireData).async { implicit request => + form + .bindFromRequest() + .fold( + formWithErrors => Future.successful(BadRequest(view(formWithErrors))), + value => + for { + updatedAnswers <- Future.fromTry(request.userAnswers.set(WhatDoYouWantToAmendStandardPage, value)) + _ <- sessionRepository.set(updatedAnswers) + } yield Redirect(navigator.nextPage(WhatDoYouWantToAmendStandardPage, NormalMode, updatedAnswers)) + ) + } +} diff --git a/app/forms/amend/WhatDoYouWantToAmendStandardFormProvider.scala b/app/forms/amend/WhatDoYouWantToAmendStandardFormProvider.scala new file mode 100644 index 00000000..c23db189 --- /dev/null +++ b/app/forms/amend/WhatDoYouWantToAmendStandardFormProvider.scala @@ -0,0 +1,30 @@ +/* + * Copyright 2026 HM Revenue & Customs + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package forms.amend + +import javax.inject.Inject +import forms.mappings.Mappings +import play.api.data.Form +import models.amend.WhatDoYouWantToAmendStandard + +class WhatDoYouWantToAmendStandardFormProvider @Inject() extends Mappings { + + def apply(): Form[WhatDoYouWantToAmendStandard] = + Form( + "value" -> enumerable[WhatDoYouWantToAmendStandard]("amend.whatDoYouWantToAmendStandard.error.required") + ) +} diff --git a/app/models/amend/WhatDoYouWantToAmendStandard.scala b/app/models/amend/WhatDoYouWantToAmendStandard.scala new file mode 100644 index 00000000..d96e15a7 --- /dev/null +++ b/app/models/amend/WhatDoYouWantToAmendStandard.scala @@ -0,0 +1,48 @@ +/* + * Copyright 2026 HM Revenue & Customs + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package models.amend + +import models.{Enumerable, WithName} +import play.api.i18n.Messages +import uk.gov.hmrc.govukfrontend.views.Aliases.Text +import uk.gov.hmrc.govukfrontend.views.viewmodels.radios.RadioItem + +sealed trait WhatDoYouWantToAmendStandard + +object WhatDoYouWantToAmendStandard extends Enumerable.Implicits { + + case object AmendToNilReturn extends WithName("amendToNilReturn") with WhatDoYouWantToAmendStandard + case object AmendPaymentOrSubcontractorDetails + extends WithName("amendPaymentOrSubcontractorDetails") + with WhatDoYouWantToAmendStandard + + val values: Seq[WhatDoYouWantToAmendStandard] = Seq( + AmendToNilReturn, + AmendPaymentOrSubcontractorDetails + ) + + def options(implicit messages: Messages): Seq[RadioItem] = values.zipWithIndex.map { case (value, index) => + RadioItem( + content = Text(messages(s"amend.whatDoYouWantToAmendStandard.${value.toString}")), + value = Some(value.toString), + id = Some(s"value_$index") + ) + } + + implicit val enumerable: Enumerable[WhatDoYouWantToAmendStandard] = + Enumerable(values.map(v => v.toString -> v): _*) +} diff --git a/app/pages/amend/WhatDoYouWantToAmendStandardPage.scala b/app/pages/amend/WhatDoYouWantToAmendStandardPage.scala new file mode 100644 index 00000000..cc54748f --- /dev/null +++ b/app/pages/amend/WhatDoYouWantToAmendStandardPage.scala @@ -0,0 +1,28 @@ +/* + * Copyright 2026 HM Revenue & Customs + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package pages.amend + +import models.amend.WhatDoYouWantToAmendStandard +import pages.QuestionPage +import play.api.libs.json.JsPath + +case object WhatDoYouWantToAmendStandardPage extends QuestionPage[WhatDoYouWantToAmendStandard] { + + override def path: JsPath = JsPath \ toString + + override def toString: String = "whatDoYouWantToAmendStandard" +} diff --git a/app/views/amend/WhatDoYouWantToAmendStandardView.scala.html b/app/views/amend/WhatDoYouWantToAmendStandardView.scala.html new file mode 100644 index 00000000..725bf697 --- /dev/null +++ b/app/views/amend/WhatDoYouWantToAmendStandardView.scala.html @@ -0,0 +1,49 @@ +@* + * Copyright 2026 HM Revenue & Customs + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + *@ + +@import models.amend.WhatDoYouWantToAmendStandard + +@this( + layout: templates.Layout, + formHelper: FormWithCSRF, + govukErrorSummary: GovukErrorSummary, + govukRadios: GovukRadios, + govukButton: GovukButton +) + +@(form: Form[_])(implicit request: Request[_], messages: Messages) + +@layout(pageTitle = title(form, messages("amend.whatDoYouWantToAmendStandard.title"))) { + + @formHelper(action = controllers.amend.routes.WhatDoYouWantToAmendStandardController.onSubmit(), Symbol("autoComplete") -> "off") { + + @if(form.errors.nonEmpty) { + @govukErrorSummary(ErrorSummaryViewModel(form, errorLinkOverrides = Map("value" -> "value_0"))) + } + + @govukRadios( + RadiosViewModel( + field = form("value"), + legend = LegendViewModel(messages("amend.whatDoYouWantToAmendStandard.heading")).asPageHeading(), + items = WhatDoYouWantToAmendStandard.options + ) + ) + + @govukButton( + ButtonViewModel(messages("site.continue")) + ) + } +} diff --git a/conf/app.routes b/conf/app.routes index fcd90f4d..407a46f4 100644 --- a/conf/app.routes +++ b/conf/app.routes @@ -173,3 +173,6 @@ POST /amend-monthly-return/what-do-you-want-to-amend-nil GET /manage-cis-return/amend-monthly-return/confirm-amendment controllers.amend.ConfirmAmendmentController.onPageLoad() POST /manage-cis-return/amend-monthly-return/confirm-amendment controllers.amend.ConfirmAmendmentController.onSubmit() + +GET /amend-monthly-return/what-do-you-want-to-amend-standard controllers.amend.WhatDoYouWantToAmendStandardController.onPageLoad() +POST /amend-monthly-return/what-do-you-want-to-amend-standard controllers.amend.WhatDoYouWantToAmendStandardController.onSubmit() diff --git a/conf/messages.en b/conf/messages.en index 5be0caa9..9d6a5d31 100644 --- a/conf/messages.en +++ b/conf/messages.en @@ -551,3 +551,9 @@ whatDoYouWantToAmendNil.heading = What do you want to amend? whatDoYouWantToAmendNil.amendNilReturn = I want to amend this nil return whatDoYouWantToAmendNil.addPaymentOrSubcontractorDetails = I want to add payment or subcontractor details on this return whatDoYouWantToAmendNil.error.required = Select the type of amendment you want to make + +amend.whatDoYouWantToAmendStandard.title = What do you want to amend? +amend.whatDoYouWantToAmendStandard.heading = What do you want to amend? +amend.whatDoYouWantToAmendStandard.amendToNilReturn = I want to amend this standard return to a nil return +amend.whatDoYouWantToAmendStandard.amendPaymentOrSubcontractorDetails = I want to amend payment or subcontractor details on this return +amend.whatDoYouWantToAmendStandard.error.required = Select the type of amendment you want to make diff --git a/test-utils/generators/ModelGenerators.scala b/test-utils/generators/ModelGenerators.scala index 576c07d0..f394f11d 100644 --- a/test-utils/generators/ModelGenerators.scala +++ b/test-utils/generators/ModelGenerators.scala @@ -17,6 +17,7 @@ package generators import models.amend.WhatDoYouWantToAmendNil +import models.amend.WhatDoYouWantToAmendStandard import models.monthlyreturns.{Declaration, InactivityRequest} import org.scalacheck.{Arbitrary, Gen} @@ -27,6 +28,11 @@ trait ModelGenerators { Gen.oneOf(WhatDoYouWantToAmendNil.values.toSeq) } + implicit lazy val arbitraryWhatDoYouWantToAmendStandard: Arbitrary[WhatDoYouWantToAmendStandard] = + Arbitrary { + Gen.oneOf(WhatDoYouWantToAmendStandard.values.toSeq) + } + implicit lazy val arbitraryVerifySubcontractors: Arbitrary[Boolean] = Arbitrary { Gen.oneOf(true, false) diff --git a/test/controllers/amend/WhatDoYouWantToAmendStandardControllerSpec.scala b/test/controllers/amend/WhatDoYouWantToAmendStandardControllerSpec.scala new file mode 100644 index 00000000..3e4bd32a --- /dev/null +++ b/test/controllers/amend/WhatDoYouWantToAmendStandardControllerSpec.scala @@ -0,0 +1,165 @@ +/* + * Copyright 2026 HM Revenue & Customs + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package controllers.amend + +import base.SpecBase +import forms.amend.WhatDoYouWantToAmendStandardFormProvider +import models.UserAnswers +import models.amend.WhatDoYouWantToAmendStandard +import navigation.{FakeNavigator, Navigator} +import org.mockito.ArgumentMatchers.any +import org.mockito.Mockito.when +import org.scalatestplus.mockito.MockitoSugar +import pages.amend.WhatDoYouWantToAmendStandardPage +import play.api.inject.bind +import play.api.mvc.Call +import play.api.test.FakeRequest +import play.api.test.Helpers._ +import repositories.SessionRepository +import views.html.amend.WhatDoYouWantToAmendStandardView + +import scala.concurrent.Future + +class WhatDoYouWantToAmendStandardControllerSpec extends SpecBase with MockitoSugar { + + def onwardRoute = Call("GET", "/foo") + + lazy val whatDoYouWantToAmendStandardRoute = routes.WhatDoYouWantToAmendStandardController.onPageLoad().url + + val formProvider = new WhatDoYouWantToAmendStandardFormProvider() + val form = formProvider() + + "WhatDoYouWantToAmendStandard Controller" - { + + "must return OK and the correct view for a GET" in { + + val application = applicationBuilder(userAnswers = Some(emptyUserAnswers)).build() + + running(application) { + val request = FakeRequest(GET, whatDoYouWantToAmendStandardRoute) + + val result = route(application, request).value + + val view = application.injector.instanceOf[WhatDoYouWantToAmendStandardView] + + status(result) mustEqual OK + contentAsString(result) mustEqual view(form)(request, messages(application)).toString + } + } + + "must populate the view correctly on a GET when the question has previously been answered" in { + + val userAnswers = UserAnswers(userAnswersId) + .set(WhatDoYouWantToAmendStandardPage, WhatDoYouWantToAmendStandard.values.head) + .success + .value + + val application = applicationBuilder(userAnswers = Some(userAnswers)).build() + + running(application) { + val request = FakeRequest(GET, whatDoYouWantToAmendStandardRoute) + + val view = application.injector.instanceOf[WhatDoYouWantToAmendStandardView] + + val result = route(application, request).value + + status(result) mustEqual OK + contentAsString(result) mustEqual view(form.fill(WhatDoYouWantToAmendStandard.values.head))( + request, + messages(application) + ).toString + } + } + + "must redirect to the next page when valid data is submitted" in { + + val mockSessionRepository = mock[SessionRepository] + + when(mockSessionRepository.set(any())) thenReturn Future.successful(true) + + val application = + applicationBuilder(userAnswers = Some(emptyUserAnswers)) + .overrides( + bind[Navigator].toInstance(new FakeNavigator(onwardRoute)), + bind[SessionRepository].toInstance(mockSessionRepository) + ) + .build() + + running(application) { + val request = + FakeRequest(POST, whatDoYouWantToAmendStandardRoute) + .withFormUrlEncodedBody(("value", WhatDoYouWantToAmendStandard.values.head.toString)) + + val result = route(application, request).value + + status(result) mustEqual SEE_OTHER + redirectLocation(result).value mustEqual onwardRoute.url + } + } + + "must return a Bad Request and errors when invalid data is submitted" in { + + val application = applicationBuilder(userAnswers = Some(emptyUserAnswers)).build() + + running(application) { + val request = + FakeRequest(POST, whatDoYouWantToAmendStandardRoute) + .withFormUrlEncodedBody(("value", "invalid value")) + + val boundForm = form.bind(Map("value" -> "invalid value")) + + val view = application.injector.instanceOf[WhatDoYouWantToAmendStandardView] + + val result = route(application, request).value + + status(result) mustEqual BAD_REQUEST + contentAsString(result) mustEqual view(boundForm)(request, messages(application)).toString + } + } + + "must redirect to Journey Recovery for a GET if no existing data is found" in { + + val application = applicationBuilder(userAnswers = None).build() + + running(application) { + val request = FakeRequest(GET, whatDoYouWantToAmendStandardRoute) + + val result = route(application, request).value + + status(result) mustEqual SEE_OTHER + redirectLocation(result).value mustEqual controllers.routes.JourneyRecoveryController.onPageLoad().url + } + } + + "redirect to Journey Recovery for a POST if no existing data is found" in { + + val application = applicationBuilder(userAnswers = None).build() + + running(application) { + val request = + FakeRequest(POST, whatDoYouWantToAmendStandardRoute) + .withFormUrlEncodedBody(("value", WhatDoYouWantToAmendStandard.values.head.toString)) + + val result = route(application, request).value + + status(result) mustEqual SEE_OTHER + + redirectLocation(result).value mustEqual controllers.routes.JourneyRecoveryController.onPageLoad().url + } + } + } +} diff --git a/test/forms/amend/WhatDoYouWantToAmendStandardFormProviderSpec.scala b/test/forms/amend/WhatDoYouWantToAmendStandardFormProviderSpec.scala new file mode 100644 index 00000000..f28284d4 --- /dev/null +++ b/test/forms/amend/WhatDoYouWantToAmendStandardFormProviderSpec.scala @@ -0,0 +1,29 @@ +package forms.amend + +import forms.behaviours.OptionFieldBehaviours +import models.amend.WhatDoYouWantToAmendStandard +import play.api.data.FormError + +class WhatDoYouWantToAmendStandardFormProviderSpec extends OptionFieldBehaviours { + + val form = new WhatDoYouWantToAmendStandardFormProvider()() + + ".value" - { + + val fieldName = "value" + val requiredKey = "amend.whatDoYouWantToAmendStandard.error.required" + + behave like optionsField[WhatDoYouWantToAmendStandard]( + form, + fieldName, + validValues = WhatDoYouWantToAmendStandard.values, + invalidError = FormError(fieldName, "error.invalid") + ) + + behave like mandatoryField( + form, + fieldName, + requiredError = FormError(fieldName, requiredKey) + ) + } +} diff --git a/test/models/amend/WhatDoYouWantToAmendStandardSpec.scala b/test/models/amend/WhatDoYouWantToAmendStandardSpec.scala new file mode 100644 index 00000000..ce0368c4 --- /dev/null +++ b/test/models/amend/WhatDoYouWantToAmendStandardSpec.scala @@ -0,0 +1,49 @@ +package models.amend + +import org.scalacheck.Arbitrary.arbitrary +import org.scalacheck.Gen +import org.scalatestplus.scalacheck.ScalaCheckPropertyChecks +import org.scalatest.freespec.AnyFreeSpec +import org.scalatest.matchers.must.Matchers +import org.scalatest.OptionValues +import play.api.libs.json.{JsError, JsString, Json} + +class WhatDoYouWantToAmendStandardSpec + extends AnyFreeSpec + with Matchers + with ScalaCheckPropertyChecks + with OptionValues { + + "WhatDoYouWantToAmendStandard" - { + + "must deserialise valid values" in { + + val gen = Gen.oneOf(WhatDoYouWantToAmendStandard.values.toSeq) + + forAll(gen) { whatDoYouWantToAmendStandard => + JsString(whatDoYouWantToAmendStandard.toString) + .validate[WhatDoYouWantToAmendStandard] + .asOpt + .value mustEqual whatDoYouWantToAmendStandard + } + } + + "must fail to deserialise invalid values" in { + + val gen = arbitrary[String] suchThat (!WhatDoYouWantToAmendStandard.values.map(_.toString).contains(_)) + + forAll(gen) { invalidValue => + JsString(invalidValue).validate[WhatDoYouWantToAmendStandard] mustEqual JsError("error.invalid") + } + } + + "must serialise" in { + + val gen = Gen.oneOf(WhatDoYouWantToAmendStandard.values.toSeq) + + forAll(gen) { whatDoYouWantToAmendStandard => + Json.toJson(whatDoYouWantToAmendStandard) mustEqual JsString(whatDoYouWantToAmendStandard.toString) + } + } + } +} diff --git a/test/views/amend/WhatDoYouWantToAmendStandardViewSpec.scala b/test/views/amend/WhatDoYouWantToAmendStandardViewSpec.scala new file mode 100644 index 00000000..f3aee9bf --- /dev/null +++ b/test/views/amend/WhatDoYouWantToAmendStandardViewSpec.scala @@ -0,0 +1,97 @@ +/* + * Copyright 2026 HM Revenue & Customs + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package views.amend + +import base.SpecBase +import forms.amend.WhatDoYouWantToAmendStandardFormProvider +import models.amend.WhatDoYouWantToAmendStandard +import org.jsoup.Jsoup +import org.jsoup.nodes.Document +import play.api.i18n.Messages +import play.api.test.FakeRequest +import views.html.amend.WhatDoYouWantToAmendStandardView + +class WhatDoYouWantToAmendStandardViewSpec extends SpecBase { + + "WhatDoYouWantToAmendStandardView" - { + "must render the page with the correct html elements" in new Setup { + val doc: Document = Jsoup.parse(html.toString) + doc.title must include(messages("amend.whatDoYouWantToAmendStandard.title")) + doc.select("h1").text must include(messages("amend.whatDoYouWantToAmendStandard.heading")) + } + + "must render radio buttons with correct values" in new Setup { + val doc: Document = Jsoup.parse(html.toString) + + doc.select("input[type=radio][value=amendToNilReturn]").size() mustBe 1 + doc.select("input[type=radio][value=amendPaymentOrSubcontractorDetails]").size() mustBe 1 + } + + "must render radio buttons with correct labels" in new Setup { + val doc: Document = Jsoup.parse(html.toString) + + doc.text() must include(messages("amend.whatDoYouWantToAmendStandard.amendToNilReturn")) + doc.text() must include(messages("amend.whatDoYouWantToAmendStandard.amendPaymentOrSubcontractorDetails")) + } + + "must pre-populate the form when user has previously answered" in new Setup { + val filledForm = form.fill(WhatDoYouWantToAmendStandard.AmendToNilReturn) + val filledHtml = view(filledForm) + val doc: Document = Jsoup.parse(filledHtml.toString) + + doc.select("input[value=amendToNilReturn]").hasAttr("checked") mustBe true + doc.select("input[value=amendPaymentOrSubcontractorDetails]").hasAttr("checked") mustBe false + } + + "must show error summary when form has errors" in new Setup { + val formWithErrors = form.bind(Map("value" -> "")) + val errorHtml = view(formWithErrors) + val doc: Document = Jsoup.parse(errorHtml.toString) + + doc.title must startWith(messages("error.title.prefix")) + doc.select(".govuk-error-summary").size() mustBe 1 + doc.text() must include(messages("amend.whatDoYouWantToAmendStandard.error.required")) + } + + "must render error summary with correct link when form has errors" in new Setup { + val formWithErrors = form.bind(Map("value" -> "")) + val errorHtml = view(formWithErrors) + val doc: Document = Jsoup.parse(errorHtml.toString) + + doc.select(".govuk-error-summary__list a").attr("href") mustBe "#value_0" + } + + "must render the continue button" in new Setup { + val doc: Document = Jsoup.parse(html.toString) + doc.select("button[type=submit]").text mustBe messages("site.continue") + } + } + + trait Setup { + val app = applicationBuilder().build() + val view = app.injector.instanceOf[WhatDoYouWantToAmendStandardView] + val formProvider = new WhatDoYouWantToAmendStandardFormProvider() + val form = formProvider() + implicit val request: play.api.mvc.Request[_] = FakeRequest() + implicit val messages: Messages = play.api.i18n.MessagesImpl( + play.api.i18n.Lang.defaultLang, + app.injector.instanceOf[play.api.i18n.MessagesApi] + ) + + val html = view(form) + } +}