Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 0 additions & 61 deletions app/testOnly/TestControllerToBeDeleted.scala
Original file line number Diff line number Diff line change
@@ -1,61 +0,0 @@
/*
* Copyright 2025 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 testOnly

import controllers.actions.{DataRequiredAction, DataRetrievalAction, IdentifierAction}
import play.api.i18n.{I18nSupport, MessagesApi}
import play.api.mvc.{Action, AnyContent, MessagesControllerComponents}
import play.twirl.api.Html
import services.StampDutyLandTaxService
import uk.gov.hmrc.play.bootstrap.frontend.controller.FrontendBaseController

import javax.inject.{Inject, Singleton}
import scala.concurrent.ExecutionContext

@Singleton
class TestControllerToBeDeleted @Inject()(
override val messagesApi: MessagesApi,
identify: IdentifierAction,
getData: DataRetrievalAction,
requireData: DataRequiredAction,
stampDutyLandTaxService: StampDutyLandTaxService,
val controllerComponents: MessagesControllerComponents
)(implicit executionContext: ExecutionContext) extends FrontendBaseController with I18nSupport {

//TODO: TO BE DELETED - FOR VISUAL TESTING

def onPageLoad(storn: String): Action[AnyContent] = (identify andThen getData andThen requireData).async {
implicit request =>

for {
getAllInProgressReturns <- stampDutyLandTaxService.getInProgressReturns
getAllSubmittedReturns <- stampDutyLandTaxService.getSubmittedReturns
getReturnsDueForDeletion <- stampDutyLandTaxService.getReturnsDueForDeletion
getAgentsCount <- stampDutyLandTaxService.getAgentCount
} yield {
Ok(Html(
s"""
|getAllInProgressReturns: $getAllInProgressReturns
|<br><br>
|getAllSubmittedReturns: $getAllSubmittedReturns
|<br><br>
|getReturnsDueForDeletion: $getReturnsDueForDeletion
|""".stripMargin
))
}
}
}
2 changes: 0 additions & 2 deletions conf/testOnlyDoNotUseInAppConf.routes
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,3 @@

# Add all the application routes to the prod.routes file
-> / prod.Routes

GET /stamp-duty-land-tax-management/test-only/test-returns testOnly.TestControllerToBeDeleted.onPageLoad(storn: String)