koudaiii / learn-microsoft-com-update-checker

Chrome extension to check and display the latest update date from the English version of Microsoft Learn pages when viewing the current language version.
https://chromewebstore.google.com/detail/learnmicrosoftcom-update/addjjinolilbffnlnfbaglljhngjminl
MIT License
1 stars 1 forks source link

Add test about should not run script on en-us pages on some theme #17

Closed koudaiii closed 1 month ago

koudaiii commented 1 month ago

Why & What

Add test about should not run script on en-us pages on some theme

koudaiii commented 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 (10.885 s)
  JP Learn Microsoft.com Update Checker E2E Test
    ✓ should display English update date on Japanese Microsoft Learn page (2277 ms)
    ✓ should display light theme when button[data-theme-to]=light and button[aria-pressed]=true (241 ms)
    ✓ should display dark theme when button[data-theme-to]=dark and button[aria-pressed]=true (207 ms)
    ✓ should display high-contrast theme when button[data-theme-to]=high-contrast and button[aria-pressed]=true (199 ms)
    ✓ should not run script on non-ja-jp pages (550 ms)
    ✓ should not run script on en-us pages on light theme (188 ms)
    ✓ should not run script on en-us pages on dark theme (211 ms)
    ✓ should not run script on en-us pages on high-contrast theme (181 ms)
    ✓ should run script with jp-learn-microsoft-com-update-checker-debug flag (203 ms)

Test Suites: 1 passed, 1 total
Tests:       9 passed, 9 total
Snapshots:   0 total
Time:        11.011 s, estimated 12 s
Ran all test suites matching /tests\/e2e/i.

👌