@@ -38,8 +38,14 @@ public struct Issue: Sendable {
38
38
/// confirmed too few or too many times.
39
39
indirect case confirmationMiscounted( actual: Int , expected: any RangeExpression & Sendable )
40
40
41
+ /// An issue due to a polling confirmation having failed.
42
+ ///
43
+ /// This issue can occur when calling ``confirmation(_:until:within:pollingEvery:isolation:sourceLocation:_:)-455gr``
44
+ /// or
45
+ /// ``confirmation(_:until:within:pollingEvery:isolation:sourceLocation:_:)-5tnlk``
46
+ /// whenever the polling fails, as described in ``PollingStopCondition``.
41
47
@_spi ( Experimental)
42
- case confirmationPollingFailed
48
+ case pollingConfirmationFailed
43
49
44
50
/// An issue due to an `Error` being thrown by a test function and caught by
45
51
/// the testing library.
@@ -289,8 +295,8 @@ extension Issue.Kind: CustomStringConvertible {
289
295
}
290
296
}
291
297
return " Confirmation was confirmed \( actual. counting ( " time " ) ) , but expected to be confirmed \( String ( describingForTest: expected) ) time(s) "
292
- case . confirmationPollingFailed :
293
- return " Confirmation polling failed"
298
+ case . pollingConfirmationFailed :
299
+ return " Polling confirmation failed"
294
300
case let . errorCaught( error) :
295
301
return " Caught error: \( error) "
296
302
case let . timeLimitExceeded( timeLimitComponents: timeLimitComponents) :
@@ -427,6 +433,15 @@ extension Issue.Kind {
427
433
/// too few or too many times.
428
434
indirect case confirmationMiscounted( actual: Int , expected: Int )
429
435
436
+ /// An issue due to a polling confirmation having failed.
437
+ ///
438
+ /// This issue can occur when calling ``confirmation(_:until:within:pollingEvery:isolation:sourceLocation:_:)-455gr``
439
+ /// or
440
+ /// ``confirmation(_:until:within:pollingEvery:isolation:sourceLocation:_:)-5tnlk``
441
+ /// whenever the polling fails, as described in ``PollingStopCondition``.
442
+ @_spi ( Experimental)
443
+ case pollingConfirmationFailed
444
+
430
445
/// An issue due to an `Error` being thrown by a test function and caught by
431
446
/// the testing library.
432
447
///
@@ -470,8 +485,8 @@ extension Issue.Kind {
470
485
. expectationFailed( Expectation . Snapshot ( snapshotting: expectation) )
471
486
case . confirmationMiscounted:
472
487
. unconditional
473
- case . confirmationPollingFailed :
474
- . unconditional
488
+ case . pollingConfirmationFailed :
489
+ . pollingConfirmationFailed
475
490
case let . errorCaught( error) , let . valueAttachmentFailed( error) :
476
491
. errorCaught( ErrorSnapshot ( snapshotting: error) )
477
492
case let . timeLimitExceeded( timeLimitComponents: timeLimitComponents) :
@@ -490,6 +505,7 @@ extension Issue.Kind {
490
505
case unconditional
491
506
case expectationFailed
492
507
case confirmationMiscounted
508
+ case pollingConfirmationFailed
493
509
case errorCaught
494
510
case timeLimitExceeded
495
511
case knownIssueNotRecorded
@@ -562,6 +578,8 @@ extension Issue.Kind {
562
578
forKey: . confirmationMiscounted)
563
579
try confirmationMiscountedContainer. encode ( actual, forKey: . actual)
564
580
try confirmationMiscountedContainer. encode ( expected, forKey: . expected)
581
+ case . pollingConfirmationFailed:
582
+ try container. encode ( true , forKey: . pollingConfirmationFailed)
565
583
case let . errorCaught( error) :
566
584
var errorCaughtContainer = container. nestedContainer ( keyedBy: _CodingKeys. _ErrorCaughtKeys. self, forKey: . errorCaught)
567
585
try errorCaughtContainer. encode ( error, forKey: . error)
@@ -617,6 +635,8 @@ extension Issue.Kind.Snapshot: CustomStringConvertible {
617
635
}
618
636
case let . confirmationMiscounted( actual: actual, expected: expected) :
619
637
" Confirmation was confirmed \( actual. counting ( " time " ) ) , but expected to be confirmed \( expected. counting ( " time " ) ) "
638
+ case . pollingConfirmationFailed:
639
+ " Polling confirmation failed "
620
640
case let . errorCaught( error) :
621
641
" Caught error: \( error) "
622
642
case let . timeLimitExceeded( timeLimitComponents: timeLimitComponents) :
0 commit comments