-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp-tests-report.tex
217 lines (208 loc) · 9.82 KB
/
app-tests-report.tex
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
210
211
212
213
214
215
216
217
\chapter{Unit Tests}
\label{chap:app-unittests}
\begin{singlespace}
\section*{Unit testing UI directive}
\begin{enumerate}
\item inline type property: should have type defined
\item width
\begin{enumerate}
\item should have the class hide
\item should set the property to 42 for the default (language-independent)
\item should set the property to 40 for Catalan and 42 for French
\item should set the property to 40 for Catalan, 42 for French and 20 for default
\item should not set any property
\item (inline) should set the property to 42 for the default (language-independent)
\end{enumerate}
\item height
\begin{enumerate}
\item should have the class hide
\item should set the property to 42 for the default (language-independent)
\item should set the property to 40 for Catalan and 42 for French
\item should set the property to 40 for Catalan, 42 for French and 20 for default
\item should not set the property
\item (inline) should set the property to 42 for the default language
\end{enumerate}
\item x
\begin{enumerate}
\item should have the class hide
\item should set the property to 42 for the default language
\item should set the property to 40 for Catalan and 42 for French
\item should set the property to 40 for Catalan, 42 for French and 20 for default
\item should not set the property
\item (inline) should set the property to 42 for the default language
\end{enumerate}
\item y
\begin{enumerate}
\item should have the class hide
\item should set the property to 42 for the default language
\item should set the property to 40 for Catalan and 42 for French
\item should set the property to 40 for Catalan, 42 for French and 20 for default
\item should not set the property
\item (inline) should set the property to 42 for the default language
\end{enumerate}
\item src
\begin{enumerate}
\item should have the class hide
\item should set the property to "dummy string" for the default language
\item should set the property to 40 for Catalan and 42 for French
\item should set the property to 40 for Catalan, 42 for French and 20 for default
\item should not set the property
\item (inline) should set the property to 42 for the default language
\end{enumerate}
\item style
\begin{enumerate}
\item should have the class hide
\item should set scope.classes.ui to "whatever" and scope.classes.style to "nice"
\item (inline) should set scope.classes.ui to "whatever" and scope.classes.style to "nice"
\end{enumerate}
\item flCaption
\begin{enumerate}
\item should have the class hide
\item should write "dummy string" for default language (and nothing else)
\item should set English caption to "dummy string"
\end{enumerate}
\item layover
\begin{enumerate}
\item should have the class hide
\item should add the overlay property empty
\item should add the overlay property with width, height and src
\item should add the overlay property with inline width, height and src
\end{enumerate}
\item goto: should read the parameters
\item external call: should read the parameters
\item set language: should read the language
\item open popup: should read the code of the popup
\item background
\begin{enumerate}
\item should read the parameters
\item should read the inline parameters
\end{enumerate}
\end{enumerate}
\section*{Unit testing UI directive -- ambiguity}
\begin{enumerate}
\item (width) should use inner value (20) instead of inline value (10)
\item (height) should use inner value (20) instead of inline (10)
\item (x) should use inner value (20) instead of inline (10)
\item (y) should use inner value (20) instead of inline (10)
\item (src) should use inner value ("dummy string") instead of inline ("smart string")
\item (palStyle) should give inner value ("nice") higher priority than inline ("ugly")
\item (palStyle) should give inner values ("big" and "red") higher priority than inline ("ugly")
\end{enumerate}
\section*{Unit testing UI Components directives}
\begin{enumerate}
\item subscreen
\begin{enumerate}
\item should always be transformed to \textless fl:ui fl:subscreen\textgreater
\item should include a screen file (always uses filename screens/99.xml here) in the inner div
\item should add a <div\textgreater with at least the subscreen css class
\end{enumerate}
\item img
\begin{enumerate}
\item should be transformed to \textless fl:ui fl:img\textgreater
\item should be replaced with \textless img\textgreater
\item should set the ng-src attribute in \textless img\textgreater
\end{enumerate}
\item button
\begin{enumerate}
\item should be transformed to \textless fl:ui fl:button\textgreater
\item should be replaced with \textless a\textgreater\textless div class="fl-overlay"\textgreater\textless /div\textgreater\textless div class="caption-container"\textgreater\textless /div\textgreater\textless /a\textgreater
\end{enumerate}
\item textarea
\begin{enumerate}
\item should be transformed to \textless fl:ui fl:textarea\textgreater
\item should be replaced with \textless div\textgreater\textless /div\textgreater
\end{enumerate}
\item video: should be transformed to \textless fl:ui video\textgreater
\end{enumerate}
\section*{Unit testing UI subscreen with real palSettings}
\begin{enumerate}
\item should include the file for route /root/pal/reem-video (98.xml) in the inner div
\end{enumerate}
\section*{Unit testing: Testing modules and dependencies}
\begin{enumerate}
\item Reemi Module:
\begin{enumerate}
\item should be registered
\item Dependencies:
\begin{enumerate}
\item should have reemi.ui as a dependency
\item should have reemi.uicomponents as a dependency
\item should have reemi.utils as a dependency
\item should have reemi.theme.default as a dependency
\item should have reemi.services.palSettings as a dependency
\item should have reemi.services.palProperties as a dependency
\item should have reemi.services.palUri as a dependency
\end{enumerate}
\end{enumerate}
\end{enumerate}
\section*{palProperties Service}
\begin{enumerate}
\item should return a sanitized number
\item should return a sanitized string
\item should have transformed a set of flango properties to CSS
\item should create a data structure to store properties
\item should set a property in the specified language
\item should set a language-independent property
\item should get a property in the current language, or fallback to the language-independent property
\end{enumerate}
\section*{palSettings Service}
\begin{enumerate}
\item generic configuration method
\begin{enumerate}
\item getShowCursor() should return true
\item getPerformCallbacks() should return false
\item getReportStats() should return true
\item getSecurityLevel() should return 2
\item getDebugLevel() should return "ALL"
\item getDebugMode() should return true
\item getScreenTransitions() should return false
\item getSessionTimeout() should return 999999999
\item getPerformanceMonitor() should return false
\item getApiEndpoint() should return "/flango-api-0.1"
\item getDefaultApiEndpoint() should return "/static/frontend/content"
\item getStaticApiEndpoint() should return "content"
\item getThemesPath() should return "/static/frontend/themes"
\item getStaticThemesPath() should return "themes"
\item getMediaPath() should return "/static/media"
\item getStaticMediaPath() should return "content/assets"
\end{enumerate}
\item app configuration method
\begin{enumerate}
\item getAppId() should return 13
\item getAppName() should return Barcelona
\item getAppLanguages() should return array of languages
\item getAppDefaultLanguage() should return "en"
\item getAppInitialNode() should return "/root/main-menu"
\item getAppHomeNode() should return "/root/main-menu"
\item getAppThemes() should return array of themes
\item getAppDefaultTheme() should return the name of the default theme
\end{enumerate}
\item routes
\begin{enumerate}
\item should set 24 routes
\item should define at least the routes declared in the response json file
\item should define a default route
\end{enumerate}
\item other methods
\begin{enumerate}
\item getCurrentLanguage() should return the default language
\item setCurrentLanguage(ca) should set current language to ca
\item getScreenFile should find the correct file (using the api endpoint)
\item getScreenFile should find the correct file (with url params)
\end{enumerate}
\item initialization
\begin{enumerate}
\item should load the configuration and structure for appid 13 (exists)
\item should load the default contents when app\_id is wrong
\end{enumerate}
\end{enumerate}
\section*{palUri Service}
\begin{enumerate}
\item should get the root when trying to make an external call without params
\item should form the url for an external call, with params
\item should open the external call url in a new tab
\item should not open the external call url in a new tab (permission to perform callbacks not granted)
\item should not open the external call url in a new tab (security level is lower than the one set in the configuration)
\item should open the external call url in a new tab (security level is greater or equal than the one set in the configuration)
\end{enumerate}
\end{singlespace}