[Behat] Changed navigation to UDW from Subitems in "Content can be moved to trash from root location" test #1184
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a tricky one, so a longer explanaition is needed 😉
Tests are failing with:
(source: https://travis-ci.com/ezsystems/ezplatform-page-builder/jobs/273793371)
What we know (from the log):
So, there are two Scenarios running in parallel:
Content can be moved to trash from root location
Landing Page can be sent to Trash
(https://github.com/ezsystems/ezplatform-page-builder/blob/c373db91dfa636fcd09d171307e7acd9f765c57c/features/DynamicLandingPage/PageBuilderActions.feature#L87). This one is deleting an item present in Home.These are facts, here comes what I think is happening:


Imagine there are 12 items on subitems list, and the one we're searching for is the eleventh:
It's not present on the first result page, it should be visible on the second one. But if I do following steps:
The result is:

Assuming I don't know that the subitems list has been modified when I was searching for an item (the tests don't know that) the item I'm searching for is not found in all displayed pages (it reality it's displayed in page one).
In this scenario I've decided to switch navigation to UDW, where such issue should not occur.
Here are 15 jobs where this Scenario has been run (on EE Demo) and all of them passed: https://github.com/ezsystems/ezplatform-page-builder/pull/467 . This is not a bullet-proof solution, the same problem could appear again in the future - I have some ideas how to handle that, but I'm afraid it could increase the time required to run tests.
Checklist:
$ composer fix-cs
)