Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Fixes extra visit time on first logged visit being ignored #13999

Merged
merged 1 commit into from
May 4, 2018

Conversation

ryanml
Copy link
Contributor

@ryanml ryanml commented May 2, 2018

Fixes #13993

Submitter Checklist:

  • Submitted a ticket for my issue if one did not already exist.
  • Used Github auto-closing keywords in the commit message.
  • Added/updated tests for this change (for new code or code which already has tests).
  • Ran git rebase -i to squash commits (if needed).
  • Tagged reviewers and labelled the pull request as needed.
  • Request a security/privacy review as needed. (Ask a Brave employee to help if you cannot access this document.)

Test Plan:

  1. Clean install Brave from this patch
  2. Enable payments
  3. Set minimums to 5 seconds/1 visit
  4. Visit different sites in new tabs and spend different amounts of time on each > 5 seconds.
  5. Confirm that each publisher has the expected amount of visit time in the ledger.

Reviewer Checklist:

  • Request a security/privacy review as needed if one was not already requested.

Tests

  • Adequate test coverage exists to prevent regressions
  • Tests should be independent and work correctly when run individually or as a suite ref
  • New files have MPL2 license header

@ryanml ryanml self-assigned this May 2, 2018
@ryanml ryanml added this to the 0.22.x Release 3 (Beta channel) milestone May 2, 2018
@codecov-io
Copy link

codecov-io commented May 3, 2018

Codecov Report

Merging #13999 into master will increase coverage by 0.02%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master   #13999      +/-   ##
==========================================
+ Coverage   56.44%   56.47%   +0.02%     
==========================================
  Files         284      284              
  Lines       29353    29357       +4     
  Branches     4879     4879              
==========================================
+ Hits        16568    16578      +10     
+ Misses      12785    12779       -6
Flag Coverage Δ
#unittest 56.47% <100%> (+0.02%) ⬆️
Impacted Files Coverage Δ
js/actions/appActions.js 19.16% <100%> (ø) ⬆️
app/browser/reducers/ledgerReducer.js 48.07% <100%> (+1.82%) ⬆️
.../renderer/components/navigation/publisherToggle.js 81.41% <100%> (+0.16%) ⬆️

@NejcZdovc
Copy link
Contributor

@ryanml this approach will not work because if you visit verified publisher you get enabled icon, but you don't get verified check, because we are only using local state and we don't trigger actual checks. I would suggest that we keep current logic and we just handle this time logging problem.

@ryanml
Copy link
Contributor Author

ryanml commented May 3, 2018

Approach changed, RFR

jasonrsadler
jasonrsadler previously approved these changes May 3, 2018
Copy link
Contributor

@jasonrsadler jasonrsadler left a comment

Choose a reason for hiding this comment

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

Good fix 🥇

@NejcZdovc
Copy link
Contributor

@ryanml please add test for the reducer

Copy link
Contributor

@NejcZdovc NejcZdovc left a comment

Choose a reason for hiding this comment

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

++ thx for the tests

@NejcZdovc NejcZdovc merged commit 8f73858 into brave:master May 4, 2018
NejcZdovc added a commit that referenced this pull request May 4, 2018
Fixes extra visit time on first logged visit being ignored
NejcZdovc added a commit that referenced this pull request May 4, 2018
Fixes extra visit time on first logged visit being ignored
@NejcZdovc
Copy link
Contributor

master 8f73858
0.23 d28619f
0.22-release3 2033592

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants