Skip to content

Commit

Permalink
ApplicationListener defined in main view doesn't work after navigatin…
Browse files Browse the repository at this point in the history
…g to another view #3222 (fix tests)
  • Loading branch information
glebfox committed May 7, 2024
1 parent d6e25b4 commit 3405682
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

package view_attributes

import com.vaadin.flow.component.ComponentUtil
import com.vaadin.flow.server.VaadinSession
import io.jmix.flowui.view.StandardOutcome
import io.jmix.flowui.view.ViewAttributes
Expand Down Expand Up @@ -54,6 +55,10 @@ class ViewAttributesTest extends FlowuiTestSpecification {

and: "After closing View attribute should be removed from Vaadin session"
view.close(StandardOutcome.CLOSE)
// All views, except detail view, remove view attribute on detach,
// so we need to trigger it explicitly, because on the time of assertion,
// DetachEvent hasn't fired yet.
ComponentUtil.onComponentDetach(view)

def sessionAttrs1 = getAttributesFromSession(view.getId().get())
sessionAttrs1 == null
Expand Down

0 comments on commit 3405682

Please sign in to comment.