superbara 0.14.5 → 0.14.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0e20f482b6b307cc7597d7affd3ff907e02ca945442b0633d9e7c3d6fcc39573
4
- data.tar.gz: '08cd1d74b997fe51ee782cf1ce8748bdc4cc862986fc4e792556856b6064e09b'
3
+ metadata.gz: 4a218d047926f409658348d79a6f33bc7a464936d2d2fa48d4c2502ac3d3a53a
4
+ data.tar.gz: e97d0c934fe411307319c4f6b90273166bc76f40728a3b14dd73e0b0e9977763
5
5
  SHA512:
6
- metadata.gz: d0689ef350aa56f15e9da0d23e8c8c618098a777f83637cd83484791029e4a45203ebc5b09570b47e46e283d9fafb028fc4e180e115a100a5128fc52979548bd
7
- data.tar.gz: 7883de5ab4df621dcd45e773b3063b8d0f1e8ec163c3bdf60172f4c98587f9e40e415914a882907e71df469fb3163e9d2395a470300c3add3c1428fa0c8e15f8
6
+ metadata.gz: a1d396507c1b49d56de705f1c9bb86929759ccc94fa060321cbb6a3dc12f456a269ca788ab1734af3403c48a86b749582dfd63682ecb4f00bcef581fc9a36e83
7
+ data.tar.gz: 158ec794408ab26b4fc93305c7a7044aa9570e2b1f710d5ad72279e683d54c35472d258f41b901f4a565687395440dd1f7f6dd50fd8d882a1a0ccd84384d7aab
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- superbara (0.14.5)
4
+ superbara (0.14.6)
5
5
  astrolabe (~> 1.3, >= 1.3.1)
6
6
  binding_of_caller (~> 0.8, >= 0.8.0)
7
7
  capybara (~> 3.1, >= 3.1.0)
data/lib/superbara/dsl.rb CHANGED
@@ -396,11 +396,33 @@ return Array.from(
396
396
  end
397
397
 
398
398
  def fullscreen(full=true)
399
+ platform = RUBY_PLATFORM
399
400
  if full
400
- page.driver.fullscreen_window current_window.handle
401
+ if platform.downcase.include? 'linux'
402
+ page.driver.fullscreen_window current_window.handle
403
+ else
404
+ execute_script <<-FE
405
+ fsbutton = document.createElement('button');
406
+ fsbutton.id = 'fsbutton';
407
+ fsbutton.style.width = "10px";
408
+ fsbutton.style.height = "5px";
409
+ document.body.appendChild(fsbutton);
410
+ fsbutton.addEventListener('click', function () { document.body.webkitRequestFullScreen(); });
411
+ FE
412
+
413
+ begin
414
+ click '#fsbutton'
415
+ rescue
416
+ end
417
+
418
+ execute_script <<-FE
419
+ fsbutton = document.getElementById('fsbutton')
420
+ document.body.removeChild(fsbutton)
421
+ FE
422
+ end
401
423
  else
402
424
  page.driver.maximize_window current_window.handle
403
425
  end
404
- end
405
426
 
427
+ end
406
428
  end; end
@@ -1,3 +1,3 @@
1
1
  module Superbara
2
- VERSION = "0.14.5"
2
+ VERSION = "0.14.6"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: superbara
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.14.5
4
+ version: 0.14.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matti Paksula
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-10-30 00:00:00.000000000 Z
11
+ date: 2018-11-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: colorize
@@ -464,7 +464,6 @@ files:
464
464
  - tests/tags/notags.rb
465
465
  - tests/tags/simple.rb
466
466
  - vendor/chromedriver/linux64/.gitkeep
467
- - vendor/chromedriver/linux64/btw chromedriver manually copy-pasted here
468
467
  - vendor/chromedriver/linux64/chromedriver
469
468
  - vendor/chromedriver/mac64/.gitkeep
470
469
  - vendor/chromedriver/mac64/chromedriver