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

Refactor Brave Ads URL helper and added unit tests #9356

Closed
tmancey opened this issue Apr 21, 2020 · 1 comment · Fixed by brave/brave-core#5304
Closed

Refactor Brave Ads URL helper and added unit tests #9356

tmancey opened this issue Apr 21, 2020 · 1 comment · Fixed by brave/brave-core#5304

Comments

@tmancey
Copy link
Contributor

tmancey commented Apr 21, 2020

Refactor Brave Ads URL helper and added unit tests

@tmancey tmancey self-assigned this Apr 21, 2020
@tmancey tmancey changed the title Add unit tests for URL utility Add unit tests to Brave Ads URL utility Apr 21, 2020
@tmancey tmancey changed the title Add unit tests to Brave Ads URL utility Refactor Brave Ads URL helper and added unit tests Apr 21, 2020
@tmancey tmancey added feature/ads priority/P3 The next thing for us to work on. It'll ride the trains. QA/Yes tests labels Apr 21, 2020
@tmancey tmancey added this to the 1.10.x - Nightly milestone Apr 24, 2020
@btlechowski
Copy link

btlechowski commented Jun 2, 2020

Verification passed on

Brave 1.10.79 Chromium: 81.0.4044.138 (Official Build) dev (64-bit)
Revision 8c6c7ba89cc9453625af54f11fd83179e23450fa-refs/branch-heads/4044@{#999}
OS Ubuntu 18.04 LTS

Verified test plan from brave/brave-core#5304

Verified viewing an ad

[15468:15468:0602/062238.501675:INFO:redeem_token.cc(426)] Successfully redeemed 0303ac3a-6a06-453b-956e-f116da11651d confirmation id with 36c84fcb-6388-45d8-81ed-5a5d986cd7ef creative instance id for view

Verified clicking an ad

[15468:15468:0602/062244.262209:INFO:redeem_token.cc(426)] Successfully redeemed 3958da3f-ff17-442c-80ce-ac25ea45ec95 confirmation id with 36c84fcb-6388-45d8-81ed-5a5d986cd7ef creative instance id for click

Verified landing an ad

[15468:15468:0602/062301.418197:INFO:redeem_token.cc(426)] Successfully redeemed e6ba617f-618f-4dc1-9ae6-adb762376023 confirmation id with 36c84fcb-6388-45d8-81ed-5a5d986cd7ef creative instance id for landed

Verified converting an ad

[16322:16322:0602/074743.707119:INFO:redeem_token.cc(426)] Successfully redeemed 69eddb01-ca32-4f31-b209-aac8a89ca6a1 confirmation id with 36c84fcb-6388-45d8-81ed-5a5d986cd7ef creative instance id for conversion

Purchase intent

"purchaseIntentSignalHistory": {
	"automotive purchase intent by make-audi": [{
			"timestamp_in_seconds": 1590649595,
			"weight": 1
		}
	]
},

Verification passed on

Brave | 1.10.80 Chromium: 81.0.4044.138 (Official Build) dev (64-bit)
-- | --
Revision | 8c6c7ba89cc9453625af54f11fd83179e23450fa-refs/branch-heads/4044@{#999}
OS | Windows 10 OS Version 1803 (Build 17134.1006)

Verified test plan from brave/brave-core#5304
Verified viewing an ad

[24352:24432:0602/165419.489:INFO:redeem_token.cc(426)] Successfully redeemed 5ff94852-9eb6-4038-990b-0dc941eb4bdb confirmation id with ee0d38a3-43c9-4973-8fdf-cd1f4770fa23 creative instance id for view

Verified clicking an ad

[24352:24432:0602/165421.603:INFO:redeem_token.cc(426)] Successfully redeemed 915bf347-8ff0-437c-ad0c-7d4732721c19 confirmation id with ee0d38a3-43c9-4973-8fdf-cd1f4770fa23 creative instance id for click

Verified landing an ad

[24352:24432:0602/165451.362:INFO:redeem_token.cc(426)] Successfully redeemed c80ff939-8d15-4e49-8500-5c1933442e5a confirmation id with ee0d38a3-43c9-4973-8fdf-cd1f4770fa23 creative instance id for landed

Purchase intent

"purchaseIntentSignalHistory": {
    "automotive purchase intent by make-audi": [
      {
        "timestamp_in_seconds": 1591097320,
        "weight": 1
      }
    ]
  },

Verification PASSED on macOS 10.15.5 x64 using the following build:

Brave | 1.10.88 Chromium: 83.0.4103.97 (Official Build) (64-bit)
-- | --
Revision | 326d148b9655369b86498d9ecca39f63dd2bdd2d-refs/branch-heads/4103@{#657}
OS | macOS Version 10.15.5 (Build 19F101)

Verified viewing ad

[57871:775:0611/164817.080808:INFO:ads_impl.cc(350)] Browser state changed to idle
[57871:775:0611/164819.081398:INFO:ads_impl.cc(359)] Browser state changed to unidle
[57871:775:0611/164819.087491:INFO:ads_impl.cc(954)] Serving ad from categories:
[57871:775:0611/164819.087701:INFO:ads_impl.cc(956)]   technology & computing-technology & computing
[57871:775:0611/164819.087871:INFO:ads_impl.cc(956)]   technology & computing-software
[57871:775:0611/164819.088028:INFO:ads_impl.cc(956)]   arts & entertainment-video games
[57871:775:0611/164819.089278:INFO:ads_impl.cc(974)] No eligible ads found in categories:
[57871:775:0611/164819.089475:INFO:ads_impl.cc(976)]   technology & computing-technology & computing
[57871:775:0611/164819.089637:INFO:ads_impl.cc(976)]   technology & computing-software
[57871:775:0611/164819.089792:INFO:ads_impl.cc(976)]   arts & entertainment-video games
[57871:775:0611/164819.089947:INFO:ads_impl.cc(1007)] Serving ad from parent categories:
[57871:775:0611/164819.090100:INFO:ads_impl.cc(1009)]   technology & computing
[57871:775:0611/164819.090266:INFO:ads_impl.cc(1009)]   arts & entertainment
[57871:775:0611/164819.092583:INFO:ads_impl.cc(1062)] Found 44 eligible ads
[57871:775:0611/164819.092928:INFO:ads_impl.cc(1316)] Ad notification shown:
  uuid: 84cc0e75-396d-4368-823d-d7c345274909
  parentUuid: 516a2451-aa1f-475c-8e71-c31c8b0b9174
  creativeInstanceId: c1fce205-484e-4953-b546-650f5c963a42
  creativeSetId: c7f96341-726f-4e5d-9494-5686db89664b
  category: technology & computing
  title: AirSwap
  body: Buy and sell ERC20 tokens without any trading fees.
  targetUrl: https://travala.com/
[57870:775:0611/164820.372166:INFO:redeem_token.cc(426)] Successfully redeemed 4a6389b5-30ed-4555-8dee-932a72fadec9 confirmation id with c1fce205-484e-4953-b546-650f5c963a42 creative instance id for view
  • ensured that Ad notifications received this month is being increased
  • ensured that the ads that have been displayed/shown are appearing under the 7-day Ads History modal/viewer

Verified clicking Ad

[57870:775:0611/164900.878590:INFO:confirmations_impl.cc(1150)] Confirm ad:
  creativeInstanceId: c1fce205-484e-4953-b546-650f5c963a42
  creativeSetId: c7f96341-726f-4e5d-9494-5686db89664b
  category: technology & computing
  targetUrl: https://travala.com/
  geoTarget: CA
  confirmationType: click
[57870:775:0611/164901.411685:INFO:redeem_token.cc(426)] Successfully redeemed 7f570bfe-3927-4e30-a87f-f3bb705b49c7 confirmation id with c1fce205-484e-4953-b546-650f5c963a42 creative instance id for click

Verified landing an ad

[57851:775:0611/170221.875883:INFO:ads_service_impl.cc(2097)] AdsService Event Log: {"data":{"type":"confirmation","timestamp":"0 hours, 0 minutes, 0 seconds at 5:02 PM","creativeInstanceId":"76eb5134-4334-448a-ab04-4b64ec88f138","confirmationType":"landed"}}
[57870:775:0611/170221.877356:INFO:confirmations_impl.cc(1150)] Confirm ad:
  creativeInstanceId: 76eb5134-4334-448a-ab04-4b64ec88f138
  creativeSetId: b2054163-9998-4b88-aa0c-9939f55d414a
  category: arts & entertainment
  targetUrl: https://travala.com/
  geoTarget: CA
  confirmationType: landed
[57870:775:0611/170222.560893:INFO:redeem_token.cc(426)] Successfully redeemed 45429cbb-9918-4075-9798-5933c0ca72e5 confirmation id with 76eb5134-4334-448a-ab04-4b64ec88f138 creative instance id for landed

Verified converting an ad

[58294:775:0613/171300.446073:INFO:redeem_token.cc(426)] Successfully redeemed 148fe27f-e097-4a5b-a42b-6de8e65d8154 confirmation id with bbb2d221-701d-41de-9368-2ec86c8c75aa creative instance id for conversion

Purchase intent

[57871:775:0611/165617.698024:INFO:ads_impl.cc(710)] Extracting purchase intent signal from visited URL

"purchaseIntentSignalHistory": {
    "automotive purchase intent by category-premium luxury car": [
      {
        "timestamp_in_seconds": 1591908977,
        "weight": 1
      }
    ],
    "automotive purchase intent by make-audi": [
      {
        "timestamp_in_seconds": 1591908977,
        "weight": 1
      }
    ]
  }

Also went through #8939 and ensured that purchase intent was working as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

5 participants