superbara 0.13.0 → 0.13.1

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: ab8bf36370219d9cdc7b4519eee57b6a8fed48128f0d41b0e98a450c4cd88357
4
- data.tar.gz: d89410c70aca07dc35dbe3696e53e7c7901f9206a1bcfa438749cb362b0a4547
3
+ metadata.gz: f31bcba1fd4c6852c8a863311d7dadbb69aeed96beb7bdee389b0bcd370d6584
4
+ data.tar.gz: 8ac9d1a6265ba34c71d75bc0f104754f394cb4aa4bf4acd53d2f9be68c524eec
5
5
  SHA512:
6
- metadata.gz: eb4124bad9f79400663e58eba62389c0b7e6dca4fe692dd43703ed90c6890289f0af7f8160e39028138009cebd01f46ac2650287e9e1a91b4b6375e45305355a
7
- data.tar.gz: 0cec8306e977a827ddc049b013c31e89fb1216697e0ca1bc42c070c5ece5f4445a75b93fc3cdd7a685f510286c20b6c2f33e765889e2190ebffd939583a28486
6
+ metadata.gz: 0b93137d586e4d50f2fe346870b2756c25a8273460cea27865ccaae02b5465849677edd66be2e21db134bbc3a7b2b16c21fe79c5b7d13df6fd842228a914f897
7
+ data.tar.gz: fde1367a69c7e0f024ea0ab1e2503c8f3075f6c15c7b961988eeee41b3b2f3b443de81aeeaf368a2a62f729330ab90406d3d7c8f08acf9d6d15621a87f1dcd0f
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- superbara (0.13.0)
4
+ superbara (0.13.1)
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)
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env sh
2
2
  set -e
3
3
  version=$(exe/superbara version)
4
- chromedriver_version=2.38
4
+ chromedriver_version=2.40
5
5
 
6
6
  gem uninstall -a superbara
7
7
 
@@ -1,3 +1,29 @@
1
+ class Capybara::Selenium::Node < Capybara::Driver::Node
2
+ def path
3
+ path = find_xpath(XPath.ancestor_or_self).reverse
4
+
5
+ result = []
6
+ while (node = path.shift)
7
+ parent = path.first
8
+ selector = node.tag_name
9
+ if parent
10
+ siblings = parent.find_xpath(selector)
11
+
12
+ #MONKEY START https://github.com/teamcapybara/capybara/issues/2048
13
+ if selector == "svg" && siblings.size == 0
14
+ siblings = parent.find_xpath "//*[local-name() = 'svg']"
15
+ end
16
+ #MONKEY END
17
+
18
+ selector += "[#{siblings.index(node) + 1}]" unless siblings.size == 1
19
+ end
20
+ result.push selector
21
+ end
22
+
23
+ '/' + result.reverse.join('/')
24
+ end
25
+ end
26
+
1
27
  module Superbara
2
28
  module CapybaraMonkey
3
29
  module Node
@@ -364,6 +364,7 @@ return Array.from(
364
364
  end
365
365
 
366
366
  $__superbara_supress_pry_whereami = true if exception_occurred || disable_whereami
367
+ Superbara.start_did_open_debug=true
367
368
  Pry.start(binding.of_caller(1))
368
369
  end
369
370
  end; end
@@ -1,3 +1,3 @@
1
1
  module Superbara
2
- VERSION = "0.13.0"
2
+ VERSION = "0.13.1"
3
3
  end
@@ -2,3 +2,7 @@ run "vars"
2
2
  run "webapp", {}, once: true
3
3
 
4
4
  visit "#{$test_host}:4567"
5
+
6
+ wait do
7
+ has_text? "Superbara"
8
+ end
@@ -0,0 +1,12 @@
1
+ run "../common"
2
+
3
+ visit '/highcharts.html'
4
+
5
+ wait do
6
+ has_text? "Highcharts"
7
+ end
8
+
9
+ svg = find "svg"
10
+ assert svg.text do
11
+ svg.text.include? "500k"
12
+ end
@@ -0,0 +1,75 @@
1
+ <script src="https://code.highcharts.com/highcharts.js"></script>
2
+ <script src="https://code.highcharts.com/modules/boost.js"></script>
3
+ <script src="https://code.highcharts.com/modules/exporting.js"></script>
4
+
5
+ <div id="container" style="height: 400px; max-width: 800px; margin: 0 auto"></div>
6
+
7
+ <script>
8
+
9
+
10
+ function getData(n) {
11
+ var arr = [],
12
+ i,
13
+ a,
14
+ b,
15
+ c,
16
+ spike;
17
+ for (i = 0; i < n; i = i + 1) {
18
+ if (i % 100 === 0) {
19
+ a = 2 * Math.random();
20
+ }
21
+ if (i % 1000 === 0) {
22
+ b = 2 * Math.random();
23
+ }
24
+ if (i % 10000 === 0) {
25
+ c = 2 * Math.random();
26
+ }
27
+ if (i % 50000 === 0) {
28
+ spike = 10;
29
+ } else {
30
+ spike = 0;
31
+ }
32
+ arr.push([
33
+ i,
34
+ 2 * Math.sin(i / 100) + a + b + c + spike + Math.random()
35
+ ]);
36
+ }
37
+ return arr;
38
+ }
39
+ var n = 500000,
40
+ data = getData(n);
41
+
42
+
43
+ console.time('line');
44
+ Highcharts.chart('container', {
45
+
46
+ chart: {
47
+ zoomType: 'x',
48
+ panning: true,
49
+ panKey: 'shift'
50
+ },
51
+
52
+ boost: {
53
+ useGPUTranslations: true
54
+ },
55
+
56
+ title: {
57
+ text: 'Highcharts drawing ' + n + ' points'
58
+ },
59
+
60
+ subtitle: {
61
+ text: 'Using the Boost module'
62
+ },
63
+
64
+ tooltip: {
65
+ valueDecimals: 2
66
+ },
67
+
68
+ series: [{
69
+ data: data,
70
+ lineWidth: 0.5
71
+ }]
72
+
73
+ });
74
+ console.timeEnd('line');
75
+ </script>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: superbara
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.13.0
4
+ version: 0.13.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matti Paksula
@@ -382,6 +382,7 @@ files:
382
382
  - tests/run/main.rb
383
383
  - tests/run/once.rb
384
384
  - tests/run/value.rb
385
+ - tests/svg/main.rb
385
386
  - tests/tags/block.rb
386
387
  - tests/tags/fails.rb
387
388
  - tests/tags/main.rb
@@ -397,6 +398,7 @@ files:
397
398
  - web/public/2.html
398
399
  - web/public/3.html
399
400
  - web/public/another.html
401
+ - web/public/highcharts.html
400
402
  - web/public/index.html
401
403
  - web/views/layout.erb
402
404
  - web/views/long.erb