Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix: rename hover step to align with other mouse steps #70

Merged
merged 2 commits into from
Sep 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 28 additions & 1 deletion docs/STEPS.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ The following Gauge steps are implemented in this module:
- [Move to \<by> = \<by_value>](#move-to-by--by_value)
- [Move to and center \<by> = \<by_value>](#move-to-and-center-by--by_value)
- [Move out](#move-out)
- [Move over \<by> = \<by_value>](#move-over-by--by_value)
- [Hover over \<by> = \<by_value>](#hover-over-by--by_value)
- [Show message in an error case \<error_message>](#show-message-in-an-error-case-error_message)
- [Scroll \<by> = \<by_value> into view](#scroll-by--by_value-into-view)
Expand Down Expand Up @@ -886,6 +887,32 @@ Support
|:-----:|:--------------:|:----------:|:--------------:|:----------:|
| ✔ | ✔ | ✔ | ? | ? |

Copy link
Member

Choose a reason for hiding this comment

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

Could you also add the
## Move over \<by> = \<by_value>
doc, and just link it and explain that it does the same? On second thought I think we should not deprecate the hover over, because it is a common expression and it might make this step easier to find.

## Move over \<by> = \<by_value>

> \* Move over "id" = "search-field"

> \* Move over "xpath" = "//input[@type='text']"

> \* Move over "link text" = "search link"

> \* Move over "partial link text" = "search"

> \* Move over "name" = "search-field-name"

> \* Move over "tag name" = "input"

> \* Move over "class name" = "search-class"

> \* Move over "css selector" = "input.searchclass"

Move the mouse over the specified element.

Support

|Desktop|Android (Chrome)|iOS (Safari)|Android (Native)|iOS (Native)|
|:-----:|:--------------:|:----------:|:--------------:|:----------:|
| ✔ | ? | ? | ? | ? |

## Hover over \<by> = \<by_value>

> \* Hover over "id" = "search-field"
Expand All @@ -904,7 +931,7 @@ Support

> \* Hover over "css selector" = "input.searchclass"

Hover over the specified element.
Hover over the specified element. This step is a synonym for the [Move over \<by> = \<by_value>](#move-over-by--by_value) step.

Support

Expand Down
2 changes: 1 addition & 1 deletion gauge_web_app_steps/web_app_steps.py
Original file line number Diff line number Diff line change
Expand Up @@ -640,7 +640,7 @@ def move_out_of_view() -> None:
ActionChains(driver()).move_to_element_with_offset(element, 0, 0).perform()


@step("Hover over <by> = <by_value>")
@step(["Move over <by> = <by_value>", "Hover over <by> = <by_value>"])
def hover_over(by: str, by_value: str) -> None:
element = find_element(by, by_value)
ActionChains(driver()).move_to_element(element).perform()
Expand Down
Loading