ci(translation): save screenshots as workflow artifacts
Status
Ready for review
Description of Changes
Fixes #7237 by saving the screenshots generated by make translation-test as CI artifacts for 24 hours, for the following reasons:
-
make translation-testgenerates them no matter what, so we might as well make them inspectable. - #7237 occurs only locally, where this code path is rarely used; let's take advantage of CI exercising it.
- This points towards perhaps even updating Weblate's copy of screenshots directly from these tests run nightly on
develop.
Fixes #7241 by correcting the parameterization of tests and fixtures for page-layout tests. See individual commits for details.
Testing
- [ ] Visual review.
- [ ] Inspect a couple of languages and confirm that their screenshots are correct.
- ~24 hours is a reasonable retention period for 100 MB of screenshots per run.~
Deployment
CI-only; no deployment considerations.
Good catch, @legoktm. I'm looking into this in #7241.
The fixes are in as of https://github.com/freedomofpress/securedrop/issues/7241#issuecomment-2398211481. Two cheers for putting rarely-exercised code paths in CI! Back to you, @legoktm.
I wrestled with this some more today and found another problem with how the firefox_web_driver fixture was parameterized, which I've refactored in 7900e21b6326e6b86cb0ee145a15bed7f9fb67ed. Back to you for real, @legoktm.
When I download screenshots-de_DE from https://github.com/freedomofpress/securedrop/actions/runs/11300734349, I see three subfolders, de-DE, de_DE, and en-US. So somewhere the dash is being normalized differently?
And...the de screenshots are still in English :/
The good news is that the screenshots are being captured correctly. The bad news is that the tests themselves still aren't (and haven't been) parameterized fully with the intended locale. I'm looking into it.
I found a couple more fundamental parameterization problems yesterday and today, for which I've just force-pushed fixes. I'm going to monitor translation-tests for failing string checks before this is ready for another review.
I'd be happy to approve parts of this in separate PRs if that would be easier for you. e.g. the saving as artifacts part is totally fine and good to go, same with some of the other intermediate fixes.
Thanks, @legoktm. As of 6c9917c771187bf9ac4c08dc46df35d367245986 I've now got this sorted for the Journalist Interface in Firefox. Tomorrow I should be able to fix up the Source Interface in Tor Browser the same way. If not, I'll split it between the two interfaces.
Ready here for the Journalist Interface. The Source Interface I've deferred to #7354.