discourse/spec/system/page_objects/components/bookmark_menu.rb
Joffrey JAFFEUX cf8b81771f
DEV: implements <DropdownMenu /> (#26917)
DropdownMenu component is meant as a way to describe the content of menus.

Syntax:

```
<DropdownMenu as |dm|>
  <dm.item class="test">
    First
  </dm.item>
  <dm.divider class="foo" />
  <dm.item class="bar">
    Second
  </dm.item>
</DropdownMenu>
```
2024-05-08 09:08:42 +02:00

16 lines
340 B
Ruby

# frozen_string_literal: true
module PageObjects
module Components
class BookmarkMenu < PageObjects::Components::Base
def click_menu_option(option_id)
find(".bookmark-menu__row[data-menu-option-id='#{option_id}']").click
end
def open?
has_css?(".bookmark-menu-content")
end
end
end
end