-
Notifications
You must be signed in to change notification settings - Fork 686
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
ci(translation): save screenshots as workflow artifacts #7240
Conversation
3fe8933
to
e844085
Compare
be676ea
to
9191b91
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See inline comment.
I retriggered CI so there are artifacts that can be downloaded from https://github.com/freedomofpress/securedrop/actions/runs/11190459190 - but when I looked at some of the el
and de_DE
screenshots, they were all in English. (Or did I just happen to look at the wrong screenshots?)
6d4712a
to
7edff79
Compare
The fixes are in as of #7241 (comment). Two cheers for putting rarely-exercised code paths in CI! Back to you, @legoktm. |
0cdda11
to
7900e21
Compare
When I download And...the de screenshots are still in English :/ |
Only languages listed in "i18n.json" are reported by "make supported-languages", included in the CI matrix, and usable as $LANG in "LOCALES=$LANG make test".
This is about 4 MB × n languages, currently < 100 MB per run.
…s sent in the "Accept-Languages" header
7900e21
to
3b349ff
Compare
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. |
Otherwise they provide only the default SUPPORTED_LOCALES = [FALLBACK_LOCALE] = ["en_US"].
Otherwise the fixture isn't set up to request the language expected by the tests that use it.
3b349ff
to
4aebc91
Compare
I found a couple more fundamental parameterization problems yesterday and today, for which I've just force-pushed fixes. I'm going to monitor |
…driver fixture That is, instead of receiving a "locale" fixture directly, tests that use the "firefox_web_driver" fixture are now parameterized indirectly, via the firefox_web_driver.locale attribute received from the parameterized fixture.
0d31f8c
to
550e0f3
Compare
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. |
…ptions rather than FirefoxProfile <https://stackoverflow.com/a/71766991> claims that FirefoxProfile is in fact deprecated as of Selenium 4. I can't find any obvious evidence of that, but it works.
And run all Journalist Interface page-layout tests in Firefox.
550e0f3
to
6c9917c
Compare
Ready here for the Journalist Interface. The Source Interface I've deferred to #7354. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, JI side looks good; thanks!
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-test
generates them no matter what, so we might as well make them inspectable.develop
.Fixes #7241 by correcting the parameterization of tests and fixtures for page-layout tests. See individual commits for details.
Testing
screenshotsJournalist Interface screenshots are correct.Accept-Languages
header in the page-layout tests #7354.24 hours is a reasonable retention period for 100 MB of screenshots per run.Deployment
CI-only; no deployment considerations.