Post a work to an unrevealed collection
Have someone other than the creator go to the URL for the work (unless they're an admin, they'll just see a message about the work being unrevealed, not the work)
Post a work
Log in as an admin and hide the work
Have another admin go to the URL for the work (they'll be able to see the work)
A hit is registered and the creator contacts Support to ask how this could be happening.
What should happen
If the work is unrevealed or hidden, hits should not increase the hit count.
It’s probably a good idea to also check that hits to works that are revealed or not hidden actually increase the hit count.
Posted a work to an unrevealed collection: https://test.archiveofourown.org/works/1070875
Visited it logged out
Visited it as an admin
Also, as long as I was logged in as an admin, I hid a work that had 5 hits: https://test.archiveofourown.org/works/1070818 (it should go up to 6 or 7 in a bit due to the viewing and hiding, and then I’ll check that the hit count doesn’t increase more)
Now we wait! It is 03:54 for me.
ETA 04:35: I forgot that I need not wait for the blurb to update! The hits in the meta (as opposed to the blurb) update basically instantly. And I can confirm that 1070875 stayed at 0 and 1070818 went up to 6 but didn’t go any higher even when using 2 different IPs (to make sure hits weren’t being disregarded due to that check).
Hits on regular works went up normally. I tested that with https://test.archiveofourown.org/works/1070781, which had 0 hits and now has 2 (one logged out on my phone, one logged in as admin).
All looks good!
Notes for testing:
Hit counts on the work meta are from Redis, they should update immediately. The scheduled task to move hits into the database doesn't matter here.
Use your home internet and your phone (on LTE) for 2 visitor IPs.
I wanted to check that hits didn’t increase if you went to the first chapter as opposed to the work. It looked good, too!
Hidden work, chapter 1: https://test.archiveofourown.org/works/1070896/chapters/2140474 - Visited on my phone as admin and then on my computer as sarken, no increase in hits either time
Unrevealed work, chapter 1: https://test.archiveofourown.org/works/1070899/chapters/2140480 - Visited on my phone as admin and then on my computer as the challenge mod (sarken), no increase in hits either time
Normal work: visited as a random user (computer), hit count goes up. Visited as an admin (phone), hit count goes up.
Unrevealed work: https://test.archiveofourown.org/works/1069105. Visited as an admin (phone, computer), hit count doesn't go up. Visited as another random user (phone, computer), hit count doesn't go up.
Hidden work: https://test.archiveofourown.org/works/1070818. Visited as an admin (phone, computer), hit count doesn't go up.