summaryrefslogtreecommitdiff
path: root/web/js/tests
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-05-09 20:23:06 +0300
committerPaul Buetow <paul@buetow.org>2026-05-09 20:23:06 +0300
commit2acb23a01a9382452ec82396f87e2e76c49fca14 (patch)
treed38e506d18bd0b5cca2c83ea868a6942ba8f3d3e /web/js/tests
parent02b7027ad83c1d27765f2e78dcedc2eb4df00b34 (diff)
s1 keep scan indicator above admin modal
Diffstat (limited to 'web/js/tests')
-rw-r--r--web/js/tests/admin-rescan.test.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/web/js/tests/admin-rescan.test.js b/web/js/tests/admin-rescan.test.js
index d1f2b20..2ce5f1b 100644
--- a/web/js/tests/admin-rescan.test.js
+++ b/web/js/tests/admin-rescan.test.js
@@ -127,6 +127,16 @@ function testScanIndicatorOutsideHeader() {
assert(afterHeader.includes('id="scan-indicator"'), 'scan indicator should remain in the document after the header');
}
+function testScanIndicatorAboveModalOverlay() {
+ const css = readFileSync(new URL('../../css/layout.css', import.meta.url), 'utf8');
+ const scanRule = css.match(/\.scan-indicator\s*\{[^}]*z-index:\s*(\d+)/);
+ const modalRule = css.match(/\.modal-overlay\s*\{[^}]*z-index:\s*(\d+)/);
+
+ assert(scanRule, 'scan indicator should define a z-index');
+ assert(modalRule, 'modal overlay should define a z-index');
+ assert(Number(scanRule?.[1]) > Number(modalRule?.[1]), 'scan indicator should render above open admin modal overlay');
+}
+
async function testTriggerRescanRefreshesProgress() {
requests.length = 0;
rescanStatus = 200;
@@ -154,6 +164,7 @@ testKeyboardRescanHandler();
testRenderRunningProgress();
testRenderIdleProgressHidesIndicator();
testScanIndicatorOutsideHeader();
+testScanIndicatorAboveModalOverlay();
await testTriggerRescanRefreshesProgress();
await testTriggerRescanErrorDoesNotPollProgress();