@skyramp/skyramp 1.3.21 → 1.3.23
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/package.json
CHANGED
|
@@ -853,6 +853,21 @@ class SkyrampPlaywrightPage {
|
|
|
853
853
|
return Promise.resolve();
|
|
854
854
|
});
|
|
855
855
|
|
|
856
|
+
// Enable filechooser interception upfront. Without this, generated tests
|
|
857
|
+
// that use page.waitForEvent('filechooser') register the listener inline
|
|
858
|
+
// right before the triggering click, which races with native dialog
|
|
859
|
+
// rendering on macOS headed runs and leaves the OS file picker visible
|
|
860
|
+
// until dismissed manually. Registering an empty listener here means
|
|
861
|
+
// the browser is told "intercept filechoosers" before any click fires,
|
|
862
|
+
// so the native dialog never paints. The test's own waitForEvent and
|
|
863
|
+
// setFiles path still runs unchanged; this listener does not consume
|
|
864
|
+
// the FileChooser object. Guarded with a per-page flag so re-wrapping
|
|
865
|
+
// the same page does not register duplicates.
|
|
866
|
+
if (!this._page.__skyrampFileChooserInstalled) {
|
|
867
|
+
this._page.__skyrampFileChooserInstalled = true;
|
|
868
|
+
this._page.on('filechooser', () => {});
|
|
869
|
+
}
|
|
870
|
+
|
|
856
871
|
return new Proxy(this, {
|
|
857
872
|
// The `get` trap is the key to forwarding.
|
|
858
873
|
// This will foraward any methods not implemented in this struct
|