[MGNLTEST-165] contentApp.hasRow("yet-another-page") not working in time Created: 04/May/21 Updated: 19/Oct/21 Resolved: 20/Sep/21 |
|
| Status: | Closed |
| Project: | Magnolia Test Framework |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 1.2.2 |
| Type: | Bug | Priority: | Critical |
| Reporter: | Christoph Meier | Assignee: | Michael Duerig |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | VN-Maintenance, shaky-test | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | 1.5h | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Template: |
|
||||||||||||||||
| Acceptance criteria: |
Empty
|
||||||||||||||||
| Task DoD: |
[X]*
Doc/release notes changes? Comment present?
[X]*
Downstream builds green?
[X]*
Solution information and context easily available?
[X]*
Tests
[X]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
||||||||||||||||
| Bug DoR: |
[X]*
Steps to reproduce, expected, and actual results filled
[X]*
Affected version filled
|
||||||||||||||||
| Date of First Response: | |||||||||||||||||
| Epic Link: | core-TF-features-bugs-improvements | ||||||||||||||||
| Story Points: | 8 | ||||||||||||||||
| Description |
|
We have been using the contentApp#hasRow for assertions in several tests in PagesCoreFunctionalTests, AssetsCoreFunctionalTests (and maybe others too). While this worked fine for some time, this changed recently. It's possible that this is related to the fact that we had to change the version of ubuntu on AWS. The ubuntu version 18 we are using now has been reported to be significantly slower than previous versions. Tests have been "fixed" / adjusted by doing assertions with selenium-independent assertions using the MagnoliaHttpClient (instead of the the RenderedPage). Acceptance criteria"Adjust" the test-fwk in a way that contentApp.hasRow("yet-another-page") again can be used as a trustworthy way to make assertions. Example test, which worked "before" and now fails, but which should work again from PagesCoreFunctionalTests):
@Test
@Fixture(fixtureFile = "website.lorem-ipsum.yaml", repository = "website")
@Cleanup("website:/lorem-ipsum")
void editPage(PageObjects expect) {
loginAndOpenPagesApp(expect, Personas.ERIC);
pagesApp.clickRow("Lorem ipsum")
.hitAction("Edit page")
.hitAction("Edit page properties");
expect.form("Page properties")
.setTextField("Page title (en)", "Summa cum laude")
.save();
pagesApp.openTab("Pages");
assertTrue(pagesApp.hasRow("Summa cum laude"));
}
Developers noteThe issue simply spoken seems to be a timing issue. In case you need to add "waiting" / "conditional waiting" - consider using the https://github.com/awaitility/awaitility framework. Additional notes:Here's a possible reason why Ubuntu 18 is "slower" than previous versions:
|
| Comments |
| Comment by Michael Duerig [ 20/Sep/21 ] |
|
The fix for |