SwEnt-Group13 / Unio

The world’s largest campus life platform.
3 stars 1 forks source link

test(explore): add tests to increase code coverage of Explore.kt #81

Closed Zafouche closed 6 days ago

Zafouche commented 6 days ago

Description and motivation

The goal of this small PR is simply to increase code coverage and have more edge cases, to make the testing more robust.

oskar-codes commented 6 days ago

Great initiative on adding these tests! Increasing test coverage is a valuable improvement for the project, and your contribution is much appreciated πŸ‘

Zafouche commented 6 days ago

Great initiative on adding these tests! Increasing test coverage is a valuable improvement for the project, and your contribution is much appreciated πŸ‘

Thanks. I have checked sonar cloud reports, and the only conditions / components that were not displayed should be now tested (association item interaction, search bar placeholder text, search bar icon). The rest are the placeholders for what will be the logic of the search bar, e.g. it's filtering behavior. Since this will be done by someone else, I think I have tested everything I could. Let me know if I can merge, because only the main branch can have the full analysis on the code.

oskar-codes commented 6 days ago

@Zafouche it appears that an Android test fails on the CI. I hope it's not the same issue you had yesterday I will gladly approve the changes once you find a way to fix it

Zafouche commented 6 days ago

@Zafouche it appears that an Android test fails on the CI. I hope it's not the same issue you had yesterday I will gladly approve the changes once you find a way to fix it

This is weird, I ran it multiple times on my machine. Could you try to run the connected tests on your end? @oskar-codes

oskar-codes commented 6 days ago

@Zafouche Right now I'm not at home but I'll try later this evening if you want πŸ‘

Zafouche commented 6 days ago

@oskar-codes That’s fine, it’s no rush πŸ‘πŸ½

oskar-codes commented 6 days ago

@Zafouche The exact same test that fails in the CI fails on my machine as well! I will investigate this and if I find a solution I'll push to your branch.

sonarcloud[bot] commented 6 days ago

Quality Gate Failed Quality Gate failed

Failed conditions
72.4% Coverage on New Code (required β‰₯ 80%)

See analysis details on SonarCloud

Zafouche commented 6 days ago

The failing test has been fixed and I'll approve this for now so you can merge when you want.

Interesting... Thanks for fixing it, was it failing on your machine?

oskar-codes commented 5 days ago

Interesting... Thanks for fixing it, was it failing on your machine?

Yeah it was also failing on my machine, must be some very strange issue that makes it work on your computer and not others, but either way now it's fixed πŸ‘

Zafouche commented 5 days ago

Interesting... Thanks for fixing it, was it failing on your machine?

Yeah it was also failing on my machine, must be some very strange issue that makes it work on your computer and not others, but either way now it's fixed πŸ‘

@oskar-codes Yes, perhaps it is because my machine schedules computations differently. I wouldn't be surprised if this was the case. It could explain the same problem that was present in PR #74