Skip to content

retry() method set retries globally, not only for currently executed step #1891

@grzegorzprzybylo

Description

@grzegorzprzybylo

I see that retry() option is set globally, not only for current step.

code:

  I.amOnPage("https://www.google.com");
  I.retry(6).see("Google");
  I.waitForText("Not found", 5);

and form above, I expect, that: I.waitForText("Not found", 5); will run only once, but this is what I see (run with --verbose flag):

    Emitted | step.start (I see "Google")
    I see "Google"
    Emitted | step.passed (I see "Google")
    Emitted | step.finish (I see "Google")
    Emitted | step.start (I wait for text "Not found", 5)
    I wait for text "Not found", 5
    [1] Retrying... Attempt #2
    [1] Retrying... Attempt #3
    [1] Retrying... Attempt #4
    [1] Retrying... Attempt #5
    [1] Retrying... Attempt #6
^C%  

is this behavior expected?

Details

  • CodeceptJS version: 2.3.1
  • NodeJS Version: 10.16.3
  • Operating System: macOS
  • Puppeteer 1.19.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions