test: open a menu from whatever state the menubar was left in - #311
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A click on the title of the menu that is already open closes it. Clicking a different title switches, so this only bites when the same menu is asked for twice, which is exactly what
language.spec.jsdoes: it clicks.menubar__title--viewand waits for the Language item. If the View menu was already up, that click shuts it and the check waits out its whole timeout for an item one click away. On CI run 34678765064 it did wait it out, thirty seconds, with both of the app's beats regular throughout.openMenuine2e/lib/menu.jscloses whatever is open before it clicks, so the answer no longer depends on what the check before it left behind.runFromMenugoes through it too.Said plainly: this is a hazard removed, not a cause proved. Nothing in the archived log says the View menu was open at that moment, and nothing can, because the menubar's state is not written down anywhere. What can be said is that this is the only way that failure can be produced from outside the app, and it is gone.
Changes
openMenucloses an open menu before clicking a title, andrunFromMenuuses it.openLanguageopens the View menu throughopenMenu.How to verify by using the app
Open the Timing menu, then click Timing again: it closes, which is what it should do. Nothing in the app changes here.
Verified on Linux. Full gate green, 87 spec files and 515 tests in 5:48, verdict line GATE GREEN. Proved by a mutation in the build: without the close, that one check goes red and the other four in the file stay green. The first version of the check used two different menus and the mutation left it green, which is how I learned that a different title switches rather than toggles; the check names the same menu twice now.