-
Notifications
You must be signed in to change notification settings - Fork 0
NOJIRA - Fix tests #518
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
NOJIRA - Fix tests #518
Conversation
|
de880ae
to
468a0b9
Compare
468a0b9
to
c443f94
Compare
|
3421c01
to
b203805
Compare
|
b203805
to
e5081e2
Compare
|
ef52f17
to
cd4e145
Compare
|
… and NfmCaptureTelephoneDetailsViewSpec
…adio buttons test
cd4e145
to
37c870b
Compare
65a1fb9
to
22655af
Compare
22655af
to
87abe46
Compare
lazy val formProvider: ContactNfmByPhoneFormProvider = new ContactNfmByPhoneFormProvider | ||
lazy val page: ContactNfmByPhoneView = inject[ContactNfmByPhoneView] | ||
lazy val username: String = "John Doe" | ||
lazy val pageTitle: String = "Can we contact by telephone" // FIXME: telephone? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
telephone sounds good to me. Why is this a fixme?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah I see, seems it was somehow missed here:
https://jira.tools.tax.service.gov.uk/browse/PIL-2335
Maybe worth raising a ticket as it's a functional change
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well spotted. Thanks. This is not being used. Will remove it.
).toString() | ||
) | ||
lazy val page: FilingMemberCheckYourAnswersView = inject[FilingMemberCheckYourAnswersView] | ||
lazy val pageTitle: String = "Check your answers for filing member details" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't seem to use this in the tests below
} | ||
} | ||
|
||
"when form has validation errors" should { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are we removing these tests?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are tests that were brought over from the Acceptance Tests and they are redundant because we arleady have the following tests in this spec:
- "when form is submitted with missing values"
- "when form is submitted with values exceeding maximum length"
- "when form is submitted with special characters"
Also the implementation of the BARS-related tests is wrong. A Form[BankAccountDetails]
is created with `validForm.withError("accountNumber", "repayments.bankAccountDetails.error.accountNumber"), then passed to the view and then we test if the view has this error message.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly looks good, also interested about the removal of some of these tests.
test/controllers/repayments/ReasonForRequestingRepaymentControllerSpec.scala
Outdated
Show resolved
Hide resolved
eea91fe
to
1ae33b4
Compare
1ae33b4
to
8378ad5
Compare
Fixed tests with outdated, redundant etc tests.
postcodedNonUkAddress
title
andH1
ontitle
andH1
title
andH1
title
andH1
title
andH1
must include
from view specstest/views/HomepageViewSpec.scala
(PR [PIL-2321] - redirect Top Banner Link to DashboardController #516)must include()
withmustBe
(PR PIL-2722 DEV Add content testing to unit tests 3 #507 & PR PIL-2173: Move commented acceptance test scenarios to frontend from branch PIL-2172 #499)val
s, duplicate tests and redundant tests fromviews.repayments.RepaymentsConfirmationViewSpec
lazy
to val declarations at the top of Specs