test: exercise native clear action through layer transaction

This commit is contained in:
Sameh Khamis committed 2026-09-12 22:38:04 -07:00
1 parent 648041e040
commit 4d764a82db
2 files changed
+15 -1

No files matched your search

+14
View File
@@ -82,6 +82,20 @@ try {
'feed state reflects the settled layer snapshot',
row().querySelector('.data-toggle-btn').dataset.feedState === 'stale',
]);
const ui = window.__godsEyeView.styleManager;
ui._clearSelectedLayersBtn.click();
result.push([
'native clear activation presents busy state',
ui._clearSelectedLayersBtn.getAttribute('aria-busy') === 'true' &&
!!ui._clearSelectedLayersPromise,
]);
await ui._clearSelectedLayersPromise;
result.push([
'clear settles through the existing layer transaction',
!manager.isEnabled(id) &&
ui._clearSelectedLayersBtn.getAttribute('aria-busy') === 'false',
]);
await manager.setEnabled(id, true);
const final = row().querySelector('.data-toggle-btn');
manager._layerPanel.destroy();
final.click();