-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PIL-947 - Add threshold met knock back page (#20)
* PIL-947 - Add threshold met knock back page * Apply scalafix
- Loading branch information
1 parent
a794987
commit e10f67e
Showing
8 changed files
with
150 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
@* | ||
* Copyright 2024 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 views.html.components.gds._ | ||
@import uk.gov.hmrc.govukfrontend.views.viewmodels.content.HtmlContent | ||
@import config.FrontendAppConfig | ||
@import models.MneOrDomestic.UkAndOther | ||
|
||
@this( | ||
layout: templates.Layout, | ||
heading: Heading, | ||
p: ParagraphBody, | ||
paragraphMessageWithLink: ParagraphMessageWithLink | ||
) | ||
|
||
@()(implicit request: Request[_], appConfig: FrontendAppConfig, messages: Messages) | ||
|
||
@layout(pageTitle = messages("btn.thresholdMet.title")) { | ||
@heading(messages("btn.thresholdMet.heading"), classes = "govuk-heading-l") | ||
@p(messages("btn.thresholdMet.p1")) | ||
@p(messages("btn.thresholdMet.p2")) | ||
@paragraphMessageWithLink(linkMessage = messages("btn.thresholdMet.link"), linkUrl = controllers.uktr.routes.UkTaxReturnStartController.onPageLoad.url, linkFullStop = true) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
/* | ||
* Copyright 2024 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.btn | ||
|
||
import base.ViewSpecBase | ||
import org.jsoup.Jsoup | ||
import org.jsoup.nodes.Document | ||
import views.html.btn.BtnThresholdMetView | ||
|
||
class BtnThresholdMetViewSpec extends ViewSpecBase { | ||
|
||
val page: BtnThresholdMetView = inject[BtnThresholdMetView] | ||
val view: Document = Jsoup.parse(page()(request, appConfig, messages).toString()) | ||
|
||
"Btn Threshold Met View" should { | ||
|
||
"have a back link" in { | ||
view.getElementsByClass("govuk-back-link").text must include("Back") | ||
} | ||
|
||
"have a title" in { | ||
view.getElementsByTag("title").text must include("Based on your answer, your group must submit a UK Tax Return") | ||
} | ||
|
||
"have a h1 heading" in { | ||
view.getElementsByTag("h1").text must include("Based on your answer, your group must submit a UK Tax Return") | ||
} | ||
|
||
"have paragraph content" in { | ||
view.getElementsByClass("govuk-body").first().text() must include( | ||
"Based on your answer, you cannot submit a Below-Threshold Notification as your group has made consolidated annual revenues of €750 million or more in at least 2 of the previous 4 accounting periods." | ||
) | ||
view.getElementsByClass("govuk-body").get(1).text() must include( | ||
"Your group must still submit a UK Tax Return." | ||
) | ||
} | ||
|
||
"have a link" in { | ||
val link = view.getElementsByClass("govuk-body").last().getElementsByTag("a") | ||
|
||
link.text must include("Find out more about submitting a UKTR") | ||
link.attr("href") must include("/report-pillar2-submission-top-up-taxes/uk-tax-return") | ||
} | ||
|
||
} | ||
} |