When I wait max of number minutes

This step waits up to a maximum number of minutes for the page to settle, returning as soon as the page becomes idle. It behaves identically to the compact wait N minutes step but uses the phrase "max of" to communicate explicitly that the number is an upper bound - the step will return before the budget is used if the page settles sooner. The smart-settle probe checks that the DOM is ready, network requests are complete, no pending timers remain, and DOM mutations have been quiet for at least 250 ms.

The "max of" wording is useful when documenting slow operations such as bulk imports, media processing, or report generation: it signals to readers that the test is not sleeping for the full duration. The number may be followed by minute, minutes, or the shorthand m. Both I and we pronouns are accepted, and the pronoun may be omitted when chaining with And.

Accepted phrasings

When I wait max of 1 minute
When I wait max of 10 minutes
When we wait max of 1m
And wait max of 2m
And wait max of 2 minutes
When we wait max of 1 minute

Examples

When I wait max of 1 minute
When I wait max of 10 minutes
When we wait max of 1m
And wait max of 2 minutes

In a real scenario

Scenario: User uploads a large file and waits for processing to complete
  Given I am logged in as "editor"
  When I go to "/media/add"
    And I wait until the page is loaded
    And I attach "large-video.mp4" to "File"
    And I press "Upload"
    And I wait max of 3 minutes
  Then I should see "File saved"
    And I should see "large-video.mp4"

Related steps

Back to Wait Steps