@@ -557,8 +557,11 @@ internal void ConnectToBank()
557557 internal void SignOnToBank ( )
558558 {
559559 this . WriteLine ( " - SignOnToBank" ) ;
560- this . ofxServerWindow . UserName = this . passwordDialog . UserName = "test" ;
561- this . ofxServerWindow . Password = this . passwordDialog . Password = "1234" ;
560+ this . passwordDialog . UserName = "test" ;
561+ this . passwordDialog . Password = "1234" ;
562+ // this brings the ofx dialog to the front.
563+ this . ofxServerWindow . UserName = "test" ;
564+ this . ofxServerWindow . Password = "1234" ;
562565
563566 bool mfa = false ;
564567 if ( this . random . Next ( 0 , 2 ) == 0 )
@@ -1070,6 +1073,8 @@ private void SelectAccount()
10701073 }
10711074 this . ClearTransactionViewState ( ) ;
10721075 this . dataChangedSinceExport = true ;
1076+ this . selectedCurrency = null ;
1077+ this . editedCurrency = null ;
10731078 }
10741079 #endregion
10751080
@@ -1258,6 +1263,7 @@ private void EnsureSelectedTransaction()
12581263 {
12591264 throw new Exception ( "Cannot find any transaction to select!" ) ;
12601265 }
1266+ this . transactions . ScrollSelectionIntoView ( ) ;
12611267 }
12621268 }
12631269
@@ -1632,12 +1638,15 @@ private bool HasSelectedTransaction
16321638
16331639 private void SearchTransactionView ( )
16341640 {
1641+ this . transactions = this . window . FindTransactionGrid ( ) ;
16351642 if ( this . transactions != null && this . transactions . CountNoPlaceholder > 5 )
16361643 {
16371644 this . EnsureSelectedTransaction ( ) ;
16381645
16391646 this . WriteLine ( "- SearchTransactionView" ) ;
1640- var row1 = this . transactions . WaitForSelection ( ) ;
1647+ var row1 = this . transactions . WaitForSelection ( ) ;
1648+ Assert . That ( row1 , Is . Not . Null , "Selection not found after trying to set a selection?" ) ;
1649+
16411650 var t = this . transactions . GetSelectedTransactionProxy ( ) ;
16421651 var search = "\" " + t . Date . ToShortDateString ( ) + "\" and " + t . Amount ;
16431652
@@ -1648,35 +1657,30 @@ private void SearchTransactionView()
16481657
16491658 // Make sure selection is preserved on the matching transaction
16501659 var row2 = this . transactions . WaitForSelection ( ) ;
1651- Assert . That ( row2 , Is . Not . Null , "Selection not found after setting search filter" ) ;
1660+ if ( row2 == null )
1661+ {
1662+ // WTF?
1663+ Assert . That ( row2 , Is . Not . Null , "Selection not found after setting search filter" ) ;
1664+ }
16521665 Assert . That ( row2 . Id , Is . EqualTo ( row1 . Id ) , $ "Expected election automation id { row1 . Id } doesn't match { row2 . Id } ") ;
16531666
16541667 var t2 = this . transactions . GetSelectedTransactionProxy ( ) ;
1655- Assert . Multiple ( ( ) =>
1656- {
1657- Assert . That ( t2 . Date , Is . EqualTo ( t . Date ) , "Dates don't match" ) ;
1658- Assert . That ( t2 . Amount , Is . EqualTo ( t . Amount ) , "Amounts don't match" ) ;
1659- } ) ;
1660-
1668+ Assert . That ( t2 . Date , Is . EqualTo ( t . Date ) , "Dates don't match" ) ;
1669+ Assert . That ( t2 . Amount , Is . EqualTo ( t . Amount ) , "Amounts don't match" ) ;
1670+
16611671 // don't leave Money with active search filter as it makes the rest of the
16621672 // editing logic very complicated.
16631673 quickFilter . ClearSearch ( ) ;
16641674 Thread . Sleep ( 500 ) ;
16651675
16661676 // Make sure selection is preserved after search is cleared.
16671677 var row3 = this . transactions . WaitForSelection ( ) ;
1668- Assert . Multiple ( ( ) =>
1669- {
1670- Assert . That ( row3 , Is . Not . Null , "Selection not restored after clearing search filter" ) ;
1671- Assert . That ( row3 . Id , Is . EqualTo ( row1 . Id ) , $ "Expected election automation id { row1 . Id } doesn't match { row3 . Id } ") ;
1672- } ) ;
1673-
1678+ Assert . That ( row3 , Is . Not . Null , "Selection not restored after clearing search filter" ) ;
1679+ Assert . That ( row3 . Id , Is . EqualTo ( row1 . Id ) , $ "Expected election automation id { row1 . Id } doesn't match { row3 . Id } ") ;
1680+
16741681 var t3 = this . transactions . GetSelectedTransactionProxy ( ) ;
1675- Assert . Multiple ( ( ) =>
1676- {
1677- Assert . That ( t3 . Date , Is . EqualTo ( t . Date ) , "Dates don't match" ) ;
1678- Assert . That ( t3 . Amount , Is . EqualTo ( t . Amount ) , "Amounts don't match" ) ;
1679- } ) ;
1682+ Assert . That ( t3 . Date , Is . EqualTo ( t . Date ) , "Dates don't match" ) ;
1683+ Assert . That ( t3 . Amount , Is . EqualTo ( t . Amount ) , "Amounts don't match" ) ;
16801684 }
16811685 }
16821686
0 commit comments