10up / ads-txt

Ads.txt Manager for WordPress: Manage your ads.txt and app-ads.txt files in the WordPress dashboard
https://wordpress.org/plugins/ads-txt/
GNU General Public License v2.0
57 stars 25 forks source link

Respect query strings (cachebusting) #118

Closed peterwilsoncc closed 1 year ago

peterwilsoncc commented 1 year ago

Description of the Change

Displays the ads.txt and app-ads.txt files for any URL beginning with (app-)ads.txt? -- this is to account for requests that include a querystring.

The value of the query string has no affect to emulate the affect of hitting an actual text file.

Closes #26.

How to test the Change

Changelog Entry

Fixed - Display ads.txt files for crawlers using a cache busting query string.

Credits

Props @helen, @peterwilsoncc.

Checklist:

peterwilsoncc commented 1 year ago

@cadic Thanks for the review.

I ended up combining the querystring tests with the previous test to avoid the need to repeat setting up the code. There's a section on the best practices guide pointing out the difference between E2E and unit tests. It argues for grouping similar assertions.