@duckduckgo/autoconsent 16.26.0 → 16.27.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/dist/addon-firefox/compact-rules.json +1 -1
  3. package/dist/addon-firefox/content.bundle.js +2 -2
  4. package/dist/addon-firefox/manifest.json +1 -1
  5. package/dist/addon-firefox/rule-index.json +1 -1
  6. package/dist/addon-firefox/rules.json +1 -1
  7. package/dist/addon-mv3/compact-rules.json +1 -1
  8. package/dist/addon-mv3/content.bundle.js +2 -2
  9. package/dist/addon-mv3/manifest.json +1 -1
  10. package/dist/addon-mv3/rule-index.json +1 -1
  11. package/dist/addon-mv3/rules.json +1 -1
  12. package/dist/autoconsent.cjs.js +2 -2
  13. package/dist/autoconsent.esm.js +2 -2
  14. package/dist/autoconsent.playwright.js +2 -2
  15. package/dist/autoconsent.standalone.js +3 -3
  16. package/lib/heuristic-patterns.ts +2 -2
  17. package/package.json +1 -1
  18. package/rules/autoconsent/complianz-opt-out.json +6 -0
  19. package/rules/autoconsent/gemini-google-com.json +9 -0
  20. package/rules/autoconsent/justwatch-com.json +1 -1
  21. package/rules/autoconsent/kingrecords-co-jp.json +21 -0
  22. package/rules/autoconsent/paypal-us.json +4 -3
  23. package/rules/autoconsent/pornpics-de.json +1 -1
  24. package/rules/autoconsent/rule34-xxx.json +12 -0
  25. package/rules/autoconsent/sex.com.json +45 -0
  26. package/rules/autoconsent/twitch.json +27 -12
  27. package/rules/autoconsent/xhamster-eu.json +3 -1
  28. package/rules/compact-rules.json +1 -1
  29. package/rules/rule-index.json +1 -1
  30. package/rules/rules.json +1 -1
  31. package/tests/complianz-opt-out.spec.ts +5 -0
  32. package/tests/gemini-google-com.spec.ts +5 -0
  33. package/tests/justwatch-com.spec.ts +1 -1
  34. package/tests/kingrecords-co-jp.spec.ts +3 -0
  35. package/tests/paypal-us.spec.ts +4 -0
  36. package/tests/pornpics-de.spec.ts +1 -1
  37. package/tests/rule34-xxx.spec.ts +6 -0
  38. package/tests/sex.com.spec.ts +3 -0
  39. package/tests-wtr/heuristics/heuristics-utils.test.ts +6 -0
@@ -0,0 +1,5 @@
1
+ import generateCMPTests from '../playwright/runner';
2
+
3
+ generateCMPTests('Complianz opt-out', ['https://www.thefoxandpheasant.com/food-menu/', 'https://www.museum.de/', 'https://www.dtv.de/'], {
4
+ testOptIn: false,
5
+ });
@@ -0,0 +1,5 @@
1
+ import generateCMPTests from '../playwright/runner';
2
+
3
+ generateCMPTests('gemini.google.com', ['https://gemini.google.com/app'], {
4
+ skipRegions: ['NA'],
5
+ });
@@ -1,3 +1,3 @@
1
1
  import generateCMPTests from '../playwright/runner';
2
2
 
3
- generateCMPTests('justwatch.com', ['https://www.justwatch.com/'], {});
3
+ generateCMPTests('justwatch.com', ['https://www.justwatch.com/', 'https://www.justwatch.com/us/movie/a-knights-tale'], {});
@@ -0,0 +1,3 @@
1
+ import generateCMPTests from '../playwright/runner';
2
+
3
+ generateCMPTests('kingrecords-co-jp', ['https://www.kingrecords.co.jp/']);
@@ -1,3 +1,7 @@
1
1
  import generateCMPTests from '../playwright/runner';
2
2
 
3
3
  generateCMPTests('paypal-us', ['https://www.paypal.com/us/home'], {});
4
+
5
+ // This banner variant has no "Decline" button, so opting out goes through the cookie
6
+ // preferences page, which navigates away and back, running the rule more than once.
7
+ generateCMPTests('paypal-us', ['https://www.paypal.com/ca/home'], { expectedRuns: 3 });
@@ -1,3 +1,3 @@
1
1
  import generateCMPTests from '../playwright/runner';
2
2
 
3
- generateCMPTests('pornpics.de', ['https://www.pornpics.de/']);
3
+ generateCMPTests('pornpics.de', ['https://www.pornpics.de/', 'https://www.pornpics.com/']);
@@ -0,0 +1,6 @@
1
+ import generateCMPTests from '../playwright/runner';
2
+
3
+ generateCMPTests('rule34-xxx', ['https://rule34.xxx/index.php?page=post&s=list&tags=all'], {
4
+ onlyRegions: ['DE'],
5
+ testOptIn: false,
6
+ });
@@ -0,0 +1,3 @@
1
+ import generateCMPTests from '../playwright/runner';
2
+
3
+ generateCMPTests('sex.com', ['https://www.sex.com/']);
@@ -141,6 +141,12 @@ describe('classifyButtonTextRegex', () => {
141
141
  expect(classifyButtonTextRegex('Reject All (except Necessary)')).to.equal('reject');
142
142
  });
143
143
 
144
+ it('matches "do not accept" variants', () => {
145
+ expect(classifyButtonTextRegex('I do not accept')).to.equal('reject');
146
+ expect(classifyButtonTextRegex('Do not accept cookies')).to.equal('reject');
147
+ expect(classifyButtonTextRegex('I do not accept the use of cookies')).to.equal('reject');
148
+ });
149
+
144
150
  it('returns other for empty string', () => {
145
151
  expect(classifyButtonTextRegex('')).to.equal('other');
146
152
  });