@@ -119,9 +119,26 @@ TestStartupAndBehavior::~TestStartupAndBehavior()
119
119
//
120
120
}
121
121
122
+ /*
123
+ &id,
124
+ // set values
125
+ setFirstAccess, setOpenFile, ApplicationData::EUserType setUserType,
126
+ // -- expected
127
+ AskUserTypePanel, expectedOpenGuidedPanel, AskVisDetailsTypePanel,
128
+ ShowWelcome, OpenFile, panelUserType,
129
+ Test User Argument Access Ask User TyPanel(s) Run
130
+ 6 Basic *** Following No Operations ***
131
+ 7 Basic Open File Following No Operations Open File
132
+ */
133
+
122
134
bool TestStartupAndBehavior::testFast ()
123
135
{
124
- return testUnit ();
136
+ if (!checkStartupAction (" 6" , false , false , ApplicationData::UserTypeGuided,
137
+ false , true , false , false , false , ApplicationData::UserTypeGuided,
138
+ ApplicationData::UserTypeGuided )) {
139
+ return false ;
140
+ }
141
+ return true ;
125
142
}
126
143
127
144
/* *
@@ -149,31 +166,31 @@ bool TestStartupAndBehavior::testUnit()
149
166
return false ;
150
167
}
151
168
if (!checkStartupAction (" 2" , false , false , ApplicationData::UserTypeExpert,
152
- false , false , false , false , true , ApplicationData::UserTypeExpert,
169
+ false , false , false , true , false , ApplicationData::UserTypeExpert,
153
170
ApplicationData::UserTypeExpert )) {
154
171
return false ;
155
172
}
156
173
if (!checkStartupAction (" 3" , false , true , ApplicationData::UserTypeExpert,
157
- false , false , false , true , false , ApplicationData::UserTypeExpert,
174
+ false , false , false , false , true , ApplicationData::UserTypeExpert,
158
175
ApplicationData::UserTypeExpert )) {
159
176
return false ;
160
177
}
161
- if (!checkStartupAction (" 4" , true , false , ApplicationData::UserTypeExpert ,
178
+ if (!checkStartupAction (" 4" , true , false , ApplicationData::UserTypeGuided ,
162
179
true , true , false , false , false , ApplicationData::UserTypeGuided,
163
180
ApplicationData::UserTypeGuided )) {
164
181
return false ;
165
182
}
166
- if (!checkStartupAction (" 5" , true , true , ApplicationData::UserTypeExpert ,
183
+ if (!checkStartupAction (" 5" , true , true , ApplicationData::UserTypeGuided ,
167
184
true , true , false , false , true , ApplicationData::UserTypeGuided,
168
185
ApplicationData::UserTypeGuided )) {
169
186
return false ;
170
187
}
171
- if (!checkStartupAction (" 6" , false , false , ApplicationData::UserTypeExpert ,
188
+ if (!checkStartupAction (" 6" , false , false , ApplicationData::UserTypeGuided ,
172
189
false , true , false , false , false , ApplicationData::UserTypeGuided,
173
190
ApplicationData::UserTypeGuided )) {
174
191
return false ;
175
192
}
176
- if (!checkStartupAction (" 7" , false , true , ApplicationData::UserTypeExpert ,
193
+ if (!checkStartupAction (" 7" , false , true , ApplicationData::UserTypeGuided ,
177
194
false , true , false , false , true , ApplicationData::UserTypeGuided,
178
195
ApplicationData::UserTypeGuided )) {
179
196
return false ;
@@ -199,9 +216,8 @@ bool TestStartupAndBehavior::checkStartupAction(
199
216
}
200
217
if (!setFirstAccess){
201
218
app.data ()->fireUserFirstAccess ();
202
- } else {
203
- app.data ()->setUserType (setUserType);
204
219
}
220
+ app.data ()->setUserType (setUserType);
205
221
206
222
// ----
207
223
StartParams startupParams;
@@ -213,7 +229,7 @@ bool TestStartupAndBehavior::checkStartupAction(
213
229
}
214
230
// ----
215
231
// check set values
216
- if (! app.data ()->isUserFirstAccess () != setFirstAccess) {
232
+ if (app.data ()->isUserFirstAccess () != setFirstAccess) {
217
233
return error (QString (" id:%1 wrong first access, expected %2" ).arg (id).arg (setFirstAccess));
218
234
}
219
235
if (!setFirstAccess) {
@@ -239,6 +255,7 @@ bool TestStartupAndBehavior::checkStartupAction(
239
255
expected.panelUserType = panelUserType ;
240
256
// ----
241
257
FakeStartActionsExecutor executor (app.data ());
258
+ executor._data .panelUserType = setUserType ;
242
259
StartActionsEngine engine ( app.data (), &executor);
243
260
engine.execute (startupParams);
244
261
if (!checkExpectedStartupResults (&executor._data , &expected)) {
0 commit comments