Skip to content

Commit f57e709

Browse files
committed
Fix autosync test
1 parent 8b6000b commit f57e709

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

app/test/testmerginapi.cpp

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2365,25 +2365,25 @@ void TestMerginApi::testAutosync()
23652365
// 2. allow autosync controller
23662366
// 3. load the project
23672367
// 4. make some changes in the project
2368-
// 5. make sure autosync controller triggers that data has changed
2368+
// 5. mock UI form done trigger for autosync
23692369
//
23702370

2371-
QString projectname = QStringLiteral( "testAutosync" );
2372-
QString projectdir = QDir::tempPath() + "/" + projectname;
2373-
QString projectfilename = "quickapp_project.qgs";
2371+
QString projectName = QStringLiteral( "testAutosync" );
2372+
QString projectDir = QDir::tempPath() + "/" + projectName;
2373+
QString projectFilename = QStringLiteral( "quickapp_project.qgs" );
23742374

2375-
InputUtils::cpDir( TestUtils::testDataDir() + "/planes", projectdir );
2375+
InputUtils::cpDir( TestUtils::testDataDir() + QStringLiteral( "/planes" ), projectDir );
23762376

23772377
MapThemesModel mtm;
23782378
AppSettings as;
23792379
ActiveLayer al;
23802380
ActiveProject activeProject( as, al, mApi->localProjectsManager() );
23812381

2382-
mApi->localProjectsManager().addLocalProject( projectdir, projectname );
2382+
mApi->localProjectsManager().addLocalProject( projectDir, projectName );
23832383

23842384
as.setAutosyncAllowed( true );
23852385

2386-
QVERIFY( activeProject.load( projectdir + "/" + projectfilename ) );
2386+
QVERIFY( activeProject.load( projectDir + QStringLiteral( "/" ) + projectFilename ) );
23872387
QVERIFY( activeProject.localProject().isValid() );
23882388

23892389
QSignalSpy syncSpy( &activeProject, &ActiveProject::syncActiveProject );
@@ -2403,6 +2403,7 @@ void TestMerginApi::testAutosync()
24032403
QSignalSpy changesSpy( autosyncController, &AutosyncController::projectSyncRequested );
24042404

24052405
planes->commitChanges();
2406+
autosyncController->syncLayerChange();
24062407

24072408
QVERIFY( changesSpy.count() );
24082409
QVERIFY( syncSpy.count() );

0 commit comments

Comments
 (0)