Serenity/JS 3.0 - Test fails immediately and does not await `Wait` timeout if `Text` of a `PageElement` in a `List` can't be retrieved
See original GitHub issueBased on this test I wrote the following one.
It will fail with the LogicError: Can't retrieve the first item from a list with 0 items: [ ] (as expected).
But it fails immediately, not as expected, after the Wait timeout, in this case 30 seconds:
it(`waits for x seconds if the text of an element is not present before fail`, () =>
actorCalled('Peggy').attemptsTo(
Wait.upTo(Duration.ofSeconds(30)).until(
Text.of(
parents()
.where(Text.ofAll(children()), contain('tea'))
.where(Text.ofAll(children()), contain('coffee'))
.where(Text.ofAll(children()), contain('juice'))
// there's no parent container with all the three items
.first()
), includes('tea')
))
);
In my case, there are lists, I have to wait until some list get the expected content. As workaround I would have to work with explicit fixed wait timeouts, what is not very convenient.
see https://serenityjs-serenityjs-adtizt5mmv3.ws-eu71.gitpod.io/
Issue Analytics
- State:
- Created a year ago
- Comments:20 (9 by maintainers)
Top Results From Across the Web
Report generation warnings Timeout exception #685 - GitHub
Hi, I am using CLI serenity-cli-2.3.31 . For some of my plans the tests takes a long time almost 4-5 hours. While writing...
Read more >serenity-js/Contributors - Gitter
Hey Rodrigo! That's great news ☺️ It depends on the scope of the changes you're making; you can run tests of a specific...
Read more >serenity js - increase timeout when running against remote grid
To start with, you might want to increase the overall timeout of all the tests (for Protractor 5.0.0 the default value is set...
Read more >The trouble with test scripts | Serenity/JS
*TodoMVC$/); // duplicated code await element(by.css('.new-todo')).sendKeys( ...
Read more >Handling Waits and Asynchronous Pages in Serenity BDD
Implicit Waits are used to ensure that Serenity does not fail a test if a web element is not immediately present on the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Solved with merge of #1355 and release of 3.0.0-rc.34. Thanks, @jan-molak
Yes, thanks. I will try to implement it asap and come back with the PR. 👍