1
0
Fork 0
mirror of https://github.com/thoughtbot/capybara-webkit synced 2023-03-27 23:22:28 -04:00

Merge pull request #1035 from twalpole/font_fix

Only override font in Qt versions where it's needed
This commit is contained in:
Thomas Walpole 2017-11-03 15:08:03 -07:00 committed by GitHub
commit c92a2347c6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View file

@ -2069,14 +2069,17 @@ describe Capybara::Webkit::Driver do
end
it "ignores custom fonts" do
skip "font replacement not needed for QT >= 5" unless driver.version =~ /Qt: 4/
expect(font_family).to eq "Arial"
end
it "ignores custom fonts before an element" do
skip "font replacement not needed for QT >= 5" unless driver.version =~ /Qt: 4/
expect(font_family).to eq "Arial"
end
it "ignores custom fonts after an element" do
skip "font replacement not needed for QT >= 5" unless driver.version =~ /Qt: 4/
expect(font_family).to eq "Arial"
end
end

View file

@ -25,7 +25,10 @@ WebPage::WebPage(WebPageManager *manager, QObject *parent) : QWebPage(parent) {
setForwardUnsupportedContent(true);
loadJavascript();
setUserStylesheet();
#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
setUserStylesheet();
#endif
this->setCustomNetworkAccessManager();