-
Notifications
You must be signed in to change notification settings - Fork 3
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
Feature/239 evident see offers wo user parameters #286
Feature/239 evident see offers wo user parameters #286
Conversation
@tomaspalma You need to fix the failing test, since the current behavior will change. |
It is now fixed. Should we also add tests to see if the searchHasUserInput variable is set to the correct value when the search bar isn't empty and when any filters are activated? because this test only tests if the behaviour is correct when a certain value of searchHasUserInput is set but it doesn't validate that the value of the searchHasUserInput is correctly set under the supposed circumstances. Also, I have a question in the file I worked on. Why is that the component name in the SubmitSearchButton.js file is called "ShowAdvancedOptionsButton"? |
Codecov ReportBase: 88.97% // Head: 88.99% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## develop #286 +/- ##
===========================================
+ Coverage 88.97% 88.99% +0.01%
===========================================
Files 175 175
Lines 3302 3307 +5
Branches 829 834 +5
===========================================
+ Hits 2938 2943 +5
Misses 364 364
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
@tomaspalma the only thing missing in this is to write the test that we talked about in a meeting, or is there something else? Other than that, you'll need to rebase this with develop |
@tomaspalma The failing tests may need more props that are mandatory. |
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, the only thing left is to fix the tests but I have explained what should be done for that so it should not be too complicated.
I was unsure if there was something really missing on the props or whether it was some other issue because locally running npm test the result was an all-green suite. It was only failing with the ci tests. But now seeing what you said and looking at the other tests that render searchArea in searchArea.spec.js, the component is being rendered in those tests with some props I'm not passing in the tests I created, including the one that is saying not to be defined in the error report of the ci tests, the other props probably aren't showing as undefined because setShowJobDurationSlider appears first in the searchArea component code, so it may be that. Update: The tests we failling locally because I had an outdated version of the program code, because I had forgotten to rebase with develop. |
678d8e2
to
2907e99
Compare
It is not ready yet, there's still an issue that came up after updating the changes on develop and the searchValue comes initially as undefined instead of empty string, so the show all button is not currently showing at start. |
Maybe you can change the initial value of the redux state for the Another option is to check if it is undefined. |
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.
I believe I have done something similar to what I have described in the review comments but perhaps I'm mistaken.
Edit: FOUND IT!! It was in this PR: #284 and on this file src/components/HomePage/SearchArea/AdvancedSearch/AdvancedSearchDesktop.spec.js
.
I think it's pratically done now, already fixed show all not showing at start and also added the search area wrapper to improve readiblity in the tests. Contrarily to the example you gave me, I had to specify the prop types because the linter was giving me warnings about not specifying the types for them. |
Just as a future reference you can instruct the linter to ignore those warnings, which is useful for cases like this one. |
76c12f3
to
fd39302
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 🚀
fd39302
to
6f0c2cc
Compare
Closes #239. The solution implemented was displaying a "search" button when there were no user specified filters nor any value in the search bar. Then, when the user chooses a filter or writes something in the search bar, it changes the button text to "search"