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 +4 -4
- data/Gemfile.lock +1 -1
- data/bin/tests +1 -0
- data/lib/superbara/pcm.rb +6 -0
- data/lib/superbara/pcom.rb +8 -0
- data/lib/superbara/pom.rb +6 -0
- data/lib/superbara/version.rb +1 -1
- data/lib/superbara.rb +3 -0
- data/tests/pom_pcm_pcom/main.rb +3 -0
- data/tests/pom_pcm_pcom/pcm/main.rb +20 -0
- data/tests/pom_pcm_pcom/pcom/main.rb +31 -0
- data/tests/pom_pcm_pcom/pom/main.rb +25 -0
- metadata +9 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b7487d2e51d4923646fe45ed10831859d18e2cd5c7e3743105b599f617fcd8e6
|
4
|
+
data.tar.gz: e6c0e8b466193843cfab3d90eb75274cf75a8136771bf60ee269767c9e319cd6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a98d1761785cb40d8dc8419963912f5f5619e54a25ba5e490ef5837f289e235f2f5fee60d4673efe3cb82b18638ca8feea122a6dee0cae893b3b7c944b47b224
|
7
|
+
data.tar.gz: b00af5fb684e230af3d713c7c85d61d57d075a26c41d7652344515ef591f885f6c1814e4cb7f3ccd4689dae12193ee8a0e4e62e55ba7cc5ebbf5c4b3b5b3bd9b
|
data/Gemfile.lock
CHANGED
data/bin/tests
CHANGED
data/lib/superbara/version.rb
CHANGED
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,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.
|
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-
|
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
|