@@ -254,7 +254,6 @@ codeunit 134703 "Email Retry Test"
254254 TestClientTypeSubscriber: Codeunit "Test Client Type Subscriber";
255255 EmailOutboxPage: Page "Email Outbox";
256256 EmailOutboxTestPage: TestPage "Email Outbox";
257- ScheduledDateTime: DateTime ;
258257 begin
259258 // [Scenario] When sending an email on the background and then fails, the email should be scheduled for retry
260259 // [Given] An email message and an email account are created
@@ -277,7 +276,6 @@ codeunit 134703 "Email Retry Test"
277276 EmailOutbox. SetRange( "Message Id", EmailMessage. GetId()) ;
278277 EmailOutbox. FindFirst() ;
279278 Codeunit . Run( Codeunit ::"Email Dispatcher", EmailOutbox) ;
280- ScheduledDateTime := CurrentDateTime() ;
281279
282280 // [THEN] The email outbox entry is updated with the error message and status
283281 EmailRetry. SetRange( "Account Id", TempAccount. "Account Id") ;
@@ -287,12 +285,7 @@ codeunit 134703 "Email Retry Test"
287285 Assert. AreEqual( Enum ::"Email Status"::Failed. AsInteger() , EmailRetry. Status. AsInteger() , ' Wrong status' ) ;
288286 Assert. AreEqual( ' Failed to send email' , EmailRetry. "Error Message", ' Wrong error message' ) ;
289287 Assert. AreEqual( 1 , EmailRetry. "Retry No.", ' The retry number should be 1' ) ;
290- Assert. AreEqual( 2 , EmailRetry. Count () , ' There are two entries in the Email Retry table' ) ;
291-
292- EmailRetry. Next() ;
293- Assert. AreEqual( Enum ::"Email Status"::Queued. AsInteger() , EmailRetry. Status. AsInteger() , ' Wrong status' ) ;
294- Assert. AreEqual( 2 , EmailRetry. "Retry No.", ' The retry number should be 2' ) ;
295- Assert. IsTrue( EmailRetry. "Date Sending" > ScheduledDateTime, ' The Date Queued should be later than now' ) ;
288+ Assert. AreEqual( 1 , EmailRetry. Count () , ' There are two entries in the Email Retry table' ) ;
296289
297290 // [When] The Email Outbox page is opened and the retry detail is shown
298291 EmailOutboxTestPage. Trap() ;
@@ -622,12 +615,6 @@ codeunit 134703 "Email Retry Test"
622615 Assert. IsTrue( EmailRetryDetailPage. ShowError. Enabled() , ' The Show Error action should be enabled' ) ;
623616 Assert. IsTrue( EmailRetryDetailPage. ShowErrorCallStack. Enabled() , ' The Show Error Call Stack action should be enabled' ) ;
624617
625- Assert. IsTrue( EmailRetryDetailPage. Next() , ' The second Email Retry Detail should be shown' ) ;
626- Assert. AreEqual( Enum ::"Email Status"::Queued. AsInteger() , EmailRetryDetailPage. Status. AsInteger() , ' Wrong status' ) ;
627- Assert. AreEqual( 2 , EmailRetryDetailPage. "Retry No.". AsInteger() , ' The retry number should be 2' ) ;
628- Assert. IsFalse( EmailRetryDetailPage. ShowError. Enabled() , ' The Show Error action should be disabled' ) ;
629- Assert. IsFalse( EmailRetryDetailPage. ShowErrorCallStack. Enabled() , ' The Show Error Call Stack action should be disabled' ) ;
630-
631618 Assert. IsFalse( EmailRetryDetailPage. Next() , ' There should be no more Email Retry Details' ) ;
632619 end ;
633620}
0 commit comments