Skip to content
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

Alan's Update view return version with mod log #1276

Conversation

Cruikshanks
Copy link
Member

https://eaflood.atlassian.net/browse/WATER-4634

In this instance, we felt it was more constructive to provide the feedback for the original Update view return version to include mod log info proposed PR as a series of commits from where the code has been left.

This can be used to guide suggested changes, hopefully with better context than just PR comments.

https://eaflood.atlassian.net/browse/WATER-4634

In this instance we felt it was more constructive to provide the feedback for the original [Update view return version to include mod log info](#1261) proposed PR as a series of commits from where the code has been left.

This can be used to guide suggested changes, hopefully with better context than just PR comments.
@Cruikshanks Cruikshanks self-assigned this Aug 20, 2024
@Cruikshanks Cruikshanks added the enhancement New feature or request label Aug 20, 2024
@Cruikshanks Cruikshanks force-pushed the update-view-return-version-to-use-modLog-alan branch from b40d2cc to f626ebf Compare August 20, 2024 22:33
I think because of the churn that has gone on with mod logs whilst trying to pull together this PR, changes have been made to the presenter tests that are not really needed.

Plus, we can create model instances from an Object, avoiding the need to create 'fake' versions of methods. So, we revert this test file pretty much back to its original state, before then fixing and expanding the tests.
Made me keep putting the `only()` in the wrong place.
I'd overlooked switching to using an actual model instance rather than just an object would mean ensuring we have model instances all the way down!
The notes explain what the scenarios are we need to cover.
We are not looking to retest what is already covered by the model. But we do want to test every scenario our presenter may face. Plus this serves as a handy way to document all the possible outcomes we may get from the presenter.
IMHO I think this cleans up what is happening in the go(). It also avoids doing the same 'work' twice. `$createdBy` gives us a result which it is then on the presenter to determine what to do with it.
I don't think we need this any more. Did some testing and all seemed fine.
Calling a macro appears to be different to a function or filter. Nunjucks interprets the value differently so we don't need to pass it to the `escape` filter.
It was fine as a one liner!
We can revert the beforeEach back to what it was now we have a better idea of how the helper function can work.
We can apply the same tweaks we did to view presenter test to get this passing again with the minimum of changes.
@Cruikshanks Cruikshanks marked this pull request as ready for review August 21, 2024 10:01
@Cruikshanks Cruikshanks requested a review from rvsiyad August 21, 2024 10:01
@Cruikshanks Cruikshanks merged commit f9acbdd into update-view-return-version-to-use-modLog Aug 21, 2024
4 checks passed
@Cruikshanks Cruikshanks deleted the update-view-return-version-to-use-modLog-alan branch August 21, 2024 10:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants