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

<amp-consent> add machtedGeoGroups to request #25699

Merged
merged 63 commits into from Nov 25, 2019

Conversation

micajuine-ho
Copy link
Contributor

@micajuine-ho micajuine-ho commented Nov 20, 2019

Task 5 of #25623.
Add matchedGeoGroups to the the checkConsentHref request request body.

Previous task(s):
1: #25676 (merged)
2: #25689 (merged)
3 & 4: #25696 (merged)

extensions/amp-consent/0.1/amp-consent.js Outdated Show resolved Hide resolved
Copy link
Contributor

@lannka lannka left a comment

Choose a reason for hiding this comment

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

pls add unit test

extensions/amp-consent/0.1/consent-config.js Outdated Show resolved Hide resolved
extensions/amp-consent/0.1/consent-config.js Outdated Show resolved Hide resolved
extensions/amp-consent/0.1/amp-consent.js Outdated Show resolved Hide resolved
extensions/amp-consent/0.1/amp-consent.js Outdated Show resolved Hide resolved
extensions/amp-consent/0.1/consent-config.js Outdated Show resolved Hide resolved
@@ -230,6 +242,29 @@ describes.realWin(
expect(await ampConsent.getConsentRequiredPromise_()).to.be.true;
});

it('send post request to server with matched group', async () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

add a test case that when multiple groups are matched, we send the first one.

@lannka lannka merged commit 0859e38 into ampproject:master Nov 25, 2019
@micajuine-ho micajuine-ho deleted the ccpa_matchedGeoGroups branch December 4, 2019 19:29
micajuine-ho pushed a commit to micajuine-ho/amphtml that referenced this pull request Dec 27, 2019
* added experiment flag

* added configs

* changes to prod/canary config

* cleaning up

* more clean up

* merge logic in consent-config

* adding in userAssert for consentRequired

* Update canary-config.json

* Update prod-config.json

* Update amp-consent.js

* cleaning up

* deprecate promptIfUnknownForGeo

* consent intialize promise

* config merge then validate

* check if geoService can't identify

* verify consentRequired from endpoint

* removed consentState to string

* adding comment

* bug fixing and geoGroupUnknown

* adding const vbs, refactoring, adding matchedgroup

* add this.matchedGeoGroups_, & in request

* adding in getConsentRequiredPromiseLegacy_()

* Update amp-consent.js

* Update consent-config.js

* requested changes

* suggested changes

* getMatchedGeoGroups method

* getMatchedGeoGroups() in amp-consent

* suggested fixes & fixing unit tests

* unit tests, better userAssert messages

* adding tests

* Suggested changes to tests + bug fixes

* starting to write tests for promptunknowngeo

* unit tests

* remove function*,  cleaning up

* sandbox change

* a little more cleaning up

* cleaning

* cleaning up

* cleaning up logic

* fixing tests and promises

* testing

* bug fix

* unit test for cr

* test for non remote consentRequired

* migrating unit tests

* Cleaning code, adding thorough test

* suggested changes

* adding tests

* adding tests

* nit changes from last pr

* suggested changes + tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants