Problem In ReleaseNotesIT.contributorsListAndChangeNumbering, the contributors entry is saved with a raw click and the test then navigates away immediately:
setup.getDriver().findElement(By.cssSelector("input[name='action_save']")).click();
ViewPage afterPage = setup.gotoPage(releaseNote);
The inline editor saves over AJAX, so navigating away right after the click can abort the save, and the assertions that follow can fail nondeterministically. Notes The same test class already does this correctly ~400 lines later, with a comment naming the exact hazard:
new InlinePage().clickSaveAndView();
So the fix is to use InlinePage.clickSaveAndView() here too. Related, same method: the textarea is located as By.cssSelector("textarea"), i.e. whatever textarea happens to be first in the DOM, rather than through the page object's field accessor. More broadly, the class uses getDriver() 20 times. Two other sites are worth moving behind page objects: the Live Data column measurement done with executeJavascript (RN-86 was a bug in that very measurement, now buried as an inline JS string) and the administration field lookups done with raw By.name. The XWiki testing conventions treat a raw findElement in a test as a sign that a page object is missing an API. |