-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathad_starter_tasks.rb
38 lines (33 loc) · 1.59 KB
/
ad_starter_tasks.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# frozen_string_literal: true
# This file utilizes Ruby-Selenium framework.
# Methods in this file are divided by easily distinguishing tasks.
# So program is easy to test.
# -------------------------------------------------
def visit_site_task
test_task_title(__callee__) # ad_starter_global_methods.rb
setup # ad_starter_global_methods.rb
# setup Selenium
test_page_url # ad_starter_actions.rb
validate_page_title # ad_starter_actions.rb
# teardown Selenium
teardown # ad_starter_global_methods.rb
end
def log_in_task
test_task_title(__callee__) # ad_starter_global_methods.rb
setup # ad_starter_global_methods.rb
# setup Selenium
press_log_in_button # ad_starter_actions.rb
check_sign_in_form # ad_starter_actions.rb
submit_sign_in_form # ad_starter_actions.rb
next_task unless balans_is_negative? # ad_starter_actions.rb
# teardown Selenium
teardown # ad_starter_global_methods.rb
end
def start_company_task
test_task_title(__callee__) # ad_starter_global_methods.rb
setup # ad_starter_global_methods.rb
# teardown Selenium
start_company if page_of_ad_company? # ad_starter_actions.rb
teardown # ad_starter_global_methods.rb
end
# TODO: add (place:) to each method definition and assign it to `setup`