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

Adds s-s to the referral code #13756

Merged
merged 1 commit into from
Apr 6, 2018
Merged

Conversation

NejcZdovc
Copy link
Contributor

@NejcZdovc NejcZdovc commented Apr 6, 2018

Resolves #13754

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:

Instead of just supporting pem001 (3 letters and 3 numbers) we need to support org-name (at least 1 letter, dash and at least 1 letter) as well.

Copied test script from #13113

Mac OS

~/Development/tmp
❯ ./postinstall-test.sh "hi-pem001.pkg"
Installer path is: hi-pem001.pkg
Installer path matched for promo code
Got promo code: pem001

~/Development/tmp
❯ ./postinstall-test.sh "hi-pem001(1).pkg"
Installer path is: hi-pem001(1).pkg
Installer path matched for promo code
Got promo code: pem001

~/Development/tmp
❯ ./postinstall-test.sh "hi-pem001 (1).pkg"
Installer path is: hi-pem001 (1).pkg
Installer path matched for promo code
Got promo code: pem001

~/Development/tmp
❯ ./postinstall-test.sh "hi-pem001 (12).pkg"
Installer path is: hi-pem001 (12).pkg
Installer path matched for promo code
Got promo code: pem001

~/Development/tmp
❯ ./postinstall-test.sh "hi-pem001(12).pkg"
Installer path is: hi-pem001(12).pkg
Installer path matched for promo code
Got promo code: pem001

~/Development/tmp
❯ ./postinstall-test.sh "hi-pemf001(12).pkg"
Installer path is: hi-pemf001(12).pkg
Installer path did not match for promo code

~/Development/tmp
❯ ./postinstall-test.sh "hi-org-name.pkg"
Installer path is: hi-org-name.pkg
Installer path matched for promo code
Got promo code: org-name

~/Development/tmp
❯ ./postinstall-test.sh "hi-org-name(1).pkg"
Installer path is: hi-org-name(1).pkg
Installer path matched for promo code
Got promo code: org-name

~/Development/tmp
❯ ./postinstall-test.sh "hi-org-name (1).pkg"
Installer path is: hi-org-name (1).pkg
Installer path matched for promo code
Got promo code: org-name

Windows:

  • covered with automated tests

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

@NejcZdovc NejcZdovc added this to the 0.22.x Release 2 (Beta Channel) milestone Apr 6, 2018
@NejcZdovc NejcZdovc self-assigned this Apr 6, 2018
@NejcZdovc NejcZdovc requested review from petemill and bsclifton April 6, 2018 14:47
@codecov-io
Copy link

codecov-io commented Apr 6, 2018

Codecov Report

Merging #13756 into master will not change coverage.
The diff coverage is 100%.

@@           Coverage Diff           @@
##           master   #13756   +/-   ##
=======================================
  Coverage   56.78%   56.78%           
=======================================
  Files         285      285           
  Lines       29038    29038           
  Branches     4803     4803           
=======================================
  Hits        16488    16488           
  Misses      12550    12550
Flag Coverage Δ
#unittest 56.78% <100%> (ø) ⬆️
Impacted Files Coverage Δ
app/cmdLine.js 40.56% <100%> (ø) ⬆️

Resolves brave#13754

Auditors:

Test Plan:
Copy link
Member

@bsclifton bsclifton left a comment

Choose a reason for hiding this comment

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

Regex changes look good; unit tests cover the previous and added functionality. Nice job with the postinstall-test.sh script 😄

@bsclifton bsclifton merged commit ba74026 into brave:master Apr 6, 2018
@NejcZdovc
Copy link
Contributor Author

NejcZdovc commented Apr 6, 2018

@bsclifton that script is all @petemill 😃

bsclifton added a commit that referenced this pull request Apr 6, 2018
bsclifton added a commit that referenced this pull request Apr 6, 2018
bsclifton added a commit that referenced this pull request Apr 6, 2018
@bsclifton
Copy link
Member

master ba74026
0.23.x 2aac360
0.22.x 7b37476
0.22.x-promo 06c774b

bsclifton added a commit that referenced this pull request Apr 12, 2018
NejcZdovc pushed a commit that referenced this pull request Apr 18, 2018
@NejcZdovc
Copy link
Contributor Author

0.22.x-c66 1625a7c

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.

3 participants