-
Notifications
You must be signed in to change notification settings - Fork 6k
feat: add displayLang test #5495
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
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #5495 +/- ##
=======================================
Coverage 72.44% 72.44%
=======================================
Files 30 30
Lines 1673 1673
Branches 366 366
=======================================
Hits 1212 1212
Misses 398 398
Partials 63 63 Continue to review full report at Codecov.
|
c805159
to
3db2390
Compare
This adds a slimmed-down version of the Spanish Language Pack and also adds a `languagepacks.json` to the e2e `workspaceDir` which allows use to run a test suite passing the `--locale es` flags to simulate a different display language.
This tests loading code-server in Spanish using the `--locale` flag.
3db2390
to
4452b71
Compare
test/e2e/extensions/ms-ceintl.vscode-language-pack-es-1.70.0/package.json
Show resolved
Hide resolved
test/e2e/extensions/ms-ceintl.vscode-language-pack-es-1.70.0/translations/main.i18n.json
Show resolved
Hide resolved
test/e2e/extensions/ms-ceintl.vscode-language-pack-es-1.70.0/package.json
Show resolved
Hide resolved
Good call. I'll double-check that and/or explore starting from scratch. I'm going to move this back to draft and address changes. |
This PR adds an e2e test to ensure our language patch is working as expected.
7b3af0074186a31b540173c75758b033.webm
NOTE to self: won't pass with dev builds because lang. patch only works with prod builds. Might need to conditionally run this test.
Notes
When you install a language pack, two things happen:
--extensions-dir
(expected, same as other extensions)languagepacks.json
to~/.local/share/code-server
(see example gist)That means in order for this test to pass consistently (without relying on a network connection), we need to add both of those things in global setup or in the test setup.
To test locally and just this test, I run this command:
Fixes #5367