trustedshops-public / etrusted-ios-trustbadge-library

Show TrustBadge on your iOS app
MIT License
2 stars 2 forks source link

Merge product grade feature with the develop branch #29

Closed prempratapsingh closed 1 year ago

prempratapsingh commented 1 year ago

Relates - https://etrustedmobile.atlassian.net/browse/MAD-207

Description

A new product grade widget is added to the Trustylib library and the readme has been updated with details about how to use it. Newly added view, model, view model and service layers are covered with passing unit tests, here below is Fastlane test run status,

Screenshot 2023-04-24 at 3 05 57 PM
prempratapsingh commented 1 year ago

Sonar cloud check/report is valid 👍

There are some common piece of code b/w shop grade widget and product grade widget, I am refactoring these widgets to create a new widget and reuse the same in both shop grade and product grade widgets.

sonarcloud[bot] commented 1 year ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 6 Code Smells

91.6% 91.6% Coverage
0.0% 0.0% Duplication

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 86.96% and project coverage change: +0.86 :tada:

Comparison is base (69ac4a1) 83.54% compared to head (c0ffb26) 84.41%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #29 +/- ## =========================================== + Coverage 83.54% 84.41% +0.86% =========================================== Files 56 66 +10 Lines 2182 2964 +782 Branches 787 1066 +279 =========================================== + Hits 1823 2502 +679 - Misses 212 259 +47 - Partials 147 203 +56 ``` | [Impacted Files](https://codecov.io/gh/trustedshops-public/etrusted-ios-trustbadge-library/pull/29?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=trustedshops-public) | Coverage Δ | | |---|---|---| | [...s/Trustylib/Models/ShopAggregateRatingsModel.swift](https://codecov.io/gh/trustedshops-public/etrusted-ios-trustbadge-library/pull/29?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=trustedshops-public#diff-U291cmNlcy9UcnVzdHlsaWIvTW9kZWxzL1Nob3BBZ2dyZWdhdGVSYXRpbmdzTW9kZWwuc3dpZnQ=) | `100.00% <ø> (ø)` | | | [...ts/TrustylibTests/AggregateRatingsModelTests.swift](https://codecov.io/gh/trustedshops-public/etrusted-ios-trustbadge-library/pull/29?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=trustedshops-public#diff-VGVzdHMvVHJ1c3R5bGliVGVzdHMvQWdncmVnYXRlUmF0aW5nc01vZGVsVGVzdHMuc3dpZnQ=) | `71.69% <ø> (ø)` | | | [Tests/TrustylibTests/ShopGradeViewTests.swift](https://codecov.io/gh/trustedshops-public/etrusted-ios-trustbadge-library/pull/29?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=trustedshops-public#diff-VGVzdHMvVHJ1c3R5bGliVGVzdHMvU2hvcEdyYWRlVmlld1Rlc3RzLnN3aWZ0) | `88.88% <ø> (+4.67%)` | :arrow_up: | | [...ests/TrustylibTests/TestUtils/FileDataLoader.swift](https://codecov.io/gh/trustedshops-public/etrusted-ios-trustbadge-library/pull/29?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=trustedshops-public#diff-VGVzdHMvVHJ1c3R5bGliVGVzdHMvVGVzdFV0aWxzL0ZpbGVEYXRhTG9hZGVyLnN3aWZ0) | `64.28% <ø> (ø)` | | | [Sources/Trustylib/Models/TrustbadgeState.swift](https://codecov.io/gh/trustedshops-public/etrusted-ios-trustbadge-library/pull/29?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=trustedshops-public#diff-U291cmNlcy9UcnVzdHlsaWIvTW9kZWxzL1RydXN0YmFkZ2VTdGF0ZS5zd2lmdA==) | `50.00% <33.33%> (ø)` | | | [Sources/Trustylib/Models/TrustbadgeContext.swift](https://codecov.io/gh/trustedshops-public/etrusted-ios-trustbadge-library/pull/29?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=trustedshops-public#diff-U291cmNlcy9UcnVzdHlsaWIvTW9kZWxzL1RydXN0YmFkZ2VDb250ZXh0LnN3aWZ0) | `62.50% <50.00%> (-8.93%)` | :arrow_down: | | [Sources/Trustylib/Views/TrustbadgeView.swift](https://codecov.io/gh/trustedshops-public/etrusted-ios-trustbadge-library/pull/29?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=trustedshops-public#diff-U291cmNlcy9UcnVzdHlsaWIvVmlld3MvVHJ1c3RiYWRnZVZpZXcuc3dpZnQ=) | `64.38% <50.00%> (-10.62%)` | :arrow_down: | | [...ests/TrustylibTests/ProductDetailsModelTests.swift](https://codecov.io/gh/trustedshops-public/etrusted-ios-trustbadge-library/pull/29?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=trustedshops-public#diff-VGVzdHMvVHJ1c3R5bGliVGVzdHMvUHJvZHVjdERldGFpbHNNb2RlbFRlc3RzLnN3aWZ0) | `69.09% <69.09%> (ø)` | | | [...ests/TrustylibTests/ProductRatingsModelTests.swift](https://codecov.io/gh/trustedshops-public/etrusted-ios-trustbadge-library/pull/29?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=trustedshops-public#diff-VGVzdHMvVHJ1c3R5bGliVGVzdHMvUHJvZHVjdFJhdGluZ3NNb2RlbFRlc3RzLnN3aWZ0) | `70.83% <70.83%> (ø)` | | | [...ces/Trustylib/Views/Widgets/ProductGradeView.swift](https://codecov.io/gh/trustedshops-public/etrusted-ios-trustbadge-library/pull/29?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=trustedshops-public#diff-U291cmNlcy9UcnVzdHlsaWIvVmlld3MvV2lkZ2V0cy9Qcm9kdWN0R3JhZGVWaWV3LnN3aWZ0) | `82.05% <82.05%> (ø)` | | | ... and [15 more](https://codecov.io/gh/trustedshops-public/etrusted-ios-trustbadge-library/pull/29?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=trustedshops-public) | | ... and [1 file with indirect coverage changes](https://codecov.io/gh/trustedshops-public/etrusted-ios-trustbadge-library/pull/29/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=trustedshops-public) 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=trustedshops-public). 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=trustedshops-public)

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

prempratapsingh commented 1 year ago

Despite a little confusion concerning the hard coded ts-ids it looks good to me.

Thank you for reviewing the PR 👍