Commit f6b074d1 authored by Ramya Authappan's avatar Ramya Authappan

Merge branch 'ml-update-e2e-docs-re-brackets' into 'master'

Update e2e docs examples

See merge request gitlab-org/gitlab!56289
parents 6b44a35f 40ce3d67
...@@ -309,10 +309,10 @@ This action can also unintentionally click other elements, altering the test sta ...@@ -309,10 +309,10 @@ This action can also unintentionally click other elements, altering the test sta
# Clicking another element to blur an input # Clicking another element to blur an input
def add_issue_to_epic(issue_url) def add_issue_to_epic(issue_url)
find_element(:issue_actions_split_button).find('button', text: 'Add an issue').click find_element(:issue_actions_split_button).find('button', text: 'Add an issue').click
fill_element :add_issue_input, issue_url fill_element(:add_issue_input, issue_url)
# Clicking the title blurs the input # Clicking the title blurs the input
click_element :title click_element(:title)
click_element :add_issue_button click_element(:add_issue_button)
end end
# Using native mouse click events in the case of a mask/overlay # Using native mouse click events in the case of a mask/overlay
......
...@@ -39,7 +39,7 @@ appear on the webpage, or the test to navigate away from the page entirely. ...@@ -39,7 +39,7 @@ appear on the webpage, or the test to navigate away from the page entirely.
Dynamic element validation is instituted when using Dynamic element validation is instituted when using
```ruby ```ruby
click_element :my_element, Some::Page click_element(:my_element, Some::Page)
``` ```
### Required Elements ### Required Elements
...@@ -79,7 +79,7 @@ class MyPage < Page::Base ...@@ -79,7 +79,7 @@ class MyPage < Page::Base
end end
def open_layer def open_layer
click_element :my_element, Layer::MyLayer click_element(:my_element, Layer::MyLayer)
end end
end end
...@@ -109,7 +109,7 @@ Given the [source](#examples) ... ...@@ -109,7 +109,7 @@ Given the [source](#examples) ...
```ruby ```ruby
def open_layer def open_layer
click_element :my_element, Layer::MyLayer click_element(:my_element, Layer::MyLayer)
end end
``` ```
......
...@@ -201,7 +201,7 @@ We can select on that specific issue by matching on the Rails model. ...@@ -201,7 +201,7 @@ We can select on that specific issue by matching on the Rails model.
```ruby ```ruby
class Page::Project::Issues::Index < Page::Base class Page::Project::Issues::Index < Page::Base
def has_issue?(issue) def has_issue?(issue)
has_element? :issue, issue_title: issue has_element?(:issue, issue_title: issue)
end end
end end
``` ```
......
...@@ -19,7 +19,7 @@ E.g.: ...@@ -19,7 +19,7 @@ E.g.:
```ruby ```ruby
def click_ci_cd_pipelines def click_ci_cd_pipelines
within_sidebar do within_sidebar do
click_element :link_pipelines click_element(:link_pipelines)
end end
end end
``` ```
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment