Idea at resolving an issue #11472
-
As part of a Course at my university, I have to take part in an open-source project. Also in this course I am obligated to discuss my solution approach to an issue with the community and especially the developers. Firstly, this issue obviously appears everywhere, where a student profile picture is shown in detail, so as far as I understand the project structure, I have to change quite a lot under What I imagined was using JS/TS to basically calculate the ratio and size down the image according to that. For a picture that's for example taller than wider, I'd have a max height, scale the image to that height and calculate the corresponding width of the image, so that the proportions stay the same. However the last approach is a bit harder to test, since it would require GUI Tests with Selenium, while I could just test my javascript function with jest and hope my DOM manipulation works. What are your thoughts about my approach? Do you think they're valuable? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
I'm not so sure you need to change "quite a lot" of files. While it's true that there are a few places whereby profile picture is shown, they're likely coming from/defined in the same component.
It should work theoretically but sounds like too much work/additional code for a marginal gain.
This is a non-issue. CSS definitions are never meant for automated testing. |
Beta Was this translation helpful? Give feedback.
I'm not so sure you need to change "quite a lot" of files. While it's true that there are a few places whereby profile picture is shown, they're likely coming from/defined in the same component.
It should work theoretically but sounds like too much work/additional code for a marginal gain.
This is a non-issue. CSS definitions are never meant for automated testing.