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

"clicking" on a sidebar item in shinytest does not expand it #257

Closed
wch opened this issue Jan 26, 2018 · 0 comments
Closed

"clicking" on a sidebar item in shinytest does not expand it #257

wch opened this issue Jan 26, 2018 · 0 comments

Comments

@wch
Copy link
Contributor

wch commented Jan 26, 2018

PR #256 allows selecting a tab with shinytest, but does not expand sidebar menu items with children.

Here is a first pass at an implementation in sidebarmenuExpandedInputBinding, though it does not yet work:

  setValue: function(el, value) {
    var $menuItem = $(el).find("[data-expanded='" + value + "']");
    var $menu = $menuItem.next();
    // If this menuItem was already open, then clicking on it again,
    // should trigger the "hidden" event, so Shiny doesn't worry about
    // it while it's hidden (and vice versa).
    if ($menu.hasClass("menu-open")) $menu.trigger("hidden");
    else if ($menu.hasClass("treeview-menu")) $menu.trigger("shown");
  },
@wch wch closed this as completed in 281b9f2 Mar 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant