Skip to content

Conversation

mkolasinski-splunk
Copy link
Contributor

@mkolasinski-splunk mkolasinski-splunk commented Oct 26, 2023

This PR introduces select_nested() method in dropdown component which enables user to operate multi-level menu for inputs by providing to method sequence of buttons that are going to be clicked in given a order.
sleep() function used within select_nested() function to avoid issue with broken pop-up animation.

@artemrys artemrys force-pushed the feat/multi-level-menu branch from ce87891 to 74e9f31 Compare October 27, 2023 10:54
@vtsvetkov-splunk vtsvetkov-splunk changed the title fix: multi level menu fix: ADDON-65405 multi level menu Oct 31, 2023
self.add_input.click()
popoverid = "#" + self.add_input.get_attribute("data-test-popover-id")
dropdown_selector = (
' [data-test="item"]:not([data-test-selected="true"]) [data-test="label"]'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can't you just get text from [data-test="item"]?

image

Copy link
Contributor Author

@mkolasinski-splunk mkolasinski-splunk Nov 10, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reused existing code part - :not([data-test-selected="true"] must have been added to not allow choosing already chosen option but I don't see a reason for such behaviour. Updated code as per your suggestion for both select() and select_nested methods.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if it is a menu, how it can be selected?

@mkolasinski-splunk mkolasinski-splunk deleted the feat/multi-level-menu branch November 10, 2023 18:43
@github-actions github-actions bot locked and limited conversation to collaborators Nov 10, 2023
@srv-rr-github-token
Copy link
Contributor

🎉 This PR is included in version 2.5.2 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants