Arquisoft / dede_en1b

dede_en_01b
0 stars 1 forks source link

[Third delivery] Summary - Sebas contribution #107

Closed sebaslh01 closed 2 years ago

sebaslh01 commented 2 years ago

In this delivery, I was in charge of doing the testing of product list view and product details views, improvements of these both views and creating of the rating functionality along with Daniel.

I could not do the testing part, as I encountered some problems with the change of state of the components and I run out of time.

I started working with @danieladov in the branch Review. It's only missing the front part for adding a review.

I added the carousel of images in product details view, closing:

And I reviewed the following Pull Requests:

pglez82 commented 2 years ago

Hi Sebas,

I need for you to add the links to the PR where you did the tests. If they are not merged yet, at least the link to the branch where you did that work for this release.

Pablo

sebaslh01 commented 2 years ago

Okay but... I didn't make a right use of git in this case because I didn't create a new branch, I was working in the 'mainProducts' one. My tests were not working and I stashed the changes and saved a local copy, and now that I've checked it, is not a good version... I did this because I assumed that with CI the test would have been executed and I did not want to cause any trouble. Nevertheless, I've uploaded the only thing that I have . It's at Testing.

In the only specific scenario that I have, I was trying to test that the information of the products was displayed on screen. I use 'memory router' because I needed to due to some error related to 'useLocation'. I'll be working on the tests this weekend again. I found some really interesting sources from where I hope I can learn how to do everything in the right way. Like: Common mistakes with react-testing-library, from where I found Fixed the 'not wrapped in act' warning and Learning material testing library. I think I will need to make a mock implementation of the functions wrapped and I will search about that.

The error I'm most concerned of is those encountered due to functions that change the state of the component and are wrapped inside the same function that returns the component, like this one for example: imagen

I can only prove I tried to work on this through screenshots of dates of modification and my browser history: imagen

imagen

imagen

imagen

pglez82 commented 2 years ago

It is ok Sebas. The only thing, for this last month, try that your work is reflected in the repository. I know that you have worked hard but just remember that, what we evaluate is the work present in the repository. Not only code, but issues, code review, etc.

About the act in the tests. Maybe this resource is useful: https://github.com/mrdulin/react-act-examples/blob/master/sync.md