Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wait for dev bundle build in waitForVaadin #1705

Closed
Tracked by #4718
mshabarov opened this issue Dec 11, 2023 · 2 comments · Fixed by #1706
Closed
Tracked by #4718

Wait for dev bundle build in waitForVaadin #1705

mshabarov opened this issue Dec 11, 2023 · 2 comments · Fixed by #1706
Assignees
Labels

Comments

@mshabarov
Copy link
Contributor

mshabarov commented Dec 11, 2023

Vaadin Flow 24.3 has now a "Building front-end development bundle" spinner shown on the page when dev bundle is being generated, see this issue.

TestBench should take this into account in waitForVaadin method to let Flow apps to properly wait until custom dev bundle is ready.

Possible solution is to wait until spinner div

<div class="message">Building front-end development bundle</div>

disappears, like shown below:

waitUntil(driver -> {
            try {
                TestBenchElement testBenchElement = $("div").attribute("class", "message").waitForFirst();
                return testBenchElement == null;
            } catch (TimeoutException e){
                return true;
            } catch (NoSuchElementException e){
                return true;
            }
        });
@TatuLund
Copy link
Contributor

@tltv tltv self-assigned this Dec 11, 2023
@mshabarov
Copy link
Contributor Author

mshabarov commented Dec 11, 2023

UPD: TestBench waitForVaadin method already has a check for dev server here.

This checks for a flag devServerIsNotLoaded which is added on "dev mode not ready" page here.

Since the custom dev bundle build shows the same dev-mode-not-ready page now, I expect that the existing TestBench implementation works properly.

We should start with testing the waitForVaadin() method properly waiting until custom dev bundle build in Spring+Flow skeleton starter project with JS customisations.

mshabarov added a commit that referenced this issue Dec 11, 2023
Waits for frontend compilation before waiting for Flow client initialisation to cover the custom dev bundle compilation case.

Fixes #1705
mshabarov added a commit that referenced this issue Dec 11, 2023
Waits for frontend compilation before waiting for Flow client initialisation to cover the custom dev bundle compilation case.

Fixes #1705
@github-project-automation github-project-automation bot moved this from 🔖 High Priority (P1) to ✅ Closed in Vaadin Flow bugs & maintenance (Vaadin 10+) Dec 11, 2023
@github-project-automation github-project-automation bot moved this from 🟢Ready to Go to Done in Vaadin Flow ongoing work (Vaadin 10+) Dec 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging a pull request may close this issue.

3 participants