-
Notifications
You must be signed in to change notification settings - Fork 0
/
testLogin.rb
46 lines (43 loc) · 1.05 KB
/
testLogin.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
39
40
41
42
43
44
45
46
require 'selenium-webdriver'
require './learn_component_objects/portal_main_object.rb'
url = 'https://learn.staging.concord.org'
teacher_name = 'ETeacher'
teacher_password = 'ETeacher'
student_name = 'rtyler'
student_password = 'tardis'
admin_name = 'ETestadmin'
admin_password = 'ETestadmin'
researcher_name = "KJaneway"
researcher_password = "KJaneway"
learn = PortalMainObject.new()
learn.setup_one(:chrome)
learn.visit(url)
learn.verify_page("STEM Resource Finder")
learn.click_button('login')
learn.login(admin_name,admin_password)
if learn.verify_auth_user('admin')
puts "auth user verified"
else
puts "auth not verified"
end
learn.logout
sleep(5)
learn.click_button('login')
learn.login(student_name,student_password)
# if learn.verify_auth_user('student')
# puts "auth user verified"
# else
# puts "auth not verified"
# end
learn.logout
sleep(5)
learn.click_button('login')
learn.login(teacher_name,teacher_password)
if learn.verify_auth_user('teacher')
puts "auth user verified"
else
puts "auth not verified"
end
learn.logout
sleep(5)
learn.teardown