Module: AutoTest::Dsl

Included in:
AutoTest
Defined in:
lib/dsl.rb

Class Method Summary collapse

Class Method Details

.always_present(class_name, key, value) ⇒ Object

add an array of the classname, key and value of the object to be checked every cycle



14
15
16
# File 'lib/dsl.rb', line 14

def always_present(class_name, key, value)
  Test.always_present(class_name, key, value)
end

.get_users_from_db(user_class_name, bool) ⇒ Object



40
41
42
# File 'lib/dsl.rb', line 40

def get_users_from_db(user_class_name, bool)
  Authentication.get_users_from_db(user_class_name, bool)
end

set the links, that aren´t supposed to be clicked @*links List of two-element-arrays, first value link-text, second value link href



9
10
11
# File 'lib/dsl.rb', line 9

def links_to_exclude(*links)
  Test.links_to_exclude(*links)
end

.set_input(input, *values) ⇒ Object

for the name or part of the name of an input field, decide, which values to use if not set, random values matching the input type are used



29
30
31
# File 'lib/dsl.rb', line 29

def set_input(input, *values)
  Test.set_input(input, *values)
end

.set_login_attribute_names(names, fields) ⇒ Object

set the attribute_names and fields that are needed to login the argument is a list of pairs [attribute_name, field]



74
75
76
77
78
# File 'lib/dsl.rb', line 74

def (names, fields)
  Authentication.(names, fields)
  Authentication.(fields)
  Authentication.(names)
end

.set_login_button(text) ⇒ Object



63
64
65
# File 'lib/dsl.rb', line 63

def (text)
  Authentication.(text)
end

.set_login_data(*data) ⇒ Object

give data for logins, e.g. if the password for users is saved as salt and hash in the database the data has to be created in the test_seeds.rb file



36
37
38
# File 'lib/dsl.rb', line 36

def (*data)
  Authentication.(*data)
end

.set_login_path(path) ⇒ Object

set the login path



68
69
70
# File 'lib/dsl.rb', line 68

def (path)
  Authentication.(path)
end

.set_logout_path(path) ⇒ Object



80
81
82
# File 'lib/dsl.rb', line 80

def set_logout_path(path)
  Authentication.set_logout_path(path)
end

.set_max_depth(value) ⇒ Object

set the maximal depth to which the links are clicked



19
20
21
# File 'lib/dsl.rb', line 19

def set_max_depth(value)
  Test.set_max_depth(value)
end


54
55
56
# File 'lib/dsl.rb', line 54

def set_max_number_of_session_links(no)
  Test.set_max_number_of_session_links(no)
end

.set_no_authObject



59
60
61
# File 'lib/dsl.rb', line 59

def set_no_auth
  Test.set_no_auth
end

.set_number_of_sessions(number) ⇒ Object



50
51
52
# File 'lib/dsl.rb', line 50

def set_number_of_sessions(number)
  Test.set_number_of_sessions(number)
end

.set_number_of_test_runs(number) ⇒ Object



88
89
90
# File 'lib/dsl.rb', line 88

def set_number_of_test_runs(number)
  Test.set_number_of_test_runs(number)
end

.set_object_dependency(child, parent, attribute_name) ⇒ Object

for all objects of class child, there has to be one object of class parent attribute_name is the column that joins the two tables



46
47
48
# File 'lib/dsl.rb', line 46

def set_object_dependency(child, parent, attribute_name)
  Test.set_object_dependency(child, parent, attribute_name)
end

.set_unique_login_attribute_name(name) ⇒ Object



23
24
25
# File 'lib/dsl.rb', line 23

def (name)
  Authentication.(name)
end

.stop_at_first_error(stop_at_first_error) ⇒ Object



84
85
86
# File 'lib/dsl.rb', line 84

def stop_at_first_error(stop_at_first_error) 
  Test.stop_at_first_error(stop_at_first_error) 
end