superbara 0.13.1 → 0.13.2

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: f31bcba1fd4c6852c8a863311d7dadbb69aeed96beb7bdee389b0bcd370d6584
4
- data.tar.gz: 8ac9d1a6265ba34c71d75bc0f104754f394cb4aa4bf4acd53d2f9be68c524eec
3
+ metadata.gz: b7487d2e51d4923646fe45ed10831859d18e2cd5c7e3743105b599f617fcd8e6
4
+ data.tar.gz: e6c0e8b466193843cfab3d90eb75274cf75a8136771bf60ee269767c9e319cd6
5
5
  SHA512:
6
- metadata.gz: 0b93137d586e4d50f2fe346870b2756c25a8273460cea27865ccaae02b5465849677edd66be2e21db134bbc3a7b2b16c21fe79c5b7d13df6fd842228a914f897
7
- data.tar.gz: fde1367a69c7e0f024ea0ab1e2503c8f3075f6c15c7b961988eeee41b3b2f3b443de81aeeaf368a2a62f729330ab90406d3d7c8f08acf9d6d15621a87f1dcd0f
6
+ metadata.gz: a98d1761785cb40d8dc8419963912f5f5619e54a25ba5e490ef5837f289e235f2f5fee60d4673efe3cb82b18638ca8feea122a6dee0cae893b3b7c944b47b224
7
+ data.tar.gz: b00af5fb684e230af3d713c7c85d61d57d075a26c41d7652344515ef591f885f6c1814e4cb7f3ccd4689dae12193ee8a0e4e62e55ba7cc5ebbf5c4b3b5b3bd9b
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- superbara (0.13.1)
4
+ superbara (0.13.2)
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/bin/tests CHANGED
@@ -56,5 +56,6 @@ if [ "$exit_status" != 1 ]; then
56
56
  exit 1
57
57
  fi
58
58
 
59
+ exe/superbara run tests/pom_pcm_pcom
59
60
 
60
61
  echo "success!"
@@ -0,0 +1,6 @@
1
+ module Superbara
2
+ class PCM
3
+ extend Capybara::DSL
4
+ extend Superbara::DSL
5
+ end
6
+ end
@@ -0,0 +1,8 @@
1
+ module Superbara
2
+ class PCOM
3
+ extend Capybara::DSL
4
+ extend Superbara::DSL
5
+ include Capybara::DSL
6
+ include Superbara::DSL
7
+ end
8
+ end
@@ -0,0 +1,6 @@
1
+ module Superbara
2
+ class POM
3
+ include Capybara::DSL
4
+ include Superbara::DSL
5
+ end
6
+ end
@@ -1,3 +1,3 @@
1
1
  module Superbara
2
- VERSION = "0.13.1"
2
+ VERSION = "0.13.2"
3
3
  end
data/lib/superbara.rb CHANGED
@@ -246,6 +246,9 @@ require_relative "superbara/cli"
246
246
  require_relative "superbara/context"
247
247
  require_relative "superbara/web"
248
248
  require_relative "superbara/errors/not_desired_tag_error"
249
+ require_relative "superbara/pom"
250
+ require_relative "superbara/pcm"
251
+ require_relative "superbara/pcom"
249
252
 
250
253
  trap "SIGINT" do
251
254
  puts "
@@ -0,0 +1,3 @@
1
+ run "pom"
2
+ run "pcm"
3
+ run "pcom"
@@ -0,0 +1,20 @@
1
+ class NavBar < Superbara::PCM
2
+ def self.item(wat)
3
+ elem = find "nav#mainNav"
4
+ elem.find("span", text: wat)
5
+ end
6
+
7
+ def self.tarjoukset_ja_vinkit
8
+ item("Tarjoukset ja vinkit")
9
+ end
10
+ end
11
+
12
+
13
+ visit "vr.fi"
14
+
15
+ wait do
16
+ has_text? "Katso aikataulut"
17
+ end
18
+
19
+ NavBar.item("Tarjoukset ja vinkit").click
20
+ NavBar.tarjoukset_ja_vinkit.click
@@ -0,0 +1,31 @@
1
+ class NavBar < Superbara::PCOM
2
+ def initialize(selector = "nav#mainNav")
3
+ @elem = find selector
4
+ end
5
+
6
+ def item(wat)
7
+ @elem.find("span", text: wat)
8
+ end
9
+
10
+ def tarjoukset_ja_vinkit
11
+ item("Tarjoukset ja vinkit")
12
+ end
13
+
14
+ def self.tarjoukset_ja_vinkit
15
+ # or just...
16
+ # self.new.find("span", text: "Tarjoukset ja vinkit")
17
+ e = find("nav#mainNav")
18
+ e.find("span", text: "Tarjoukset ja vinkit")
19
+ end
20
+ end
21
+
22
+
23
+ visit "vr.fi"
24
+
25
+ wait do
26
+ has_text? "Katso aikataulut"
27
+ end
28
+
29
+ nb = NavBar.new
30
+ nb.tarjoukset_ja_vinkit.click
31
+ NavBar.tarjoukset_ja_vinkit.click
@@ -0,0 +1,25 @@
1
+ class NavBar < Superbara::POM
2
+
3
+ def initialize(selector = "nav#mainNav")
4
+ @elem = find selector
5
+ end
6
+
7
+ def item(wat)
8
+ @elem.find("span", text: wat)
9
+ end
10
+
11
+ def tarjoukset_ja_vinkit
12
+ item("Tarjoukset ja vinkit")
13
+ end
14
+ end
15
+
16
+
17
+ visit "vr.fi"
18
+
19
+ wait do
20
+ has_text? "Katso aikataulut"
21
+ end
22
+
23
+ nb = NavBar.new
24
+ nb.item("Tarjoukset ja vinkit").click
25
+ nb.tarjoukset_ja_vinkit.click
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.13.1
4
+ version: 0.13.2
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-06-12 00:00:00.000000000 Z
11
+ date: 2018-06-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: colorize
@@ -355,6 +355,9 @@ files:
355
355
  - lib/superbara/dsl.rb
356
356
  - lib/superbara/errors/not_desired_tag_error.rb
357
357
  - lib/superbara/helpers.rb
358
+ - lib/superbara/pcm.rb
359
+ - lib/superbara/pcom.rb
360
+ - lib/superbara/pom.rb
358
361
  - lib/superbara/rspec.rb
359
362
  - lib/superbara/version.rb
360
363
  - lib/superbara/web.rb
@@ -377,6 +380,10 @@ files:
377
380
  - tests/features/wait.rb
378
381
  - tests/minimal/main.rb
379
382
  - tests/minimal/minimal.rb
383
+ - tests/pom_pcm_pcom/main.rb
384
+ - tests/pom_pcm_pcom/pcm/main.rb
385
+ - tests/pom_pcm_pcom/pcom/main.rb
386
+ - tests/pom_pcm_pcom/pom/main.rb
380
387
  - tests/run/has_instance_variables.rb
381
388
  - tests/run/has_no_instance_variables.rb
382
389
  - tests/run/main.rb