-
Notifications
You must be signed in to change notification settings - Fork 973
Send week of installation and ref parameter to updater #12135
Conversation
test/unit/app/browser/datesTest.js
Outdated
|
||
require('../../braveUnit') | ||
|
||
describe('update date handling', function () { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
awesome! Thanks for adding this 😄
Codecov Report
@@ Coverage Diff @@
## master #12135 +/- ##
==========================================
+ Coverage 54.96% 55% +0.03%
==========================================
Files 275 275
Lines 26549 26569 +20
Branches 4270 4273 +3
==========================================
+ Hits 14593 14613 +20
Misses 11956 11956
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The lastMonday function is not working as expected
* On first installation store the date of the previous Monday in session * Accept ref parameter in build-package to store a promo * identifier * Send woi and ref parameters on update requests Auditors: @clifton, @bbondy Test Plan: * Clear session file * Build browser executable `REF=promo1 CHANNEL=dev npm run * build-package` * Open built binary * Close browser * Inspect session file a) Ensure weekOfInstallation has date of previous Monday * Open browser * Check for an update * Open updateLog.log a) Ensure query has `woi` and `ref` parameters
b5639b9
to
64a623e
Compare
const d = new Date(exampleDate) | ||
assert.equal(dates.lastMonday(d), '2017-11-13', 'previous Monday') | ||
}) | ||
it('returns YYYY-MM-DD of today if today is monday', function () { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@aekeus here's the test I added regarding the previous comment
64a623e
to
18e45e7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes look good 😄 👍 Thanks for clarification about the behavior. I added tests for the rest of the file and then also added a test to show that it'll return today (if today is Monday)
Send week of installation and ref parameter to updater
Send week of installation and ref parameter to updater
Send week of installation and ref parameter to updater
session
Auditors: @bsclifton, @bbondy
Test Plan:
REF=promo1 CHANNEL=dev npm run build-package
--user-data-dir-name=brave-development
flag so you don't overwrite your production profile)~/Library/Application Support/session-store-1
)a) Ensure weekOfInstallation has date of previous Monday
b) Ensure promoCode has the value
promo1
a) Ensure query has
woi
andref
parametersImplements: #12134
Submitter Checklist:
git rebase -i
to squash commits (if needed).Reviewer Checklist:
Tests