-
- @partials.servicesAndDependencies(masterTeamDependencies, teamName)
+
+
+
+ @defining(repos.flatMap(_.digitalServiceName).distinct.sorted) { digitalServices =>
+
+ @if(digitalServices.isEmpty) {
+
@teamName.asString has no Digital Services.
+ } else {
+
+ @for(digitalService <- digitalServices) {
+ - @digitalService.asString
+ }
+
+ }
+ }
+
+
+ @healthPartial(teamName = Some(teamName), leaks, latestBobbyReports, productionBobbyReports, platformInitiatives, vulnerabilities, commissioningChecks, whatsRunningWhere, testJobs)
+
+
+ @explorePartial(teamName = Some(teamName), openPrsUrl)
+
-
- @showRepositories(repos.getOrElse(RepoType.Service , Seq.empty), "Services" , "service")
- @showRepositories(repos.getOrElse(RepoType.Library , Seq.empty), "Libraries" , "library")
- @showRepositories(repos.getOrElse(RepoType.Prototype, Seq.empty), "Prototypes" , "prototype")
- @showRepositories(repos.getOrElse(RepoType.Test , Seq.empty), "Tests" , "test")
- @showRepositories(repos.getOrElse(RepoType.Other , Seq.empty), "Repositories", "repository")
-
+ @repositoriesPartial(repos, viewMessages)
}
+ }
}
@addSlackInfo(label: String, slackInfo: SlackInfo) = {
@if(!slackInfo.hasValidUrl) {
- - @label:
- -
-
@slackInfo.url
- Please change to a URL via UMP
-
+ - @label:
+ -
+
@slackInfo.url
+ Please change to a URL via UMP
+
} else if (!slackInfo.hasValidName) {
- - @label:
- -
- Go to @label.toLowerCase channel
-
+ - @label:
+ -
+ Go to @label.toLowerCase channel
+
} else {
- - @label:
- -
- #@slackInfo.name
-
+ - @label:
+ -
+ #@slackInfo.name
+
}
}
@umpUpdateLink(isMemberBox: Boolean) = {
-
- @if(isMemberBox) {
- To update @teamName.asString team members, go to the User Management Portal
- } else {
- To update @teamName.asString team details, go to the User Management Portal
- }
-
-}
-
-@showRepositories(repos: Seq[GitRepository], headerName: String, typeName: String) = {
-
-
-
-
- @if(repos.isEmpty) {
-
- @Html(viewMessages.noRepoOfTypeForTeam(typeName))
-
- } else {
-
- @defining(repos.partition(_.isShared)) { case (shared, nonShared) =>
- @repoListFor(nonShared)
- @if(shared.nonEmpty){
- - Shared
- @repoListFor(shared)
- }
- }
-
- }
-
-
-
-}
-
-@repoListFor(repos: Seq[GitRepository]) = {
- @for(repo <- repos.sortBy(_.name.toLowerCase)) {
-
-
-
- }
+
+
+ To update @teamName.asString team @if(isMemberBox) { members } else { details }, go to the User Management Portal
+
+
}
diff --git a/app/uk/gov/hmrc/cataloguefrontend/teams/view/explorePartial.scala.html b/app/uk/gov/hmrc/cataloguefrontend/teams/view/explorePartial.scala.html
new file mode 100644
index 000000000..647de686d
--- /dev/null
+++ b/app/uk/gov/hmrc/cataloguefrontend/teams/view/explorePartial.scala.html
@@ -0,0 +1,56 @@
+@*
+ * Copyright 2023 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 uk.gov.hmrc.cataloguefrontend.teams.{routes => teamRoutes}
+@import uk.gov.hmrc.cataloguefrontend.leakdetection.{LeakDetectionRepositorySummary, routes => leakDetectionRoutes}
+@import uk.gov.hmrc.cataloguefrontend.servicecommissioningstatus.{CachedServiceCheck, routes => serviceCommissioningStatusRoutes}
+@import uk.gov.hmrc.cataloguefrontend.platforminitiatives.{PlatformInitiative, routes => platforminitiativesRoutes}
+@import uk.gov.hmrc.cataloguefrontend.vulnerabilities.{TotalVulnerabilityCount, routes => vulnerabilityRoutes}
+@import uk.gov.hmrc.cataloguefrontend.prcommenter.{PrCommenterComment, routes => prcommenterRoutes}
+
+@(
+ teamName : Option[TeamName]
+, openPrsUrl: Option[String]
+)(implicit
+ request: RequestHeader
+)
+
+
diff --git a/app/uk/gov/hmrc/cataloguefrontend/teams/view/healthPartial.scala.html b/app/uk/gov/hmrc/cataloguefrontend/teams/view/healthPartial.scala.html
new file mode 100644
index 000000000..6b20b362f
--- /dev/null
+++ b/app/uk/gov/hmrc/cataloguefrontend/teams/view/healthPartial.scala.html
@@ -0,0 +1,182 @@
+@*
+ * Copyright 2023 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 uk.gov.hmrc.cataloguefrontend.connector.JenkinsJob
+@import uk.gov.hmrc.cataloguefrontend.connector.model.BobbyReport
+@import uk.gov.hmrc.cataloguefrontend.teams.{routes => teamRoutes}
+@import uk.gov.hmrc.cataloguefrontend.bobby.{routes => bobbyRoutes}
+@import uk.gov.hmrc.cataloguefrontend.leakdetection.{LeakDetectionRepositorySummary, routes => leakDetectionRoutes}
+@import uk.gov.hmrc.cataloguefrontend.platforminitiatives.{PlatformInitiative, routes => platforminitiativesRoutes}
+@import uk.gov.hmrc.cataloguefrontend.servicecommissioningstatus.{CachedServiceCheck, routes => serviceCommissioningStatusRoutes}
+@import uk.gov.hmrc.cataloguefrontend.test.{routes => testJobRoutes}
+@import uk.gov.hmrc.cataloguefrontend.vulnerabilities.{TotalVulnerabilityCount, routes => vulnerabilityRoutes}
+@import uk.gov.hmrc.cataloguefrontend.whatsrunningwhere.{WhatsRunningWhere, Profile, ProfileType, routes => whatsRunningWhereRoutes}
+
+@(
+ teamName : Option[TeamName]
+, leaks : Seq[LeakDetectionRepositorySummary]
+, productionBobbyReports: Seq[BobbyReport]
+, latestBobbyReports : Seq[BobbyReport]
+, platformInitiatives : Seq[PlatformInitiative]
+, vulnerabilities : Seq[TotalVulnerabilityCount]
+, commissioningChecks : Seq[CachedServiceCheck]
+, whatsRunningWhere : Seq[WhatsRunningWhere]
+, testJobs : Seq[JenkinsJob]
+, now : java.time.LocalDate = java.time.LocalDate.now()
+)(implicit
+ request: RequestHeader
+)
+
+
+
+
+
+
+
+ @defining(leaks.map(_.unresolvedCount).sum) { count =>
+ @count |
+ }
+ Leaks |
+
+
+ @defining(productionBobbyReports.flatMap(_.violations.filter(v => !v.exempt && now.isAfter(v.from))).size) { count =>
+ @count |
+ }
+ Bobby Errors - Production |
+
+
+ @defining(latestBobbyReports.flatMap(_.violations.filter(v => !v.exempt && now.isAfter(v.from))).size) { count =>
+ @count |
+ }
+ Bobby Errors - Latest |
+
+
+ @defining(vulnerabilities.map(_.actionRequired).sum) { count =>
+ @count |
+ }
+ Service Vulnerabilities |
+
+
+
|
+
+
+ @defining(-1) { count =>
+ @count |
+ }
+ Shuttered Frontend |
+
+
+ @defining(-1) { count =>
+ @count |
+ }
+ Shuttered Api |
+
+
+
|
+
+
+ @defining(productionBobbyReports.flatMap(_.violations.filter(v => !v.exempt && (now.isBefore(v.from) || now.isEqual(v.from)))).size) { count =>
+ @count |
+ }
+ Bobby Warnings - Production |
+
+
+ @defining(latestBobbyReports.flatMap(_.violations.filter(v => !v.exempt && (now.isBefore(v.from) || now.isEqual(v.from)))).size) { count =>
+ @count |
+ }
+ Bobby Warnings - Latest |
+
+
+ @defining(platformInitiatives.filter(_.progress.percent < 100).size) { count =>
+ @count |
+ }
+ Platform Initiatives |
+
+
+ @defining(commissioningChecks.filter(_.warnings).size) { count =>
+ @count |
+ }
+ Service Commissioning State Warnings |
+
+
+ @defining(
+ whatsRunningWhere.map { wrw =>
+ ( wrw.versions.maxBy(_.version)
+ , wrw.versions.find(_.environment == Environment.Production)
+ ) match {
+ case (v1, Some(v2))
+ if v2.version.patch > 0
+ || v2.version.major < v1.version.major
+ || v2.version.minor <= v1.version.minor - 1
+ => { 1 }
+ case _ => { 0 }
+ }
+ }
+ ) { counts =>
+ @counts.sum |
+ }
+ @* TODO whatsRunningWhere should use standard Catalogue form params and reverse routes *@
+ Outdated or Hotfixed Production Deployments |
+
+
+
|
+
+
+ @defining(testJobs.flatMap(_.latestBuild).filter(_.result == Some("FAILURE")).size) { count =>
+ @count |
+ }
+ Test Failures |
+
+
+ @defining(testJobs.flatMap(_.latestBuild).flatMap(_.testJobResults).flatMap(_.numAccessibilityViolations).sum) { count =>
+ @count |
+ }
+ Accessibility Issues |
+
+
+
+ @defining(testJobs.flatMap(_.latestBuild).flatMap(_.testJobResults).flatMap(_.numSecurityAlerts).sum) { count =>
+ @count |
+ }
+ Security Alerts |
+
+
+
|
+
+
+ @defining(-1) { count =>
+ @count |
+ }
+ Slow Running Queries |
+
+
+ @defining(-1) { count =>
+ @count |
+ }
+ Non Indexed Queries |
+
+
+ @defining(-1) { count =>
+ @count |
+ }
+ Container Kills |
+
+
+
+
+
diff --git a/app/uk/gov/hmrc/cataloguefrontend/teams/view/repositoriesPartial.scala.html b/app/uk/gov/hmrc/cataloguefrontend/teams/view/repositoriesPartial.scala.html
new file mode 100644
index 000000000..c548c1f3b
--- /dev/null
+++ b/app/uk/gov/hmrc/cataloguefrontend/teams/view/repositoriesPartial.scala.html
@@ -0,0 +1,75 @@
+@*
+ * Copyright 2023 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 uk.gov.hmrc.cataloguefrontend.{routes => appRoutes}
+@import uk.gov.hmrc.cataloguefrontend.connector.{GitRepository, RepoType}
+@import uk.gov.hmrc.cataloguefrontend.view.ViewMessages
+
+@(
+ repos : Seq[GitRepository]
+, viewMessages: ViewMessages
+)(implicit
+ request: RequestHeader
+)
+
+
+ @defining(repos.groupBy(_.repoType)) { repoMap =>
+ @showRepositories(repoMap, RepoType.Service , "Services" )
+ @showRepositories(repoMap, RepoType.Library , "Libraries" )
+ @showRepositories(repoMap, RepoType.Prototype, "Prototypes" )
+ @showRepositories(repoMap, RepoType.Test , "Tests" )
+ @showRepositories(repoMap, RepoType.Other , "Repositories")
+ }
+
+
+@showRepositories(repoMap: Map[RepoType, Seq[GitRepository]], repoType: RepoType, headerName: String) = {
+
+
+
+
+ @if(repoMap.get(repoType).isEmpty) {
+
@Html(viewMessages.noRepoOfTypeForTeam(repoType.asString))
+ } else {
+
+ @defining(repoMap(repoType).partition(_.isShared)) { case (shared, nonShared) =>
+ @repoListFor(nonShared)
+ @if(shared.nonEmpty){
+ - Shared
+ @repoListFor(shared)
+ }
+ }
+
+ }
+
+
+
+}
+
+@repoListFor(filteredRepos: Seq[GitRepository]) = {
+ @for(repo <- filteredRepos.sortBy(_.name.toLowerCase)) {
+
+
+
+ }
+}
diff --git a/app/uk/gov/hmrc/cataloguefrontend/view/partials/servicesAndDependencies.scala.html b/app/uk/gov/hmrc/cataloguefrontend/view/partials/servicesAndDependencies.scala.html
deleted file mode 100644
index ba1c0e7c8..000000000
--- a/app/uk/gov/hmrc/cataloguefrontend/view/partials/servicesAndDependencies.scala.html
+++ /dev/null
@@ -1,36 +0,0 @@
-@*
- * Copyright 2023 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 uk.gov.hmrc.cataloguefrontend.servicecommissioningstatus.{routes => serviceCommissioningStatusRoutes}
-@import uk.gov.hmrc.cataloguefrontend.teams.{RepoAndDependencies, routes => teamRoutes}
-@import uk.gov.hmrc.cataloguefrontend.vulnerabilities.{routes => vulnerabilityRoutes}
-
-@(masterTeamDependencies: Seq[RepoAndDependencies],
- teamName : TeamName
-)
-
-
diff --git a/app/uk/gov/hmrc/cataloguefrontend/view/standard_layout.scala.html b/app/uk/gov/hmrc/cataloguefrontend/view/standard_layout.scala.html
index 9c8ec69fb..081f83218 100644
--- a/app/uk/gov/hmrc/cataloguefrontend/view/standard_layout.scala.html
+++ b/app/uk/gov/hmrc/cataloguefrontend/view/standard_layout.scala.html
@@ -166,7 +166,7 @@
Bobby Explorer
Leak Detection - Rules
-
Leak Detection - Repositories
+
Leak Detection - Repositories
Vulnerabilities
Vulnerabilities - Services
diff --git a/app/uk/gov/hmrc/cataloguefrontend/vulnerabilities/VulnerabilitiesController.scala b/app/uk/gov/hmrc/cataloguefrontend/vulnerabilities/VulnerabilitiesController.scala
index 17f7a4996..af404d66d 100644
--- a/app/uk/gov/hmrc/cataloguefrontend/vulnerabilities/VulnerabilitiesController.scala
+++ b/app/uk/gov/hmrc/cataloguefrontend/vulnerabilities/VulnerabilitiesController.scala
@@ -44,6 +44,13 @@ class VulnerabilitiesController @Inject() (
) extends FrontendController(mcc)
with CatalogueAuthBuilders:
+ /**
+ * @param vulnerability for reverse routing
+ * @param curationStatus for reverse routing
+ * @param service for reverse routing
+ * @param team for reverse routing
+ * @param flag for reverse routing
+ */
def vulnerabilitiesList(
vulnerability : Option[String],
curationStatus: Option[String],
@@ -90,6 +97,14 @@ class VulnerabilitiesController @Inject() (
)
}
+ /**
+ * @param service for reverse routing
+ * @param team for reverse routing
+ * @param vulnerability for reverse routing
+ * @param curationStatus for reverse routing
+ * @param from for reverse routing
+ * @param from for reverse routing
+ */
def vulnerabilitiesTimeline(
service : Option[ServiceName],
team : Option[TeamName],
diff --git a/conf/app.routes b/conf/app.routes
index e3f0cb013..8bb09af80 100644
--- a/conf/app.routes
+++ b/conf/app.routes
@@ -40,7 +40,7 @@ GET /service/:name/costs uk.gov.hmrc.cataloguefro
GET /service/:name/commissioning-state uk.gov.hmrc.cataloguefrontend.servicecommissioningstatus.ServiceCommissioningStatusController.getCommissioningState(name: ServiceName)
GET /commissioning-state/search uk.gov.hmrc.cataloguefrontend.servicecommissioningstatus.ServiceCommissioningStatusController.searchLanding()
-GET /commissioning-state/search/results uk.gov.hmrc.cataloguefrontend.servicecommissioningstatus.ServiceCommissioningStatusController.searchResults(team: Option[TeamName] ?= None)
+GET /commissioning-state/search/results uk.gov.hmrc.cataloguefrontend.servicecommissioningstatus.ServiceCommissioningStatusController.searchResults(team: Option[TeamName] ?= None, warningFilter: Option[Boolean] ?= None)
GET /library/:name uk.gov.hmrc.cataloguefrontend.CatalogueController.library(name)
@@ -81,7 +81,7 @@ GET /config/warnings/search/results uk.gov.hmrc.cataloguefro
GET /cost-explorer uk.gov.hmrc.cataloguefrontend.cost.CostController.costExplorer(team: Option[TeamName] ?= None, asCSV: Boolean ?= false)
-GET /bobby-violations uk.gov.hmrc.cataloguefrontend.bobby.BobbyExplorerController.bobbyViolations(teamName: Option[TeamName] ?= None, digitalService: Option[DigitalService] ?= None, flag: Option[String] ?= None)
+GET /bobby-violations uk.gov.hmrc.cataloguefrontend.bobby.BobbyExplorerController.bobbyViolations(teamName: Option[TeamName] ?= None, digitalService: Option[DigitalService] ?= None, flag: Option[String] ?= None, isActive: Option[Boolean] ?= None)
GET /bobbyrules uk.gov.hmrc.cataloguefrontend.bobby.BobbyExplorerController.list(selector: Option[String] ?= None)
GET /bobbyrulestrend uk.gov.hmrc.cataloguefrontend.bobby.BobbyRulesTrendController.display(`rules[]`: Seq[String] ?= Seq.empty, from: java.time.LocalDate ?= java.time.LocalDate.now().minusYears(2), to: java.time.LocalDate ?= java.time.LocalDate.now())
@@ -116,7 +116,7 @@ GET /platform-initiatives uk.gov.hmrc.cataloguefro
GET /leak-detection uk.gov.hmrc.cataloguefrontend.leakdetection.LeakDetectionController.ruleSummaries
GET /leak-detection/drafts uk.gov.hmrc.cataloguefrontend.leakdetection.LeakDetectionController.draftReports
-GET /leak-detection/repositories uk.gov.hmrc.cataloguefrontend.leakdetection.LeakDetectionController.repoSummaries(includeWarnings: Boolean ?= false, includeExemptions: Boolean ?= false, includeViolations: Boolean ?= false, includeNonIssues: Boolean ?= false)
+GET /leak-detection/repositories uk.gov.hmrc.cataloguefrontend.leakdetection.LeakDetectionController.repoSummaries(team: Option[TeamName] ?= None, includeWarnings: Boolean ?= false, includeExemptions: Boolean ?= false, includeViolations: Boolean ?= false, includeNonIssues: Boolean ?= false)
GET /leak-detection/repositories/:repository uk.gov.hmrc.cataloguefrontend.leakdetection.LeakDetectionController.branchSummaries(repository: String, includeNonIssues: Boolean ?= false)
GET /leak-detection/repositories/:repository/:branch uk.gov.hmrc.cataloguefrontend.leakdetection.LeakDetectionController.report(repository: String, branch: String)
POST /leak-detection/repositories/:repository/:branch uk.gov.hmrc.cataloguefrontend.leakdetection.LeakDetectionController.rescan(repository: String, branch: String)
@@ -141,4 +141,4 @@ GET /users/edit-user/access uk.gov.hmrc.cataloguefr
POST /users/edit-user/access uk.gov.hmrc.cataloguefrontend.users.EditUserController.editUserAccess(username: UserName, organisation: Option[String] ?= None)
GET /users/edit-user/access/2 uk.gov.hmrc.cataloguefrontend.users.EditUserController.requestSent(username: UserName)
-GET /tests uk.gov.hmrc.cataloguefrontend.test.TestJobController.allTests(teamName: Option[TeamName], digitalService: Option[DigitalService])
+GET /tests uk.gov.hmrc.cataloguefrontend.test.TestJobController.allTests(teamName: Option[TeamName] ?= None, digitalService: Option[DigitalService] ?= None)
diff --git a/conf/application.conf b/conf/application.conf
index 99dcd9a40..814199ea2 100644
--- a/conf/application.conf
+++ b/conf/application.conf
@@ -255,7 +255,3 @@ bootstrap.auditfilter.maskedFormFields = [ "password" ]
# B&D api for create app configs does not support externaltest
environmentsToHideByDefault = ["integration", "development", "externaltest"]
-
-feature {
- show-decommission-button = false
-}
diff --git a/test/uk/gov/hmrc/cataloguefrontend/cost/CostControllerSpec.scala b/test/uk/gov/hmrc/cataloguefrontend/cost/CostControllerSpec.scala
index 542af8423..cdb45565c 100644
--- a/test/uk/gov/hmrc/cataloguefrontend/cost/CostControllerSpec.scala
+++ b/test/uk/gov/hmrc/cataloguefrontend/cost/CostControllerSpec.scala
@@ -57,7 +57,7 @@ class CostControllerSpec
when(mockAuthStubBehaviour.stubAuth(None, Retrieval.EmptyRetrieval))
.thenReturn(Future.unit)
- when(mockTeamsAndRepositoriesConnector.allTeams()(using any[HeaderCarrier]))
+ when(mockTeamsAndRepositoriesConnector.allTeams(any)(using any[HeaderCarrier]))
.thenReturn(Future.successful(Seq.empty))
when(mockServiceConfigConnector.deploymentConfig(any, any, any, any)(using any[HeaderCarrier]))
diff --git a/test/uk/gov/hmrc/cataloguefrontend/createrepository/CreateRepositoryControllerSpec.scala b/test/uk/gov/hmrc/cataloguefrontend/createrepository/CreateRepositoryControllerSpec.scala
index 769b201b4..95bc85873 100644
--- a/test/uk/gov/hmrc/cataloguefrontend/createrepository/CreateRepositoryControllerSpec.scala
+++ b/test/uk/gov/hmrc/cataloguefrontend/createrepository/CreateRepositoryControllerSpec.scala
@@ -128,7 +128,7 @@ class CreateRepositoryControllerSpec
when(mockCacheRepo.deleteFromSession[RepoTypeOut](any())(any()))
.thenReturn(Future.successful(()))
- when(mockTeamsAndReposConnector.allTeams()(using any[HeaderCarrier]))
+ when(mockTeamsAndReposConnector.allTeams(any())(using any[HeaderCarrier]))
.thenReturn(Future.successful(Seq(GitHubTeam(TeamName("TestTeam"), None, Seq.empty))))
val fakeRequest: FakeRequest[AnyContent] =
@@ -154,7 +154,7 @@ class CreateRepositoryControllerSpec
when(mockCacheRepo.deleteFromSession[RepoTypeOut](any())(any()))
.thenReturn(Future.successful(()))
- when(mockTeamsAndReposConnector.allTeams()(using any[HeaderCarrier]))
+ when(mockTeamsAndReposConnector.allTeams(any())(using any[HeaderCarrier]))
.thenReturn(Future.successful(Seq(GitHubTeam(TeamName("TestTeam"), None, Seq.empty))))
when(mockBuildDeployApiConnector.createTestRepository(any())(using any[HeaderCarrier]))
@@ -175,16 +175,16 @@ class CreateRepositoryControllerSpec
val mockBuildDeployApiConnector: BuildDeployApiConnector =
mock[BuildDeployApiConnector]
-
+
val mockTeamsAndReposConnector: TeamsAndRepositoriesConnector =
mock[TeamsAndRepositoriesConnector]
-
+
val mockCacheRepo: SessionCacheRepository =
mock[SessionCacheRepository]
-
+
val authStubBehaviour: StubBehaviour =
mock[StubBehaviour]
-
+
val authComponent: FrontendAuthComponents =
FrontendAuthComponentsStub(authStubBehaviour)
diff --git a/test/uk/gov/hmrc/cataloguefrontend/deployments/DeploymentEventsControllerSpec.scala b/test/uk/gov/hmrc/cataloguefrontend/deployments/DeploymentEventsControllerSpec.scala
index 6802e4604..c96ce9554 100644
--- a/test/uk/gov/hmrc/cataloguefrontend/deployments/DeploymentEventsControllerSpec.scala
+++ b/test/uk/gov/hmrc/cataloguefrontend/deployments/DeploymentEventsControllerSpec.scala
@@ -74,7 +74,7 @@ class DeploymentEventsControllerSpec
.thenReturn(Future.unit)
when(mockedReleasesConnector.deploymentHistory(environment = any, from = any, to = any, team = any, service = any, skip = any, limit = any)(using any[HeaderCarrier]))
.thenReturn(Future.successful(PaginatedDeploymentHistory(history = Seq.empty, 0)))
- when(mockedTeamsAndRepositoriesConnector.allTeams()(using any[HeaderCarrier]))
+ when(mockedTeamsAndRepositoriesConnector.allTeams(any)(using any[HeaderCarrier]))
.thenReturn(Future.successful(Seq.empty))
val response = controller.deploymentEvents()(FakeRequest(GET, "/deployments/production").withSession(SessionKeys.authToken -> "Token token"))
status(response) shouldBe 200
@@ -100,7 +100,7 @@ class DeploymentEventsControllerSpec
.thenReturn(Future.unit)
when(mockedReleasesConnector.deploymentHistory(environment = any, from = any, to = any, team = any, service = any, skip = any, limit = any)(using any[HeaderCarrier]))
.thenReturn(Future.successful(PaginatedDeploymentHistory(deps, deps.length)))
- when(mockedTeamsAndRepositoriesConnector.allTeams()(using any[HeaderCarrier]))
+ when(mockedTeamsAndRepositoriesConnector.allTeams(any)(using any[HeaderCarrier]))
.thenReturn(Future.successful(Seq.empty))
val response = controller.deploymentEvents()(FakeRequest(GET, "/deployments/production?from=2020-01-01&to=2020-02-01").withSession(SessionKeys.authToken -> "Token token"))
@@ -134,7 +134,7 @@ class DeploymentEventsControllerSpec
using any[HeaderCarrier]))
.thenReturn(Future.successful(PaginatedDeploymentHistory(deps, deps.length)))
- when(mockedTeamsAndRepositoriesConnector.allTeams()(using any[HeaderCarrier]))
+ when(mockedTeamsAndRepositoriesConnector.allTeams(any)(using any[HeaderCarrier]))
.thenReturn(Future.successful(Seq.empty))
val response = controller.deploymentEvents()(FakeRequest(GET, "/deployments/production?service=s1").withSession(SessionKeys.authToken -> "Token token"))
@@ -160,7 +160,7 @@ class DeploymentEventsControllerSpec
when(authStubBehaviour.stubAuth(None, Retrieval.EmptyRetrieval))
.thenReturn(Future.unit)
- when(mockedTeamsAndRepositoriesConnector.allTeams()(using any[HeaderCarrier]))
+ when(mockedTeamsAndRepositoriesConnector.allTeams(any)(using any[HeaderCarrier]))
.thenReturn(Future.successful(Seq.empty))
val response = controller.deploymentEvents()(FakeRequest(GET, "/deployments/production?page=2").withSession(SessionKeys.authToken -> "Token token"))
diff --git a/test/uk/gov/hmrc/cataloguefrontend/platforminitiatives/PlatformInitiativesControllerSpec.scala b/test/uk/gov/hmrc/cataloguefrontend/platforminitiatives/PlatformInitiativesControllerSpec.scala
index b0fff1710..303d91802 100644
--- a/test/uk/gov/hmrc/cataloguefrontend/platforminitiatives/PlatformInitiativesControllerSpec.scala
+++ b/test/uk/gov/hmrc/cataloguefrontend/platforminitiatives/PlatformInitiativesControllerSpec.scala
@@ -83,7 +83,7 @@ class PlatformInitiativesControllerSpec
when(authStubBehaviour.stubAuth(None, Retrieval.EmptyRetrieval))
.thenReturn(Future.unit)
- when(mockTRConnector.allTeams()(using any[HeaderCarrier]))
+ when(mockTRConnector.allTeams(any)(using any[HeaderCarrier]))
.thenReturn(Future.successful(Seq()))
when(mockPIConnector.getInitiatives(any[Option[TeamName]])(using any[HeaderCarrier]))
diff --git a/test/uk/gov/hmrc/cataloguefrontend/teams/TeamServicesSpec.scala b/test/uk/gov/hmrc/cataloguefrontend/teams/TeamsControllerSpec.scala
similarity index 98%
rename from test/uk/gov/hmrc/cataloguefrontend/teams/TeamServicesSpec.scala
rename to test/uk/gov/hmrc/cataloguefrontend/teams/TeamsControllerSpec.scala
index 4fe83f2c8..348130ba9 100644
--- a/test/uk/gov/hmrc/cataloguefrontend/teams/TeamServicesSpec.scala
+++ b/test/uk/gov/hmrc/cataloguefrontend/teams/TeamsControllerSpec.scala
@@ -28,7 +28,7 @@ import uk.gov.hmrc.cataloguefrontend.view.ViewMessages
import scala.io.Source
import scala.jdk.CollectionConverters._
-class TeamServicesSpec extends UnitSpec with BeforeAndAfter with FakeApplicationBuilder {
+class TeamsControllerSpec extends UnitSpec with BeforeAndAfter with FakeApplicationBuilder {
def asDocument(html: String): Document = Jsoup.parse(html)