Skip to content

Commit

Permalink
fix(#8385): Adds login's images to service worker's cache (#8388)
Browse files Browse the repository at this point in the history
  • Loading branch information
latin-panda authored Jul 12, 2023
1 parent 1d19531 commit 47c72bb
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions api/src/generate-service-worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ const writeServiceWorkerFile = async () => {
path.join(webappDirectoryPath, 'fonts', 'NotoSans-Bold.ttf'),
path.join(webappDirectoryPath, 'fonts', 'NotoSans-Regular.ttf'),
path.join(staticDirectoryPath, 'login', '*.{css,js}'),
path.join(staticDirectoryPath, 'login', 'images', '*.svg'),
],
dynamicUrlToDependencies: {
'/': [path.join(webappDirectoryPath, 'index.html')], // Webapp's entry point
Expand Down
2 changes: 2 additions & 0 deletions api/tests/mocha/generate-service-worker.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ describe('generate service worker', () => {
'/absolute/path/to/build/static/webapp/fonts/NotoSans-Bold.ttf',
'/absolute/path/to/build/static/webapp/fonts/NotoSans-Regular.ttf',
'/absolute/path/to/build/static/login/*.{css,js}',
'/absolute/path/to/build/static/login/images/*.svg',
'/extension-libs',
'/extension-libs/bar.js',
],
Expand Down Expand Up @@ -197,6 +198,7 @@ describe('generate service worker', () => {
'/absolute/path/to/build/static/webapp/fonts/NotoSans-Bold.ttf',
'/absolute/path/to/build/static/webapp/fonts/NotoSans-Regular.ttf',
'/absolute/path/to/build/static/login/*.{css,js}',
'/absolute/path/to/build/static/login/images/*.svg',
'/extension-libs',
],
dynamicUrlToDependencies: {
Expand Down
2 changes: 2 additions & 0 deletions tests/e2e/default/service-worker/service-worker.wdio-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@ describe('Service worker cache', () => {
'/login/lib-bowser.js',
'/login/script.js',
'/login/style.css',
'/login/images/hide-password.svg',
'/login/images/show-password.svg',
'/main.js',
'/manifest.json',
'/medic/_design/medic/_rewrite/',
Expand Down

0 comments on commit 47c72bb

Please sign in to comment.