Skip to content

Commit

Permalink
[tests] Fix failing composerhtml tests, by forcing test html to use a…
Browse files Browse the repository at this point in the history
… set font size in pixels.
  • Loading branch information
nyalldawson committed Dec 28, 2013
1 parent 6aed6fe commit bf407db
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/src/python/test_qgscomposerhtml.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ def testTable(self):
myTestResult, myMessage = checker.testComposition() myTestResult, myMessage = checker.testComposition()


qDebug(myMessage) qDebug(myMessage)
self.mComposition.removeMultiFrame( composerHtml )
composerHtml = None

assert myTestResult, myMessage assert myTestResult, myMessage


def testTableMultiFrame(self): def testTableMultiFrame(self):
Expand Down Expand Up @@ -91,6 +94,10 @@ def testTableMultiFrame(self):
myPage = 2 myPage = 2
checker3 = QgsCompositionChecker('composerhtml_multiframe3', self.mComposition) checker3 = QgsCompositionChecker('composerhtml_multiframe3', self.mComposition)
myTestResult, myMessage = checker3.testComposition( myPage ) myTestResult, myMessage = checker3.testComposition( myPage )

self.mComposition.removeMultiFrame( composerHtml )
composerHtml = None

assert myTestResult, myMessage assert myTestResult, myMessage


def testComposerHtmlAccessor(self): def testComposerHtmlAccessor(self):
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions tests/testdata/html_table.html
Original file line number Original file line Diff line number Diff line change
@@ -1,6 +1,12 @@
<html> <html>
<head> <head>
<link href="bootstrap.css" media="all" rel="stylesheet" type="text/css" /> <link href="bootstrap.css" media="all" rel="stylesheet" type="text/css" />
<style>
.table td {
font-size: 20px;
line-height: 30px;
}
</style>
</head> </head>
<body> <body>
<table class="table table-striped table-bordered condensed"> <table class="table table-striped table-bordered condensed">
Expand Down

0 comments on commit bf407db

Please sign in to comment.