ClimateMind / climatemind-backend

Your climate action is here 🌎 Our API is a source for learning how climate change personally affects you and the things you care about most. Additionally, it will teach a scientifically proven method for communicating to others that climate change is a personally relevant issue to inspire action.
https://contribute.climatemind.org/v/rest-api/
MIT License
18 stars 19 forks source link

#396: replaced login cypress test with pytest test #484

Closed cyplas closed 1 year ago

cyplas commented 1 year ago

Detailed information:

Replaces the cypress e2e login test with an equivalent pytest one. Except for not covering the limiter stuff, as discussed in #396. I recommend creating a separate issue for that.

Closing issues:

List all issues the pull request solve:

Test plan (required)

cyplas commented 1 year ago

@danmash Hmm, this is odd. The black linter clears for me locally without changes, but here it complains about 10 different files, only one of which I've even changed. Not sure what I'm missing here ...

cyplas commented 1 year ago

And I forgot to mention that I noticed something strange with the recaptcha: any string value seems to be fine. Or, if that's actually expected somehow, then I'm not sure why the cypress test had a long key-looking value in there.

danmash commented 1 year ago

@cyplas @Svenstar74 faced a similar issue. I guess he installed the fresh black version and it works fine. Correct me if I'm wrong. @cyplas Try to update black.

cyplas commented 1 year ago

@cyplas @Svenstar74 faced a similar issue. I guess he installed the fresh black version and it works fine. Correct me if I'm wrong. @cyplas Try to update black.

Aha, indeed. Thanks!

codecov-commenter commented 1 year ago

Codecov Report

Base: 73.42% // Head: 74.13% // Increases project coverage by +0.70% :tada:

Coverage data is based on head (a88f6da) compared to base (fc61a55). Patch coverage: 0.00% of modified lines in pull request are covered.

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #484 +/- ## =========================================== + Coverage 73.42% 74.13% +0.70% =========================================== Files 85 85 Lines 2679 2679 Branches 315 315 =========================================== + Hits 1967 1986 +19 + Misses 680 659 -21 - Partials 32 34 +2 ``` | [Impacted Files](https://codecov.io/gh/ClimateMind/climatemind-backend/pull/484?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ClimateMind) | Coverage Ξ” | | |---|---|---| | [app/alignment/utils.py](https://codecov.io/gh/ClimateMind/climatemind-backend/pull/484?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ClimateMind#diff-YXBwL2FsaWdubWVudC91dGlscy5weQ==) | `35.33% <ΓΈ> (ΓΈ)` | | | [app/feed/process\_alignment\_feed.py](https://codecov.io/gh/ClimateMind/climatemind-backend/pull/484?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ClimateMind#diff-YXBwL2ZlZWQvcHJvY2Vzc19hbGlnbm1lbnRfZmVlZC5weQ==) | `78.66% <0.00%> (ΓΈ)` | | | [app/feed/routes.py](https://codecov.io/gh/ClimateMind/climatemind-backend/pull/484?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ClimateMind#diff-YXBwL2ZlZWQvcm91dGVzLnB5) | `44.44% <ΓΈ> (ΓΈ)` | | | [app/scoring/process\_scores.py](https://codecov.io/gh/ClimateMind/climatemind-backend/pull/484?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ClimateMind#diff-YXBwL3Njb3JpbmcvcHJvY2Vzc19zY29yZXMucHk=) | `94.82% <ΓΈ> (ΓΈ)` | | | [app/session/session\_helpers.py](https://codecov.io/gh/ClimateMind/climatemind-backend/pull/484?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ClimateMind#diff-YXBwL3Nlc3Npb24vc2Vzc2lvbl9oZWxwZXJzLnB5) | `97.50% <ΓΈ> (ΓΈ)` | | | [app/solutions/process\_solutions.py](https://codecov.io/gh/ClimateMind/climatemind-backend/pull/484?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ClimateMind#diff-YXBwL3NvbHV0aW9ucy9wcm9jZXNzX3NvbHV0aW9ucy5weQ==) | `89.06% <ΓΈ> (ΓΈ)` | | | [app/subscribe/store\_subscription\_data.py](https://codecov.io/gh/ClimateMind/climatemind-backend/pull/484?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ClimateMind#diff-YXBwL3N1YnNjcmliZS9zdG9yZV9zdWJzY3JpcHRpb25fZGF0YS5weQ==) | `31.57% <ΓΈ> (ΓΈ)` | | | [app/sendgrid/utils.py](https://codecov.io/gh/ClimateMind/climatemind-backend/pull/484?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ClimateMind#diff-YXBwL3NlbmRncmlkL3V0aWxzLnB5) | `70.83% <0.00%> (+10.41%)` | :arrow_up: | | [app/auth/routes.py](https://codecov.io/gh/ClimateMind/climatemind-backend/pull/484?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ClimateMind#diff-YXBwL2F1dGgvcm91dGVzLnB5) | `72.89% <0.00%> (+13.08%)` | :arrow_up: | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ClimateMind). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ClimateMind)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

danmash commented 1 year ago

πŸ‘