-
Notifications
You must be signed in to change notification settings - Fork 0
Feature/[smd 151] show error state on errors screen #109
Feature/[smd 151] show error state on errors screen #109
Conversation
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.
Do we ideally want some testing on this? There's a lot of conditional code here, and it currently has no test coverage.
It's possible to test JS EventListeners, but how we integrate that with our Flask test suite is another question.
Yes, I think we definatly do. I suppose I can do some "black box" type of testing with Beautiful soup to check the on page HTML is what we expect in certain cases. |
6971440
to
c9e7502
Compare
We can add in some tests asserting correct output against a series of reasonable scenarios. Probably best to get Adam's input on unit testing the specific event listener - it will require us to update github actions, and presumably to run a second JS test suite alongside the current Python one. |
11fd4b3
to
13b0fbe
Compare
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.
LGTM
e54d1aa
to
f63cb13
Compare
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.
requesting changes to block merge for now
c33427b
to
f68f7d3
Compare
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.
Looking better 👍
I'm still a bit worried that this still doesn't solve the scenario where:
- User submits for a place
- gets validation errors
- submits again after fixing some, but now gets a pre-validation error
- It will now show their old validation errors AND their new pre-validation error
We need to be clear with design that this is a side effect of the new behaviour.
f68f7d3
to
d8ee621
Compare
They will now only get "same screen pre-validation" errors if they have a file error. From what design have said they do not consider these "same screen" errors as being another whole upload attempt/ moving to a new screen so the content in the table shouldn't be updated. I belive that design have accepted this iteration currently in the PR |
d8ee621
to
3f44bc5
Compare
c7ad877
to
835f8aa
Compare
WIP add javascript event listener to detect if form is submitted empty ... ... ... ... store validation errors between request in session object and remove JS ... ... ... ... .. ... ... ... ...
835f8aa
to
8b2c3da
Compare
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.
LGTM
This PR
Refactor so we no longer return un-necesary success boolian.
When a user goes to upload a file they will now only see .xlsx files that are on there machine instead of all types of files
Change description
A brief description of the pull request
How to test
If manual testing is needed, give suggested testing steps
Screenshots of UI changes (if applicable)