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

Vaadin 8: Generate design htmls and allow their preview #7

Open
mvysny opened this issue Oct 25, 2018 · 1 comment
Open

Vaadin 8: Generate design htmls and allow their preview #7

mvysny opened this issue Oct 25, 2018 · 1 comment
Assignees
Labels
enhancement New feature or request question Further information is requested waiting upstream Something needs to be implemented in a dependency

Comments

@mvysny
Copy link
Owner

mvysny commented Oct 25, 2018

Failed tests could generate design htmls of the entire UI; then you can use the vaadin-declarative-view Chrome plugin to preview that.

Open questions:

  • Since Karibu-Testing is not dependent on any particular testing library, we can't hook into JUnit to obtain the current test name to generate a proper screenshot name. Either we auto-generate html name as UUID and place it into build/ or target/, or we encourage the user to use JUnit Rule.
@mvysny
Copy link
Owner Author

mvysny commented Oct 25, 2018

The vaadin-declarative-view plugin doesn't seem to be working for me. I have created the following testing design file, simply by calling

        File("design.html").outputStream().buffered().use {
            Design.write(UI.getCurrent().content, it)
        }

at the end of a simple testing method:

<!doctype html>
<html>
    <head></head>
    <body>
        <vaadin-vertical-layout>
            <vaadin-text-field caption="Type your name here:" value="Baron Vladimir Harkonnen"></vaadin-text-field>
            <vaadin-button plain-text>
                Click Me
            </vaadin-button>
            <vaadin-label plain-text>
                Thanks Baron Vladimir Harkonnen, it works!
            </vaadin-label>
        </vaadin-vertical-layout>
    </body>
</html>

The Chrome Plugin installs, I can see the icon in my Chromium. I open the design file from my local filesystem, as file:///home/mavi/work/my/vok/karibu-testing/karibu-testing-v8/design.html, but clicking that icon does nothing.

Maybe only designs located in RawGit are supported, but the service is EOL:

RawGit has reached the end of its useful life. RawGit is now in a sunset phase and will soon shut down. It's been a fun five years, but all things must end.

@mvysny mvysny self-assigned this Oct 25, 2018
@mvysny mvysny added enhancement New feature or request question Further information is requested waiting upstream Something needs to be implemented in a dependency labels Oct 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested waiting upstream Something needs to be implemented in a dependency
Projects
None yet
Development

No branches or pull requests

1 participant