Commit 40ce3d67 authored by Mark Lapierre's avatar Mark Lapierre

Update e2e docs examples

Updates the e2e docs to use brackets consistently in examples.
Specifically, we use brackets for method calls that aren't for an
internal DSL as per the ruby style guide
https://rubystyle.guide/#method-call-parentheses
parent abb7fc8f
......@@ -309,10 +309,10 @@ This action can also unintentionally click other elements, altering the test sta
# Clicking another element to blur an input
def add_issue_to_epic(issue_url)
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
click_element :title
click_element :add_issue_button
click_element(:title)
click_element(:add_issue_button)
end
# 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.
Dynamic element validation is instituted when using
```ruby
click_element :my_element, Some::Page
click_element(:my_element, Some::Page)
```
### Required Elements
......@@ -79,7 +79,7 @@ class MyPage < Page::Base
end
def open_layer
click_element :my_element, Layer::MyLayer
click_element(:my_element, Layer::MyLayer)
end
end
......@@ -109,7 +109,7 @@ Given the [source](#examples) ...
```ruby
def open_layer
click_element :my_element, Layer::MyLayer
click_element(:my_element, Layer::MyLayer)
end
```
......
......@@ -201,7 +201,7 @@ We can select on that specific issue by matching on the Rails model.
```ruby
class Page::Project::Issues::Index < Page::Base
def has_issue?(issue)
has_element? :issue, issue_title: issue
has_element?(:issue, issue_title: issue)
end
end
```
......
......@@ -19,7 +19,7 @@ E.g.:
```ruby
def click_ci_cd_pipelines
within_sidebar do
click_element :link_pipelines
click_element(:link_pipelines)
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