E2E tests showing wrong/old page content after Mendix 10 upgrade (works fine manually)

0
Hi ,We’ve been noticing a strange issue during our E2E test runs. Sometimes the page shows incorrect or old content instead of the expected one, because of which the Glossary word validation fails.The main challenge is that this is not reproducible manually — when we follow the same steps ourselves, everything works fine. It only happens during automated execution and also not every time, so it’s quite inconsistent.This started appearing more frequently after we upgraded to Mendix 10. It feels like the test might be validating the data before the page or content is fully loaded, or maybe some caching/context refresh issue is happening.Has anyone faced something similar with Mendix apps during E2E testing? Any suggestions on what could be causing this or how to handle it would really help.Thanks in advance!
asked
1 answers
0

Hi Reemali Patil

Yes!, Your guess is correct "The test validation started before the page/content fully loaded" there are few item which might help in that case, Mostly Wait for Actual Content, Not Page Load

for example:

await expect(page.locator('.glossary-term')).toHaveText('Expected Term', { timeout: 10000 });


One cheese way is having the loader and based on the loader to setup await:

await page.waitForSelector('.mx-progress', { state: 'hidden', timeout: 15000 });

For example if I have to execute some script which refers the DOM [for example] to ensure it loads fully is by check the avaiblity first and then calling by script. in this case the loader gets hidden once the dom is generated so after it if the script is called then it should work.

Let me know if this helps

answered