mirror of
https://github.com/thoughtbot/capybara-webkit
synced 2023-03-27 23:22:28 -04:00
Set viewport size so overflow hidden doesn't always hide content
This commit is contained in:
parent
714d880ec3
commit
8d2251de38
2 changed files with 30 additions and 3 deletions
|
@ -1022,6 +1022,32 @@ describe Capybara::Driver::Webkit do
|
|||
end
|
||||
end
|
||||
|
||||
context "css overflow app" do
|
||||
before(:all) do
|
||||
@app = lambda do |env|
|
||||
body = <<-HTML
|
||||
<html>
|
||||
<head>
|
||||
<style type="text/css">
|
||||
#overflow { overflow: hidden }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="overflow">Overflow</div>
|
||||
</body>
|
||||
</html>
|
||||
HTML
|
||||
[200,
|
||||
{ 'Content-Type' => 'text/html', 'Content-Length' => body.length.to_s },
|
||||
[body]]
|
||||
end
|
||||
end
|
||||
|
||||
it "handles overflow hidden" do
|
||||
subject.find("//div[@id='overflow']").first.text.should == "Overflow"
|
||||
end
|
||||
end
|
||||
|
||||
context "javascript redirect app" do
|
||||
before(:all) do
|
||||
@app = lambda do |env|
|
||||
|
|
|
@ -20,6 +20,7 @@ WebPage::WebPage(QObject *parent) : QWebPage(parent) {
|
|||
this, SLOT(frameCreated(QWebFrame *)));
|
||||
connect(this, SIGNAL(unsupportedContent(QNetworkReply*)),
|
||||
this, SLOT(handleUnsupportedContent(QNetworkReply*)));
|
||||
this->setViewportSize(QSize(1680, 1050));
|
||||
}
|
||||
|
||||
void WebPage::setCustomNetworkAccessManager() {
|
||||
|
|
Loading…
Reference in a new issue