summaryrefslogtreecommitdiffstats
path: root/uitest/src/com/vaadin/tests/applicationcontext/CloseSession.html
blob: eb6e7681e600f8c330092ac3816fe0445f1fd737 (plain)
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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head profile="http://selenium-ide.openqa.org/profiles/test-case">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="selenium.base" href="" />
<title>New Test</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3">New Test</td></tr>
</thead><tbody>
<!--Close, reload and assert there's a new VaadinServiceSession in the old HttpSession-->
<tr>
	<td>open</td>
	<td>/run/com.vaadin.tests.applicationcontext.CloseSession?restartApplication</td>
	<td></td>
</tr>
<tr>
	<td>clickAndWait</td>
	<td>vaadin=runcomvaadintestsapplicationcontextCloseSession::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/VOrderedLayout$Slot[2]/VButton[0]/domChild[0]/domChild[0]</td>
	<td></td>
</tr>
<tr>
	<td>assertText</td>
	<td>vaadin=runcomvaadintestsapplicationcontextCloseSession::PID_SLog_row_2</td>
	<td>exact:4. Same hash as current? false</td>
</tr>
<tr>
	<td>assertText</td>
	<td>vaadin=runcomvaadintestsapplicationcontextCloseSession::PID_SLog_row_0</td>
	<td>exact:6. Same WrappedSession id? true</td>
</tr>
<!--invalidate reload and assert there's a new VaadinServiceSession in a new HttpSession-->
<tr>
	<td>open</td>
	<td>/run/com.vaadin.tests.applicationcontext.CloseSession?restartApplication</td>
	<td></td>
</tr>
<tr>
	<td>clickAndWait</td>
	<td>vaadin=runcomvaadintestsapplicationcontextCloseSession::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/VOrderedLayout$Slot[5]/VButton[0]/domChild[0]/domChild[0]</td>
	<td></td>
</tr>
<tr>
	<td>assertText</td>
	<td>vaadin=runcomvaadintestsapplicationcontextCloseSession::PID_SLog_row_2</td>
	<td>exact:4. Same hash as current? false</td>
</tr>
<tr>
	<td>assertText</td>
	<td>vaadin=runcomvaadintestsapplicationcontextCloseSession::PID_SLog_row_0</td>
	<td>exact:6. Same WrappedSession id? false</td>
</tr>
<!--Test closing session and redirecting to another page-->
<tr>
	<td>clickAndWait</td>
	<td>vaadin=runcomvaadintestsapplicationcontextCloseSession::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VButton[0]/domChild[0]/domChild[0]</td>
	<td></td>
</tr>
<tr>
	<td>assertText</td>
	<td>//h1</td>
	<td>This is a static file</td>
</tr>
<!--Open again and verify we get a Session Expired error if doing something after closing the VaadinSession-->
<tr>
	<td>open</td>
	<td>/run/com.vaadin.tests.applicationcontext.CloseSession?restartApplication</td>
	<td></td>
</tr>
<tr>
	<td>click</td>
	<td>vaadin=runcomvaadintestsapplicationcontextCloseSession::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/VOrderedLayout$Slot[3]/VButton[0]/domChild[0]/domChild[0]</td>
	<td></td>
</tr>
<tr>
	<td>click</td>
	<td>vaadin=runcomvaadintestsapplicationcontextCloseSession::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/VOrderedLayout$Slot[3]/VButton[0]/domChild[0]/domChild[0]</td>
	<td></td>
</tr>
<tr>
	<td>assertText</td>
	<td>vaadin=runcomvaadintestsapplicationcontextCloseSession::Root/VNotification[0]/HTML[0]/domChild[0]</td>
	<td>Session Expired</td>
</tr>
<!--Open again and verify we get a Session Expired error if doing something after closing the HttpSession-->
<tr>
	<td>open</td>
	<td>/run/com.vaadin.tests.applicationcontext.CloseSession?restartApplication</td>
	<td></td>
</tr>
<tr>
	<td>click</td>
	<td>vaadin=runcomvaadintestsapplicationcontextCloseSession::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/VOrderedLayout$Slot[4]/VButton[0]/domChild[0]/domChild[0]</td>
	<td></td>
</tr>
<tr>
	<td>click</td>
	<td>vaadin=runcomvaadintestsapplicationcontextCloseSession::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/VOrderedLayout$Slot[4]/VButton[0]/domChild[0]/domChild[0]</td>
	<td></td>
</tr>
<tr>
	<td>assertText</td>
	<td>vaadin=runcomvaadintestsapplicationcontextCloseSession::Root/VNotification[0]/HTML[0]/domChild[0]</td>
	<td>Session Expired</td>
</tr>
<!--Open again and verify we get a Session Expired error if closing HttpSession in a background thread-->
<tr>
	<td>open</td>
	<td>/run/com.vaadin.tests.applicationcontext.CloseSession?restartApplication</td>
	<td></td>
</tr>
<tr>
	<td>click</td>
	<td>vaadin=runcomvaadintestsapplicationcontextCloseSession::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/VOrderedLayout$Slot[7]/VButton[0]/domChild[0]/domChild[0]</td>
	<td></td>
</tr>
<tr>
	<td>pause</td>
	<td>2000</td>
	<td>2000</td>
</tr>
<tr>
	<td>click</td>
	<td>vaadin=runcomvaadintestsapplicationcontextCloseSession::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/VOrderedLayout$Slot[7]/VButton[0]/domChild[0]/domChild[0]</td>
	<td></td>
</tr>
<tr>
	<td>assertText</td>
	<td>vaadin=runcomvaadintestsapplicationcontextCloseSession::Root/VNotification[0]/HTML[0]/domChild[0]</td>
	<td>Session Expired</td>
</tr>
<!--Open again and test closing session and redirecting to another page-->
<tr>
	<td>open</td>
	<td>/run/com.vaadin.tests.applicationcontext.CloseSession?restartApplication</td>
	<td></td>
</tr>
<tr>
	<td>clickAndWait</td>
	<td>vaadin=runcomvaadintestsapplicationcontextCloseSession::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VButton[0]/domChild[0]/domChild[0]</td>
	<td></td>
</tr>
<tr>
	<td>assertText</td>
	<td>//h1</td>
	<td>This is a static file</td>
</tr>
</tbody></table>
</body>
</html>