npx claudepluginhub martinellich/aiup-marketplace --plugin aiup-vaadin-jooqWant just this skill?
Then install: npx claudepluginhub u/[userId]/[slug]
Creates Playwright browser-based integration tests for Vaadin views covering navigation, form interactions, grid operations, and dialog handling. Use when the user asks to "write Playwright tests", "create e2e tests", "write integration tests", "test in the browser", or mentions end-to-end testing, browser tests, UI integration tests, or Playwright for Vaadin.
This skill uses the workspace's default tool permissions.
templates/ExampleViewIT.javaPlaywright Test
Instructions
Create Playwright integration tests for Vaadin views on the use case $ARGUMENTS. Playwright tests run in a real browser against a running application.
DO NOT
- Use Mockito for mocking
- Access services, repositories, or DSLContext directly
- Delete all data in cleanup (only remove data created during the test)
- Forget to wait for Vaadin connections to settle after interactions
- Assume all grid rows are rendered (viewport limits visible rows)
Test Data Strategy
Use existing test data from Flyway migrations in src/test/resources/db/migration.
| Approach | Location | Purpose |
|---|---|---|
| Flyway migration | src/test/resources/db/migration/V*.sql | Existing test data |
| Manual cleanup | @AfterEach method | Remove test-created data |
Test Class Structure
Extend from PlaywrightIT base class.
Template
Use templates/ExampleViewIT.java as the test class structure.
Key Classes
| Class | Purpose |
|---|---|
| GridPw | Grid interactions and assertions |
| page | Playwright Page object for navigation |
| mopo | Vaadin connection helper |
Common Patterns
Navigate to View
page.navigate("http://localhost:%d/persons".formatted(localServerPort));
Wait for Vaadin Connection
Always wait after interactions that trigger server communication:
mopo.waitForConnectionToSettle();
Grid Operations
GridPw gridPw = new GridPw(page);
// Get rendered row count (viewport limited!)
int count = gridPw.getRenderedRowCount();
// Get specific row
GridPw.RowPw row = gridPw.getRow(0);
// Get cell text
String text = row.getCell(0).innerText();
// Select row
row.select();
mopo.waitForConnectionToSettle();
Locate Vaadin Components
// Text field by label
Locator nameField = page.locator("vaadin-text-field")
.filter(new Locator.FilterOptions().setHasText("Name"))
.locator("input");
// Button by text
Locator saveButton = page.locator("vaadin-button")
.filter(new Locator.FilterOptions().setHasText("Save"));
// ComboBox
Locator comboBox = page.locator("vaadin-combo-box")
.filter(new Locator.FilterOptions().setHasText("Country"));
Form Interactions
// Get input value
String value = nameField.inputValue();
// Fill text field
nameField.fill("New Value");
// Click button
saveButton.click();
mopo.waitForConnectionToSettle();
// Clear and fill
nameField.clear();
nameField.fill("Updated Value");
ComboBox Interactions
// Open and select
comboBox.click();
page.locator("vaadin-combo-box-item")
.filter(new Locator.FilterOptions().setHasText("Option 1"))
.click();
mopo.waitForConnectionToSettle();
Dialog Interactions
// Confirm dialog
page.locator("vaadin-confirm-dialog")
.locator("vaadin-button")
.filter(new Locator.FilterOptions().setHasText("Confirm"))
.click();
mopo.waitForConnectionToSettle();
Assertions Reference
Use AssertJ assertions:
| Assertion Type | Example |
|---|---|
| Text content | assertThat(row.getCell(0).innerText()).isEqualTo("x") |
| Input value | assertThat(field.inputValue()).isEqualTo("value") |
| Row count | assertThat(gridPw.getRenderedRowCount()).isGreaterThan(0) |
| Visibility | assertThat(element.isVisible()).isTrue() |
| Enabled | assertThat(element.isEnabled()).isTrue() |
Viewport Considerations
Playwright tests run in a real browser with viewport constraints:
- Not all grid rows may be rendered
- Use
isGreaterThan()instead of exact counts for grids - Scroll if needed to access off-screen elements
Workflow
- Read the use case specification
- Use TodoWrite to create a task for each test scenario
- Create test class extending PlaywrightIT
- For each test:
- Navigate to the view
- Wait for connection to settle
- Locate components using Vaadin selectors
- Perform interactions (always wait after)
- Assert expected outcomes
- Clean up test data if created during test
- Run tests to verify they pass
- If a test fails:
- Verify the view loaded correctly (check page URL and title)
- Ensure
mopo.waitForConnectionToSettle()is called after every interaction - Check that test data exists in the Flyway test migrations
- For grid assertions, use
isGreaterThan()instead of exact counts
- Mark todos complete
Similar Skills
Expert guidance for Next.js Cache Components and Partial Prerendering (PPR). **PROACTIVE ACTIVATION**: Use this skill automatically when working in Next.js projects that have `cacheComponents: true` in their next.config.ts/next.config.js. When this config is detected, proactively apply Cache Components patterns and best practices to all React Server Component implementations. **DETECTION**: At the start of a session in a Next.js project, check for `cacheComponents: true` in next.config. If enabled, this skill's patterns should guide all component authoring, data fetching, and caching decisions. **USE CASES**: Implementing 'use cache' directive, configuring cache lifetimes with cacheLife(), tagging cached data with cacheTag(), invalidating caches with updateTag()/revalidateTag(), optimizing static vs dynamic content boundaries, debugging cache issues, and reviewing Cache Component implementations.
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright violations.