Welcome to mirror list, hosted at ThFree Co, Russian Federation.

test.piwik.index.xml « level0 « testcases « webtest « tests - github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: e2b3e4e8ecf619c53af0c0aeb9cd21eb34faa1c2 (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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE project [
  <!ENTITY time  SYSTEM "../modules/time.xml">
  <!ENTITY checkForErrors SYSTEM "../modules/errors.xml">
  <!ENTITY verifyLinksAndImages SYSTEM "../modules/common_pages.xml">
  <!ENTITY raquo "&#187;">
  <!ENTITY rsaquo "&#8250;" >
]>

<project name="Smoke test level0 - deploy test" basedir="."	default="webtest">
		&time;
		<target name="webtest">
			<webtest name="install index">
	            <steps>
	            
	            	<echo>Piwik install - dbsetup: db.name: ${db.name}</echo>
					<sql
						    driver="com.mysql.jdbc.Driver"
						    url="jdbc:mysql://${db.host}:${db.port}/"
						    userid="${db.username}"
						    password="${db.password}"
						    >
						   	<classpath>
						    	<pathelement location="${basedir}/../lib/java/mysql-connector-java-5.1.7.jar" />
					    	</classpath>		
							<transaction>
								DROP DATABASE IF EXISTS ${db.name};
							</transaction>
							<transaction>
								CREATE DATABASE IF NOT EXISTS ${db.name};
							</transaction>
					</sql>	            
	            
	                <invoke description="get account index" url="/" />
	                
	                <!-- 1. welcome -->
	                
	                <verifyTitle description="check the title is parsed correctly" text="Piwik &rsaquo; Installation" />
	                <verifyText description="check page text" text="Piwik" />
	                <verifyText description="check page text" text="Welcome!" />
	                <verifyText description="check page text" text="This process is split up into 9 easy steps and will take around 5 minutes" />

	            	&checkForErrors;
	            	&verifyLinksAndImages;
	            
	            	<clickLink description="click 'Next'" label="Next &raquo;" />
	            	
	            	<!-- 2. systemCheck -->
	            	
	            	<verifyTitle description="check the title is parsed correctly" text="Piwik &rsaquo; Installation" />
					<verifyText description="check page text" text="Piwik" />
	                <verifyText description="check page text" text="System check" />
	                <verifyText description="check page text" text="Optional" />
	                
	            	&checkForErrors;
	            	&verifyLinksAndImages;
	            	
	            	<not description="check if system check passed">
	            		<verifyXPath description="looking for error image" xpath="//img[@src='themes/default/images/error.png']"/>
	            	</not>
	            	
	            	<verifyXPath description="looking for ok image" xpath="//img[@src='themes/default/images/ok.png']"/>
	            	
	            	<clickLink description="click 'Next'" label="Next &raquo;" />
	            	
	            	<!-- 3. databaseSetup -->

	            	<verifyTitle description="check the title is parsed correctly" text="Piwik &rsaquo; Installation" />
					<verifyText description="check page text" text="Piwik" />
	                <verifyText description="check page text" text="Database setup" />
	                
	            	&checkForErrors;
	            	&verifyLinksAndImages;
					
					<setInputField description="set database host (and port)" name="host" value="${db.host}:${db.port}" />
	                <setInputField description="set database username" name="username" value="${db.username}" />
					<setInputField description="set database password" name="password" value="${db.password}" />
					<setInputField description="set database name" name="dbname" value="${db.name}" />
					<setInputField description="set database port" name="tables_prefix" value="canoo_" />
					
					<clickButton description="click 'Go!' button" label="Go!"/>
					
	            	<!-- 4. databaseCheck -->
<!--	            	
	            	<verifyTitle description="check the title is parsed correctly" text="Piwik &rsaquo; Installation" />
					<verifyText description="check page text" text="Piwik" />
	                <verifyText description="check page text" text="Database check" />
	                
	            	&checkForErrors;
	            	&verifyLinksAndImages;

	            	<clickLink description="click 'Next'" label="Next &raquo;" />
-->
	            	
					<!-- 5. tablesCreation -->
					
	            	<not description="check if no error">
	            		<verifyXPath description="looking for error image" xpath="//img[@src='themes/default/images/error_medium.png']"/>
	            	</not>
					
	            	<not description="check if no warning">
	            		<verifyXPath description="looking for warning image" xpath="//img[@src='themes/default/images/warning_medium.png']"/>
	            	</not>
	            	
	            	<verifyTitle description="check the title is parsed correctly" text="Piwik &rsaquo; Installation" />
					<verifyText description="check page text" text="Piwik" />
					<verifyText description="check page text" text="Tables created with success!" />
					<verifyXPath description="looking for success image" xpath="//img[@src='themes/default/images/success_medium.png']"/>
					
	            	&checkForErrors;
	            	&verifyLinksAndImages;
					
					<clickLink description="click 'Next'" label="Next &raquo;" />
					
					<!-- 6. generalSetup -->
					
	            	<verifyTitle description="check the title is parsed correctly" text="Piwik &rsaquo; Installation" />
					<verifyText description="check page text" text="Piwik" />
					<verifyText description="check page text" text="General Setup" />
					
	            	&checkForErrors;
	            	&verifyLinksAndImages;
					
					<setInputField description="set Piwik login" name="login" value="piwik_login" />
					<setInputField description="set Piwik password" name="password" value="piwik_password" />
					<setInputField description="set repeated Piwik password" name="password_bis" value="piwik_password" />
					<setInputField description="set Piwik email" name="email" value="nobody@piwik.org" />
					
					<clickButton description="click 'Go!' button" label="Go!"/>
					
					<!-- 7. firstWebsiteSetup -->
					
	            	<not description="check if no error">
	            		<verifyXPath description="looking for error image" xpath="//img[@src='themes/default/images/error_medium.png']"/>
	            	</not>
					
	            	<not description="check if no warning">
	            		<verifyXPath description="looking for warning image" xpath="//img[@src='themes/default/images/warning_medium.png']"/>
	            	</not>
				
	            	<verifyTitle description="check the title is parsed correctly" text="Piwik &rsaquo; Installation" />
					<verifyText description="check page text" text="Piwik" />
					<verifyText description="check page text" text="Setup a website" />
					
	            	&checkForErrors;
	            	&verifyLinksAndImages;
					
					<setInputField description="set Piwik site name" name="siteName" value="Dummy Site Name" />
					<setInputField description="set Piwik URL" name="url" value="${wt.config.protocol}://${wt.config.host}:${wt.config.port}${wt.config.basepath}" />
					<setSelectField description="set Piwik timezone" name="timezone" value="UTC" />

					<clickButton description="click 'Go!' button" label="Go!"/>
					
					<!-- 8. displayJavascriptCode -->
					
	            	<not description="check if no error">
	            		<verifyXPath description="looking for error image" xpath="//img[@src='themes/default/images/error_medium.png']"/>
	            	</not>
					
	            	<not description="check if no warning">
	            		<verifyXPath description="looking for warning image" xpath="//img[@src='themes/default/images/warning_medium.png']"/>
	            	</not>

	            	<verifyTitle description="check the title is parsed correctly" text="Piwik &rsaquo; Installation" />
					<verifyText description="check page text" text="Piwik" />
					<verifyText description="check page text" text="JavaScript tag" />

	            	&checkForErrors;
	            	&verifyLinksAndImages;
	            	
	            	<clickLink description="click 'Next'" label="Next &raquo;" />
	            	
	            	<!-- 9. finished -->
	            	
	            	<verifyTitle description="check the title is parsed correctly" text="Piwik &rsaquo; Installation" />
					<verifyText description="check page text" text="Piwik" />
					<verifyText description="check page text" text="Congratulations" />
					
					&checkForErrors;
	            	&verifyLinksAndImages;
					
					<clickLink description="click 'Continue to Piwik'" label="Continue to Piwik &raquo;" />
	            	
	            	<!-- logging in -->
	            	
	            	<verifyTitle description="check the title is parsed correctly" text="Piwik &rsaquo; Sign in" />
					<verifyText description="check page text" text="Piwik" />
					<verifyText description="check page text" text="Lost your password?" />
					
					&checkForErrors;
	            	&verifyLinksAndImages;
					
					<setInputField description="set Piwik login" htmlId="form_login" value="piwik_login" />
					<setInputField description="set Piwik password" htmlId="form_password" value="piwik_password" />

					<clickButton description="click 'Sign in' button" label="Sign in"/>
					
					<!-- logged in -->
					
	            	<verifyTitle description="check the title is parsed correctly" text="Piwik &rsaquo; Web Analytics Reports" />
	            	<verifyText description="check page text" text="Piwik" />
					<verifyText description="check page text" text="Dashboard" />
					<verifyText description="check page text" text="Hello" />

	            </steps>
	        </webtest>
	</target>
</project>