purebred-mua / purebred

A terminal based mail user agent based on notmuch
GNU Affero General Public License v3.0
139 stars 19 forks source link

Change condition to assert the focus has changed #386

Closed romanofski closed 4 years ago

romanofski commented 4 years ago

This test used an ambiguous condition to determine whether the editor for a header field has closed and the focus switched back to the list of attachments. Most times this didn't cause any problems. However sometimes, this caused the test to fail with the editor still open, since the condition was already met.

This swaps the two conditions around: first assert that the focus has changed to the attachment list. Then assert that the field has the additional text entered.

Fixes https://github.com/purebred-mua/purebred/issues/383

romanofski commented 4 years ago

Lets see whether I'm lucky with this one or not ...