Skip to content

[Docs] Provide a description how to correctly use expect.configure with poll parameter #23622

Closed

Description

Hi team!
I see that the method expect.configure supports poll parameter.
I assume that I can create an alias for expect.poll command and write this:

export const pollExpect = expect.configure({
  poll: {
    timeout: 10_000,
  },
});

And in my test I use it like:

pollExpect(this.page.url()).toContain(urlToCheck);

I don't see any retries for the expect command in UI mode and I didn't use await keyword before pollExpect (it's not required) so I'm not sure that I understood it in a right way and it works OK.

Is it possible at all to do what I wanted?
Could you please update the docs and add an example if it is.

An example here is also appreciated :) Thanks for the awesome product!

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

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