List items are randomly shuffled on every page load, causing position-based assertions to fail intermittently.
The five items below are displayed in a random order on each page load. A test asserting that the second item is "Beta" would only pass when the shuffle happens to place "Beta" in position 2.
Compare the current shuffled order against the original order to see which positions match.
Tests that rely on element position (e.g., "the 2nd list item should contain 'Beta'") will fail whenever the shuffle produces a different order. With 5 items, there are 120 possible orderings, so any position-based assertion has only a 1-in-5 chance of being correct.
items[1].text === "Beta" passes only 20% of the time