Skip to content

iOS alert activation can tap after the command deadline #2956

Description

@thymikee

Problem

An alert accept/dismiss tap can land after the command's deadline. The last deadline guard runs before the synchronous coordinate tap (RunnerTests+Alert.swift ~131-143 → RunnerTests+Interaction.swift ~527-535). On a slow host the tap is synthesized late: CI job 107674012511 logged the activation point at about 56 s and XCTest's coordinate tap at 82.99 s, then ALERT_DEADLINE_EXCEEDED. The caller is told the command failed while the tap still lands.

The #2843 banner test (testAlertActivationDoesNotWaitOutANotificationBanner) proves XCTest's interruption handling was not consulted (RunnerTests+AlertObservationTests.swift ~124-128). It does not prove the tap landed before the deadline, which is why it failed there.

Required behavior

  • Check the deadline immediately before the event is synthesized, and never tap after it.
  • Keep the post-activation uncertainty response. Never retry an alert tap.
  • Split the test so that "no interruption handling" and "confirmed before the deadline" are asserted separately.

Refs #2491, #2843.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions