diff --git a/public/touch-gestures.js b/public/touch-gestures.js index 96d0b3e6..a61ad64f 100644 --- a/public/touch-gestures.js +++ b/public/touch-gestures.js @@ -157,11 +157,11 @@ o.setAttribute('role', 'group'); o.setAttribute('aria-label', 'Row actions'); var hash = row.getAttribute('data-hash') || row.getAttribute('data-id') || ''; + var hashAttr = ' data-hash="' + String(hash).replace(/"/g, '"') + '"'; o.innerHTML = - '' + - '' + - ''; + '' + + '' + + ''; document.body.appendChild(o); rowOverlay = o; return o; diff --git a/test-touch-gestures-coverage-e2e.js b/test-touch-gestures-coverage-e2e.js index c36a01e3..763d8660 100644 --- a/test-touch-gestures-coverage-e2e.js +++ b/test-touch-gestures-coverage-e2e.js @@ -208,14 +208,12 @@ async function main() { if (!overlayPresent) { fail('(cov1) precondition — overlay did not appear after left swipe'); } else { - await page.evaluate((h) => { + await page.evaluate(() => { + // Production stamps data-hash on trace/filter/copy buttons natively + // (issue #1305). Just click — no test-side workaround needed. const btn = document.querySelector('.row-action-overlay [data-row-action="trace"]'); - // Production only sets data-hash on the copy button; for the - // trace/filter branch in onClickAction to navigate, the button - // must carry data-hash. Stamp it here from the row's hash so - // the coverage test exercises the real navigation path. - if (btn) { btn.setAttribute('data-hash', h); btn.click(); } - }, r.hash); + if (btn) { btn.click(); } + }); await page.waitForTimeout(120); const state = await page.evaluate(() => ({ hash: location.hash, @@ -241,13 +239,11 @@ async function main() { if (!ok) { fail('(cov2) precondition — filter button not in overlay'); } else { - await page.evaluate((h) => { + await page.evaluate(() => { + // Production stamps data-hash on filter button natively (#1305). const btn = document.querySelector('.row-action-overlay [data-row-action="filter"]'); - // Same as cov1: production stamps data-hash only on the copy - // button. Stamp it on filter here so onClickAction's hash - // guard passes and we exercise the real navigation branch. - if (btn) { btn.setAttribute('data-hash', h); btn.click(); } - }, r2.hash); + if (btn) { btn.click(); } + }); await page.waitForTimeout(120); const state = await page.evaluate(() => ({ hash: location.hash,