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

Update syntax for "When I go to the relative URL '$relativeURL'" step #3516

Merged
merged 3 commits into from
Jan 11, 2023

Conversation

vkepin
Copy link
Contributor

@vkepin vkepin commented Jan 2, 2023

No description provided.

Copy link
Collaborator

@valfirst valfirst left a comment

Choose a reason for hiding this comment

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

Also please fix spotless violations

@@ -2,6 +2,24 @@
:popup-alert: https://www.w3schools.com/js/js_popup.asp
:close-spec: https://w3c.github.io/webdriver/webdriver-spec.html#close-window[close]

=== Page steps
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
=== Page steps
=== Steps opening pages


==== Go to relative URL

A _relative URL_ - points to a file within a web site (like `about.html` or `/products`)
Copy link
Collaborator

Choose a reason for hiding this comment

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

too technical

PS: javadocs may not be a good example to copy


Actions performed at this step:

* Builds the absolute URL by concatenating the base URL and the relative URL;
Copy link
Collaborator

Choose a reason for hiding this comment

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

not clear what source of the base URL is

----

* `relativeURL` - A string value of the relative URL

Copy link
Collaborator

Choose a reason for hiding this comment

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

also please add example demoing step usage

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

Copy link
Collaborator

Choose a reason for hiding this comment

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

still looking for examples

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added

@codecov
Copy link

codecov bot commented Jan 3, 2023

Codecov Report

Merging #3516 (99cfcb9) into master (2047e3d) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##             master    #3516   +/-   ##
=========================================
  Coverage     96.96%   96.96%           
  Complexity     6046     6046           
=========================================
  Files           848      848           
  Lines         17280    17280           
  Branches       1122     1122           
=========================================
  Hits          16756    16756           
  Misses          417      417           
  Partials        107      107           
Impacted Files Coverage Δ
.../main/java/org/vividus/steps/ui/web/PageSteps.java 98.80% <ø> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more


Composite: When I go to the relative URL '$relativeURL'
!-- WARNING: The step "When I go to the relative URL '$relativeURL'" is deprecated and will be removed in VIVIDUS 0.7.0
When I go to relative URL `<$relativeURL>`
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
When I go to relative URL `<$relativeURL>`
When I go to relative URL `<relativeURL>`

@vkepin vkepin force-pushed the gotoRelativeUrl branch 2 times, most recently from ce011ba to 0f11229 Compare January 3, 2023 14:38

==== Go to relative URL

Navigates the browser to the specific path in the host defined in the _relative URL_ step variable.
Copy link
Member

Choose a reason for hiding this comment

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

"to the specific path in the host" this statement is not clear

@@ -248,7 +248,7 @@ public void isPageScrolledToAnElement(Locator locator)
* <p>
* @param relativeURL A string value of the relative URL
*/
@When("I go to the relative URL '$relativeURL'")
@When("I go to relative URL `$relativeURL`")
public void iGoTo(String relativeURL)
Copy link
Member

Choose a reason for hiding this comment

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

I think it makes sense to give the method clearer name

Copy link
Contributor Author

Choose a reason for hiding this comment

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

changed to 'openRelativeUrl'

@@ -248,7 +248,7 @@ public void isPageScrolledToAnElement(Locator locator)
* <p>
* @param relativeURL A string value of the relative URL
*/
Copy link
Member

Choose a reason for hiding this comment

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

please don't forget to sync javadoc with main docs

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated

@@ -2,6 +2,43 @@
:popup-alert: https://www.w3schools.com/js/js_popup.asp
:close-spec: https://w3c.github.io/webdriver/webdriver-spec.html#close-window[close]

=== Steps opening pages

==== Go to relative URL
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
==== Go to relative URL
==== Open page with relative URL


==== Go to relative URL

Navigates the browser to the specific path in the host defined in the _relative URL_ step variable.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
Navigates the browser to the specific path in the host defined in the _relative URL_ step variable.
Navigates the browser to the specific path in the host defined in the _relative URL_ step parameter.

Navigates the browser to the specific path in the host defined in the _relative URL_ step variable.

A relative URL can point to a file within a website (like `about.html` or `/products`).
If the parameter starts with '/' char, navigation will be performed from the root of the host, see examples below.
Copy link
Collaborator

Choose a reason for hiding this comment

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

what about case like ./about.html?

----

* `relativeURL` - A string value of the relative URL

Copy link
Collaborator

Choose a reason for hiding this comment

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

still looking for examples

@@ -284,3 +284,7 @@ When I wait until element located by `<locator>` contains text `<text>'
Composite: Then element located '$locator' disappears in '$timeout'
!-- WARNING: The step "Then element located '$locator' disappears in '$timeout'" is deprecated and will be removed in VIVIDUS 0.6.0
Then element located by `<locator>` disappears in `<timeout>`

Composite: When I go to the relative URL '$relativeURL'
Copy link
Collaborator

Choose a reason for hiding this comment

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

we need to have tests for both new and deprecated steps, so please either add new test or change some existing one to check behaviour of the new step

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added

@vkepin vkepin force-pushed the gotoRelativeUrl branch 5 times, most recently from 3c69425 to 44bce3d Compare January 9, 2023 10:02
@vkepin vkepin force-pushed the gotoRelativeUrl branch 2 times, most recently from b72c51b to 77d5123 Compare January 10, 2023 11:57
@valfirst valfirst merged commit 4b3df98 into vividus-framework:master Jan 11, 2023
@vkepin vkepin deleted the gotoRelativeUrl branch April 24, 2023 15:04
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

Successfully merging this pull request may close these issues.

4 participants