Skip to content

Commit 961c252

Browse files
authored
Merge pull request #1556 from ychin/fix-test-dark-mode-flakiness
Fix MacVim dark mode test being a little flaky
2 parents d4f3eca + fa4f21c commit 961c252

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/MacVim/MacVimTests/MacVimTests.m

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -661,6 +661,7 @@ - (void) testDarkMode {
661661
// Manual Light / Dark mode setting
662662
[self setDefault:MMAppearanceModeSelectionKey toValue:[NSNumber numberWithInt:MMAppearanceModeSelectionLight]];
663663
[app refreshAllAppearances];
664+
[self waitForVimProcess];
664665
XCTAssertEqualObjects(vimView.effectiveAppearance, [NSAppearance appearanceNamed: NSAppearanceNameAqua]);
665666
XCTAssertEqualObjects([[app keyVimController] evaluateVimExpression:@"v:os_appearance"], @"0");
666667

@@ -672,6 +673,7 @@ - (void) testDarkMode {
672673

673674
[self setDefault:MMAppearanceModeSelectionKey toValue:[NSNumber numberWithInt:MMAppearanceModeSelectionDark]];
674675
[app refreshAllAppearances];
676+
[self waitForVimProcess];
675677
XCTAssertEqualObjects(vimView.effectiveAppearance, [NSAppearance appearanceNamed: NSAppearanceNameDarkAqua]);
676678
XCTAssertEqualObjects([[app keyVimController] evaluateVimExpression:@"v:os_appearance"], @"1");
677679
XCTAssertEqualObjects([[app keyVimController] evaluateVimExpression:@"g:os_appearance_changed_called"], @"1");
@@ -682,6 +684,7 @@ - (void) testDarkMode {
682684

683685
[self setDefault:MMAppearanceModeSelectionKey toValue:[NSNumber numberWithInt:MMAppearanceModeSelectionBackgroundOption]];
684686
[app refreshAllAppearances];
687+
[self waitForVimProcess];
685688
XCTAssertEqualObjects(vimView.effectiveAppearance, [NSAppearance appearanceNamed: NSAppearanceNameDarkAqua]);
686689
XCTAssertEqualObjects([[app keyVimController] evaluateVimExpression:@"v:os_appearance"], @"1");
687690
XCTAssertEqualObjects([[app keyVimController] evaluateVimExpression:@"g:os_appearance_changed_called"], @"1"); // we stayed in dark mode, so OSAppearnceChanged didn't trigger

0 commit comments

Comments
 (0)