Unless a new options object is passed directly as an argument to the toBeDisplayed() function the test will fail when having to wait longer than the default of 2000 milliseconds. Even after setting the waitForTimeout explicitly to 60000 milliseconds inside our wdio.base.conf.ts.
This works: await expect($('android=new UiSelector().text(\"placeholder dummy text\")')).toBeDisplayed({ wait: 60000 });
Or this works:
toBeDisplayed.js
