Skip to content

Commit

Permalink
Fix intermittend failing test
Browse files Browse the repository at this point in the history
This test was failing now and then and the hypothesis causing the
failure is the thread traversing the spine of the list of threads. This
thread most likely evaluates the length of the displayed threads very
quickly. In fact there is only one thread to display, so the length is
most likely returned so quick, that the UI has not been repainted.

Last screen captures from tmux still show the last entry selected, even
though the entry itself is gone.

This patch asserts on the inverse that, the entry (the screen shot
attachment) is gone from the screen. This should be enough to basically
assert that the UI has been repainted.

Fixes #327
  • Loading branch information
romanofski committed Nov 22, 2019
1 parent 7153437 commit 6719b09
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/TestUserAcceptance.hs
Original file line number Diff line number Diff line change
Expand Up @@ -708,7 +708,7 @@ testAddAttachments = purebredTmuxSession "use file browser to add attachments" $
sendKeys "Down" (Substring "Item 2 of 2")

step "remove the attachment"
sendKeys "D" (Substring "Item 1 of 1")
sendKeys "D" (Not (Substring "screenshot.png"))

step "try to remove the last attachment"
sendKeys "D" (Substring "You may not remove the only attachment")
Expand Down

0 comments on commit 6719b09

Please sign in to comment.