[MGNLTEST-372] Provide generic (?) check to ensure angular-app is ready / fully loaded Created: 11/Dec/22  Updated: 21/Aug/23  Resolved: 21/Aug/23

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

Type: Task Priority: Neutral
Reporter: Christoph Meier Assignee: Harshini Pola
Resolution: Resolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: 1d 1h
Original Estimate: Not Specified

Attachments: PNG File Bildschirmfoto 2022-12-11 um 13.05.21.png    
Template:
Acceptance criteria:
Empty
Task DoR:
Empty
Date of First Response:
Epic Link: cucumber-and-selenide-support-by-test-fwk
Work Started:

 Description   

Provide a "utility" to check whether an angular app is completely loaded / ready.

We have something similar for Vaadin (see VaadinWebDriverWrapper, VaadinWebElementWrapper) ...
however, I'm not looking for another element wrapper, rather thinking about a Selenide custom condition or a SeleniumCondition

Use case

subscription-service-ui/e2e ... user-profile.feature
Step When I open user profile page
I call UserProfilePage#assertExists

// in info.magnolia.cloud.e2e.pageobjects.UserSettingsPage
    public void assertExists() throws Throwable {
        // TODO: do better implementation here ...
        firstNameField.shouldBe(visible).shouldNotBe(disabled);
        changePasswordTab.shouldBe(visible).should(enabled);
    }

the assertExists shown above is passing, while the UI is still "greyed-out", see screenshot - hence the subsequent step
When I go to Change password tab - clicking of the "tab" fails. I can "work around" by adding a Selenide.sleep(5000); ... after calling assertExists, but ... that is a bit hack-ish - would be nice to have better solution without #sleep.
  

Developer notes

Some sources:



 Comments   
Comment by Christoph Meier [ 03/Jan/23 ]

WIP: https://git.magnolia-cms.com/projects/PLATFORM/repos/test-framework/commits?until=refs%2Fheads%2FMGNLTEST-372

Comment by Harshini Pola [ 21/Aug/23 ]

Implemented, reviewed and merged. 

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