[MGNLTEST-70] API for time-sensitive assertions of element presence/absence Created: 22/Jul/20  Updated: 13/Aug/20  Resolved: 03/Aug/20

Status: Closed
Project: Magnolia Test Framework
Component/s: None
Affects Version/s: 1.0.1
Fix Version/s: 1.0.1

Type: Improvement Priority: Neutral
Reporter: Christoph Meier Assignee: Aleksandr Pchelintcev
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
supersession
supersedes MGNLTEST-74 Active app tab verification is prone ... Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Date of First Response:
Epic Link: core-TF-features-bugs-improvements
Sprint: TE 7, TE 8
Story Points: 8

 Description   

Use case:

Within a test we have e.g.
form.cancel()
And the next step only works, if the form did disappear.

@ImplicitWaitTimeout does not help in this situation.

Exact API to be defined.


 

Another example from a self-test (PageEditorTest#smokeTest)

       // WHEN
        mainArea.selectComponent("Text"); // selects the first component under this area
        editor.hitAction("Edit component");
        Form form = expect.form("Dialog"); //shrug

        // THEN
        assertEquals("Main - Component One", form.getTextFieldValue("Title"));

        // GIVEN
        form.cancel();

        // WHEN
        mainArea.selectComponentAtPosition("Text", 1); // position index starts at 0


 Comments   
Comment by Aleksandr Pchelintcev [ 04/Aug/20 ]

Resolution includes addition of PageObjects#eventually(Supplier<Boolean>) which allows to wait for an arbitrary predicate to become true or timeout (and fail the test).

Generated at Mon Feb 12 07:45:16 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.