-
Notifications
You must be signed in to change notification settings - Fork 19
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
feat: migrate useFetch to react-query #48
base: master
Are you sure you want to change the base?
Conversation
let me know when it is ready for a review |
@aquibbaig I need some help regarding tests. After implementing
|
@aquibbaig, in the
I am using
because we are looking for Other failed tests are also having similar problem. I am new to testing, can you please look at this and suggest some approach. 😄 |
Hey @MohdImran001 actually I am seeing that in a PR where we made the flow of our code consistent there we made some changes in the way the things will appear on error. However the same was not updated in the unit tests. For eg- earlier in machineselector component we used to show the error as well as the disabled dropdown but now we are just showing the error and no dropdown hence the test is failing as old test are expecting the dropdown too |
@ruddi10 if this PR looks good to you, I guess we can merge it. We can refactor the tests in a different PR. |
After that, we can also set up a |
@MohdImran001 I think you have the wrong notion about tests, the tests are there in the first place so that we don't get errors later. |
The migration from react-query is not as simple, we need to have a dedicated |
Sure, I will create different hooks for each action. I would like to know what can be done to fix the failing tests. We might need to rewrite them to suit the current component structure. I would love to know your thoughts on this. @aquibbaig |
I think this will be a very big task and commitment, why don't we break it down into smaller bits and pieces.
|
Btw, we need to investigate why the tests are failing here, this is failing in |
The test are failing because of the reason mentioned above. @aquibbaig |
@aquibbaig PTAL. Some tests are failing with the error - e.g.
Unable to find an element by: [data-testid="step-alert"]
etc. On running in the browser, thesedata
tags are present and the app is working perfectly fine but they are not rendered in tests.