Skip to content

Commit ac3d470

Browse files
committed
Eliminate some flakiness when not verifying files save
This test was flaking because before the suite runs a bunch of settings are added which are critical to making the test reliable. Inside the settings part it opens the editor, edits it and saves the file via ctrl/cmd+s. This is all fine, but it doesn't verify anything so the editor may end up closing before ctrl/cmd+s actually gets handled. We disable the modal in smoke tests since it needs to run headlessly, so it's difficult to see that the file never actually saves and a dirty file is closed and discarded. The fix is to verify settings.json actually does save by changing the shared Editors.saveOpenedFile mechanism to ensure the dirty indicator isn't present on the active tab. Fixes microsoft#254893 Part of microsoft#246731
1 parent bc99eae commit ac3d470

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

test/automation/src/editors.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ export class Editors {
1515
} else {
1616
await this.code.sendKeybinding('ctrl+s');
1717
}
18+
await this.code.waitForElements('.tab.active.dirty', false, results => results.length === 0);
1819
}
1920

2021
async selectTab(fileName: string): Promise<void> {

0 commit comments

Comments
 (0)