Closed koudaiii closed 1 month ago
$ npm run test:e2e
> jp-learn-microsoft-com-update-checker@1.2.0 test:e2e
> jest tests/e2e
PASS tests/e2e/content.e2e.test.js (11.944 s)
JP Learn Microsoft.com Update Checker E2E Test
✓ should display English update date on Japanese Microsoft Learn page (1906 ms)
✓ should display English update date on zh-cn Microsoft Learn page (1461 ms)
✓ should display light theme when button[data-theme-to]=light and button[aria-pressed]=true (239 ms)
✓ should display dark theme when button[data-theme-to]=dark and button[aria-pressed]=true (199 ms)
✓ should display high-contrast theme when button[data-theme-to]=high-contrast and button[aria-pressed]=true (196 ms)
✓ should not run script on en-us pages on light theme (368 ms)
✓ should not run script on en-us pages on dark theme (197 ms)
✓ should not run script on en-us pages on high-contrast theme (171 ms)
✓ should run script with jp-learn-microsoft-com-update-checker-debug flag (190 ms)
Test Suites: 1 passed, 1 total
Tests: 9 passed, 9 total
Snapshots: 0 total
Time: 12.044 s, estimated 13 s
Ran all test suites matching /tests\/e2e/i.
👌
This pull request includes changes to the
src/content.js
file to enhance language support by introducing a dictionary for language labels and updating the way update information is displayed based on the current language.Enhancements to language support:
src/content.js
: Added alanguageLabels
dictionary to map language codes to their corresponding language labels.src/content.js
: Modified the update information display logic to use thelanguageLabels
dictionary, ensuring the text is shown in the appropriate language.