Skip to content
Permalink
Browse files
More robust test for numeric scale bar
  • Loading branch information
nyalldawson committed Apr 26, 2017
1 parent b40bc0c commit fa21311e4cc0bd02d745bd74dff088e059e2e985
@@ -179,11 +179,19 @@ void TestQgsComposerScaleBar::doubleBox()

void TestQgsComposerScaleBar::numeric()
{
QFont f = mComposerScaleBar->font();

QFont newFont = QgsFontUtils::getStandardTestFont( QStringLiteral( "Bold" ) );
newFont.setPointSizeF( 12 );
mComposerScaleBar->setFont( newFont );

mComposerScaleBar->setStyle( QStringLiteral( "Numeric" ) );
mComposerScaleBar->setSceneRect( QRectF( 20, 180, 50, 20 ) );
QgsCompositionChecker checker( QStringLiteral( "composerscalebar_numeric" ), mComposition );
checker.setControlPathPrefix( QStringLiteral( "composer_scalebar" ) );
QVERIFY( checker.testComposition( mReport, 0, 0 ) );
bool result = checker.testComposition( mReport, 0, 0 );
mComposerScaleBar->setFont( f );
QVERIFY( result );
}

void TestQgsComposerScaleBar::tick()
Binary file not shown.
Binary file not shown.

0 comments on commit fa21311

Please sign in to comment.