Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[EP-399] QA Phase 1 Remove Properties #1410

Merged
merged 10 commits into from
Mar 29, 2021

Conversation

moderateepheezy
Copy link
Contributor

📲 What

Remove the following event properties and their related tests.

  • checkout_amount
  • checkout_bonus_amount
  • checkout_shipping_amount
  • context_timestamp
  • project_category_id
  • project_goal
  • project_location
  • project_static_usd_rate
  • project_subcategory_id
  • session_apple_pay_device
  • session_cellular_connection
  • session_enabled_features
  • session_mp_lib
  • session_referrer_credit
  • session_wifi_connection
  • user_country

🤔 Why

Base on the feedback from QA for Phase 1 event tracking, some of the event properties sent to Segment are not needed.

@codecov
Copy link

codecov bot commented Mar 27, 2021

Codecov Report

Merging #1410 (a1e1e5f) into master (e385dd6) will decrease coverage by 0.03%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1410      +/-   ##
==========================================
- Coverage   86.12%   86.09%   -0.04%     
==========================================
  Files        1104     1104              
  Lines       98014    97806     -208     
==========================================
- Hits        84419    84206     -213     
- Misses      13595    13600       +5     
Impacted Files Coverage Δ
Library/SharedFunctions.swift 89.05% <ø> (-0.21%) ⬇️
Library/SharedFunctionsTests.swift 100.00% <ø> (ø)
Library/ViewModels/PledgeViewModelTests.swift 100.00% <ø> (ø)
...Models/ProjectPamphletMainCellViewModelTests.swift 100.00% <ø> (ø)
...ary/ViewModels/ProjectPamphletViewModelTests.swift 100.00% <ø> (ø)
Library/ViewModels/ThanksViewModelTests.swift 100.00% <ø> (ø)
Library/Tracking/KSRAnalytics.swift 84.60% <100.00%> (-0.40%) ⬇️
Library/Tracking/KSRAnalyticsTests.swift 100.00% <100.00%> (ø)
Library/ViewModels/PledgeViewModel.swift 99.73% <100.00%> (-0.01%) ⬇️
.../ViewModels/ProjectPamphletMainCellViewModel.swift 98.03% <100.00%> (-0.02%) ⬇️
... and 5 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e385dd6...a1e1e5f. Read the comment docs.

Copy link
Contributor

@singhhari singhhari left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know most of this consists of deletions but is there a way to bump the coverage a bit?

Library/Tracking/KSRAnalytics.swift Show resolved Hide resolved
Library/Tracking/KSRAnalytics.swift Show resolved Hide resolved
Library/Tracking/KSRAnalytics.swift Show resolved Hide resolved
@@ -186,12 +186,11 @@ public final class ProjectPamphletViewModel: ProjectPamphletViewModelType, Proje
}

freshProjectRefTagAndCookieRefTag
.observeValues { project, refTag, cookieRefTag in
.observeValues { project, refTag, _ in
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assuming the cookieRefTag is not required you should remove it from freshProjectRefTagAndCookieRefTag instead of omitting it in this observeValues block.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

freshProjectRefTagAndCookieRefTag is used elsewhere in the code with cookieRefTag needed.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i just did a global search on freshProjectRegTagAndCookieTag and don't see it used anywhere outside this file. I think you can remove the third type parameter from line 177, update the variable name and the observeValues block to remove the _.

@moderateepheezy
Copy link
Contributor Author

moderateepheezy commented Mar 29, 2021

I know most of this consists of deletions but is there a way to bump the coverage a bit?

I have tried, unless I go out of scope of my task(Unless it's allowed), not sure if there's any easier way to increase the coverage. I also checked some functions that I didn't find a direct test for in SharedFunction, and I added tests for them, but that didn't increase as well as something else already provided coverage for them, so I deleted them.

@@ -849,8 +849,7 @@ public class PledgeViewModel: PledgeViewModelType, PledgeViewModelInputs, Pledge
reward: baseReward,
pledgeViewContext: pledgeViewContext,
checkoutData: checkoutData,
refTag: refTag,
cookieRefTag: cookieRefTag
refTag: refTag
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line 831 has a constant that is no longer being used. Delete that.

@singhhari singhhari self-requested a review March 29, 2021 17:20
Copy link
Contributor

@singhhari singhhari left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@moderateepheezy moderateepheezy merged commit e5bffc2 into master Mar 29, 2021
@moderateepheezy moderateepheezy deleted the EP-399-qa-phase-1-remove-properties branch March 29, 2021 17:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants