Closed tomaspalma closed 1 year ago
@tomaspalma You need to fix the failing test, since the current behavior will change.
@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"?
Base: 88.97% // Head: 88.99% // Increases project coverage by +0.01%
:tada:
Coverage data is based on head (
76c12f3
) compared to base (8fa5a07
). Patch coverage: 100.00% of modified lines in pull request are covered.
:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.
@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.
@tomaspalma The failing tests may need more props that are mandatory.
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.
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.
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 offerSearch
, it is defined in the offer's reducer if I'm not mistaken.
Another option is to check if it is undefined.
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.
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.
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"