mvysny / karibu-testing

Vaadin Server-Side Browserless Containerless Unit Testing
Apache License 2.0
105 stars 14 forks source link

Add support for SideNav and SideNavItem #154

Closed mvysny closed 1 year ago

mvysny commented 1 year ago

Relates to https://github.com/vaadin/flow/issues/16969 - atm it's not possible to lookup SideNav by label. We could add support for that into SearchSpec but that's tricky since it's hard to keep backward compatibility with Vaadin 24.0.

Maybe at some point we can drop support for Vaadin 24.0 and also add:

@VaadinDsl
fun (@VaadinDsl SideNavItem)._click() {
    _expectEditableByUser()
    navigateTo(path)
}
mvysny commented 1 year ago

Blocked by https://github.com/vaadin/flow-components/issues/5129 ; also after Tab no longer implements HasLabel I need to modify the code accordingly: https://github.com/vaadin/flow-components/issues/5094

mvysny commented 1 year ago

Will be added in Karibu-Testing 2.1.0

No longer blocked by the vaadin ticket since it was decided that HasLabel will only be implemented by fields. Therefore I'll have to modify toPrettyString() and lookup code accordingly.