AI Unified Process plugin for the Vaadin/jOOQ stack
97
93%
Does it follow best practices?
Impact
98%
1.30xAverage score across 10 eval scenarios
Passed
No known issues
Create Playwright integration tests for the Vaadin view specified in $ARGUMENTS. Tests run in a real browser against a running application. Use the Drama Finder library for type-safe, accessibility-first element lookups — never raw Playwright locators.
Tests extend AbstractBasePlaywrightIT from Drama Finder, which handles browser lifecycle, page creation, and Vaadin synchronization automatically.
<dependency>
<groupId>org.vaadin.addons</groupId>
<artifactId>dramafinder</artifactId>
<version>1.1.0</version>
<scope>test</scope>
</dependency>page.locator("vaadin-text-field") — use Drama Finder element wrappersThread.sleep() or page.waitForTimeout() — Drama Finder assertions auto-retrygetAttribute()/isVisible() directly in assertions — they don't auto-retryUse existing test data from Flyway migrations in src/test/resources/db/migration. If your test creates data, clean up in @AfterEach.
Use references/ExampleViewIT.java as the starting point for new test classes.
Drama Finder uses ARIA roles and accessible names — not CSS selectors. This makes tests resilient to DOM changes and enforces accessibility. The full element-class and method reference is bundled at references/dramafinder-api.md.
TextFieldElement nameField = TextFieldElement.getByLabel(page, "Full Name");
DatePickerElement birthDate = DatePickerElement.getByLabel(page, "Birth Date");
ComboBoxElement country = ComboBoxElement.getByLabel(page, "Country");
CheckboxElement active = CheckboxElement.getByLabel(page, "Active");ButtonElement save = ButtonElement.getByText(page, "Save");GridElement grid = GridElement.getById(page, "customer-grid");GridElement grid = GridElement.get(page);
DialogElement dialog = new DialogElement(page);
NotificationElement notif = new NotificationElement(page);DialogElement dialog = DialogElement.getByHeaderText(page, "Confirm Delete");When multiple elements share the same label, scope the lookup to a container:
DialogElement dialog = DialogElement.getByHeaderText(page, "Edit Person");
TextFieldElement name = TextFieldElement.getByLabel(dialog.getLocator(), "Name");
ButtonElement confirm = ButtonElement.getByText(dialog.getLocator(), "Confirm");For icon-only buttons, set setAriaLabel("Close") on the server side, then find with ButtonElement.getByText(page, "Close").
The bundled references/dramafinder-api.md is the authoritative API reference — element classes, factory methods, shared mixin assertions, and the locator-level rules (getLocator() vs getInputLocator()). Consult it before writing any test; do NOT guess method signatures.
Maven coordinates: groupId=org.vaadin.addons, artifactId=dramafinder, version=1.1.0
If the bundled reference doesn't cover a class you need (or the dependency has been upgraded past 1.1.0) and the JavaDocs MCP server is configured, look it up there and add it to the reference:
get_javadoc_content_list with the coordinates above lists all element and base classes.get_javadoc_symbol_contents with a link from that list returns the full API for a class (methods, parameters, return types, inherited methods).See the MCP setup rule to configure this optional server.
@Nested classes with @DisplayName)AbstractBasePlaywrightIT with @SpringBootTest and @LocalServerPortgetUrl() (return http://localhost:<port>/) and getView() (return the route)@AfterEach./mvnw verify -Pit to verifyisGreaterThan() for grid counts, add waitForGridToStopLoading() for async grids.first() automatically; scope to container for precisiongetInputLocator() for value/focus, getLocator() for component attributes./mvnw verify -Pit -Dheadless=false -Dit.test=YourTestIT