@@ -31,6 +31,11 @@ TestConfig::~TestConfig()
31
31
{
32
32
}
33
33
34
+ bool TestConfig::testFast ()
35
+ {
36
+ return testResetBeahviorData ();
37
+ }
38
+
34
39
bool TestConfig::testUnit ()
35
40
{
36
41
_testName = " testUnit" ;
@@ -174,6 +179,11 @@ bool TestConfig::testResetBeahviorData()
174
179
Config::saveBool (Config::KEY_ELEMENT_EDIT_SHORTCUT_USED, true );
175
180
Config::saveBool (Config::KEY_ELEMENT_EDIT_MODEFORM_MODIFIED, true );
176
181
Config::saveBool (Config::KEY_ELEMENT_EDIT_TYPE_DIALOG_SHOWN, true );
182
+ Config::saveBool (Config::KEY_USERPROFILING_GUIDED, true );
183
+ Config::saveBool (Config::KEY_USERPROFILING_FIRSTUSE, false );
184
+ app.data ()->incrementElementDoubleClickedCount ();
185
+ app.data ()->setElementEditedAsTextCount (1 );
186
+ app.data ()->setElementEditedAsFormCount (1 );
177
187
178
188
app.data ()->resetBehaviorData ();
179
189
if (!checkBoolSetting (Config::KEY_ELEMENT_EDIT_SHORTCUT_DIALOG_SHOWN, false ) ) {
@@ -188,6 +198,22 @@ bool TestConfig::testResetBeahviorData()
188
198
if (!checkBoolSetting (Config::KEY_ELEMENT_EDIT_TYPE_DIALOG_SHOWN, false ) ) {
189
199
return false ;
190
200
}
201
+ if (!checkBoolSetting (Config::KEY_USERPROFILING_GUIDED, false ) ) {
202
+ return false ;
203
+ }
204
+ if (!checkBoolSetting (Config::KEY_USERPROFILING_FIRSTUSE, true ) ) {
205
+ return false ;
206
+ }
207
+ if (app.data ()->getElementDoubleClickedInSessionCount ()!=0 ) {
208
+ return error (QString (" _elementDoubleClickedInSessionCount %1" ).arg (app.data ()->getElementDoubleClickedInSessionCount ()));
209
+ }
210
+ if (app.data ()->getElementEditedAsTextCount ()!=0 ) {
211
+ return error (QString (" _elementEditedAsTextCount %1" ).arg (app.data ()->getElementEditedAsTextCount ()));
212
+ }
213
+ if (app.data ()->getElementEditedAsFormCount ()!=0 ) {
214
+ return error (QString (" _elementEditedAsFormCount %1" ).arg (app.data ()->getElementEditedAsFormCount ()));
215
+ }
216
+
191
217
return true ;
192
218
}
193
219
@@ -312,6 +338,6 @@ bool TestConfig::testResetData()
312
338
if (!testOpenChooseEditTypeDialog ()) {
313
339
return false ;
314
340
}
315
- return error ( " nyi " ) ;
341
+ return true ;
316
342
}
317
343
0 commit comments