-
Notifications
You must be signed in to change notification settings - Fork 2
/
81-fill-out-test.patch
122 lines (117 loc) · 3.99 KB
/
81-fill-out-test.patch
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
fill-out-test
From: Bryan Larsen <[email protected]>
Now go ahead and fill out your test.
---
test/selenium/populate.rsel | 104 +++++++++++++++++++++++++++++++++++++++++++
1 files changed, 104 insertions(+), 0 deletions(-)
create mode 100644 test/selenium/populate.rsel
diff --git a/test/selenium/populate.rsel b/test/selenium/populate.rsel
new file mode 100644
index 0000000..f265965
--- /dev/null
+++ b/test/selenium/populate.rsel
@@ -0,0 +1,104 @@
+# -*- coding: utf-8 -*-
+
+include_partial "setup_fixture_set", :set => "blank"
+open "/"
+
+# create Test User
+click "link=Sign up"
+wait_for_page_to_load "30000"
+type "user_name", "Test User"
+type "user_email_address", "[email protected]"
+type "user_password", "test"
+type "user_password_confirmation", "test"
+click "//input[@value='Signup']"
+wait_for_page_to_load "30000"
+verify_text_present "Thanks for signing up!"
+click_and_wait "id=activation-link"
+click_and_wait "//input[@value='Activate']"
+click_and_wait "link=Log in"
+type "login", "[email protected]"
+type "password", "test"
+click_and_wait "//input[@value='Log in']"
+verify_text_present "You have logged in."
+verify_text_present "New Project"
+
+# create First Project/Story/Task
+click_and_wait "link=New Project"
+type "project_name", "First Project"
+click_and_wait "//input[@value='Create Project']"
+verify_text_present "The project was created successfully"
+click_and_wait "link=New Story"
+type "story_title", "First Story"
+type "story[body]", "First Story"
+click_and_wait "//input[@value='Create Story']"
+type "task_description", "First Task"
+select "css=div.task-users select", "label=Test User"
+click_and_wait "//input[@value='Add']"
+wait_for_text_present "The task was created successfully"
+
+# create Second User
+click_and_wait "link=Log out"
+click_and_wait "link=Sign up"
+type "user_name", "Second User"
+type "user_email_address", "[email protected]"
+type "user_password", "second"
+type "user_password_confirmation", "second"
+click_and_wait "//input[@value='Signup']"
+verify_text_present "Thanks for signing up!"
+click_and_wait "id=activation-link"
+click_and_wait "//input[@value='Activate']"
+click_and_wait "link=Log in"
+type "login", "[email protected]"
+type "password", "second"
+click_and_wait "//input[@value='Log in']"
+verify_text_present "You have logged in."
+verify_text_present "New Project"
+
+#click_and_wait "link=New Project"
+#type "project_name", "Second Project"
+#click_and_wait "//input[@value='Create Project']"
+
+# switch to Test User
+click_and_wait "link=Log out"
+click_and_wait "link=Log in"
+type "login", "[email protected]"
+type "password", "test"
+click_and_wait "//input[@value='Log in']"
+verify_text_present "Logged in as Test User"
+
+# add Second User to First Task
+click_and_wait "link=First Project"
+click_and_wait "link=First Story"
+# FIXME: better selector
+click_and_wait "link=Edit"
+select "css=div.task-users select", "label=Second User"
+click_and_wait "//input[@value='Save']"
+verify_text_present "Assigned users: Test User, Second User"
+
+# define statuses -- only available to administrator
+#click_and_wait "link=Story Statuses"
+#click_and_wait "link=New Story Status"
+#type "story_status_name", "discussion"
+#click_and_wait "//input[@value='Create Story Status']"
+#verify_text_present "There is 1 Story Status"
+#click_and_wait "link=New Story Status"
+#type "story_status_name", "implementation"
+#click_and_wait "//input[@value='Create Story Status']"
+#verify_text_present "There are 2 Story Statuses"
+
+# add status to First Story
+click_and_wait "link=Home"
+click_and_wait "link=First Project"
+click_and_wait "link=First Story"
+watch_ajax_requests
+select "css=select.story_status", "label=discussion"
+#wait_for_visible "css=div.ajax-progress"
+#wait_for_not_visible "css=div.ajax-progress"
+wait_for_ajax_request 5000
+click_and_wait "link=« First Project"
+verify_text "css=span.story-status-name", "discussion"
+
+# check filtering
+select_and_wait "status", "label=implementation"
+verify_text_present "No stories match your criteria"
+