mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
test: fix flaky macOS dock tests (#50098)
* test: fix flaky mac dock & autofill tests * fix: add null checks for the parent widget before calling IsVisible() * test: remove autofill test change (failing on Linux), keep crash fix * chore: autofill updates from code review
This commit is contained in:
@@ -67,9 +67,11 @@ AutofillPopupView::~AutofillPopupView() {
|
||||
}
|
||||
|
||||
void AutofillPopupView::Show() {
|
||||
if (!popup_)
|
||||
return;
|
||||
bool visible = parent_widget_->IsVisible();
|
||||
visible = visible || view_proxy_;
|
||||
if (!popup_ || !visible || parent_widget_->IsClosed())
|
||||
if (!visible || parent_widget_->IsClosed())
|
||||
return;
|
||||
|
||||
const bool initialize_widget = !GetWidget();
|
||||
|
||||
@@ -1850,15 +1850,13 @@ describe('app module', () => {
|
||||
});
|
||||
|
||||
it('should return a positive number for informational type', () => {
|
||||
const appHasFocus = !!BrowserWindow.getFocusedWindow();
|
||||
if (!appHasFocus) {
|
||||
if (!app.isActive()) {
|
||||
expect(app.dock?.bounce('informational')).to.be.at.least(0);
|
||||
}
|
||||
});
|
||||
|
||||
it('should return a positive number for critical type', () => {
|
||||
const appHasFocus = !!BrowserWindow.getFocusedWindow();
|
||||
if (!appHasFocus) {
|
||||
if (!app.isActive()) {
|
||||
expect(app.dock?.bounce('critical')).to.be.at.least(0);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user