cypress-plugin-grep-boxes 1.0.2 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.prettierrc +5 -0
- package/index.js +10 -3
- package/package.json +1 -1
package/.prettierrc
ADDED
package/index.js
CHANGED
|
@@ -306,10 +306,17 @@ if (
|
|
|
306
306
|
// if the grep test toggle is checked, do not show checkboxes on each runnable
|
|
307
307
|
window.top?.document.querySelectorAll('#grepTestToggle:checked').length === 0
|
|
308
308
|
) {
|
|
309
|
-
|
|
309
|
+
// watching for changes to DOM structure
|
|
310
|
+
MutationObserver = window.MutationObserver;
|
|
311
|
+
|
|
312
|
+
var observer = new MutationObserver(function () {
|
|
313
|
+
// fired when a mutation occurs
|
|
310
314
|
addGrepButtons();
|
|
311
315
|
});
|
|
312
|
-
|
|
313
|
-
|
|
316
|
+
|
|
317
|
+
// defining the window.top?.document to be observed by the observer
|
|
318
|
+
observer.observe(window.top?.document, {
|
|
319
|
+
subtree: true,
|
|
320
|
+
attributes: true,
|
|
314
321
|
});
|
|
315
322
|
}
|