superbara 0.14.7 → 0.15.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/main.workflow +15 -0
- data/.ruby-version +1 -1
- data/Gemfile.lock +40 -41
- data/examples/the-internet/abtest.rb +13 -0
- data/examples/the-internet/basic_auth.rb +5 -0
- data/examples/the-internet/bin/run_all.rb +20 -0
- data/examples/the-internet/broken_images.rb +23 -0
- data/examples/the-internet/dynamic_content.rb +25 -0
- data/examples/the-internet/dynamic_controls.rb +65 -0
- data/examples/the-internet/dynamic_loading.rb +43 -0
- data/examples/the-internet/exit_intent.rb +11 -0
- data/examples/the-internet/file_download.rb +1 -0
- data/examples/the-internet/file_upload.rb +13 -0
- data/examples/the-internet/floating_menu.rb +15 -0
- data/examples/the-internet/forgot_password.rb +14 -0
- data/examples/the-internet/form_authentication.rb +17 -0
- data/examples/the-internet/frames.rb +41 -0
- data/examples/the-internet/geolocation.rb +17 -0
- data/examples/the-internet/horizontal_slider.rb +12 -0
- data/examples/the-internet/hovers.rb +26 -0
- data/examples/the-internet/infinite_scroll.rb +10 -0
- data/examples/the-internet/javascript_alerts.rb +21 -0
- data/examples/the-internet/javascript_error.rb +6 -0
- data/examples/the-internet/jquery_uimenus.rb +14 -0
- data/examples/the-internet/key_presses.rb +11 -0
- data/examples/the-internet/large.rb +9 -0
- data/examples/the-internet/notification_message.rb +17 -0
- data/examples/the-internet/redirector.rb +17 -0
- data/examples/the-internet/slow.rb +5 -0
- data/examples/the-internet/windows.rb +18 -0
- data/examples/the-internet/wysiwyg_editor.rb +11 -0
- data/lib/superbara/chrome.rb +3 -2
- data/lib/superbara/version.rb +1 -1
- data/superbara.gemspec +2 -2
- metadata +74 -54
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5f87a239e88abd6c887f73fbc03ef48acb80a375a8c754b22e7d0a3f92650f27
|
4
|
+
data.tar.gz: dec1a145a7ebc62a74f4b5b157e0e92743aa5c95ac9200e8b83faba5fb58406b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6e6849e20004611cc1425cef037d026658547d7af97db182ff5bf1eff5eb50a2a2ca64fc0a7509ccbf78bf5a9929564e71bc160e7d3b81085874cc0e20fbb728
|
7
|
+
data.tar.gz: e86095eba1e257c0712c69ecf22f4a5de041ef1f338ee7b37e03147e23e055ab4877d8c0480e9137eb592971e04cbe4d1e77bfec9489a327fe3239da85632cfe
|
@@ -0,0 +1,15 @@
|
|
1
|
+
workflow "Main" {
|
2
|
+
on = "push"
|
3
|
+
resolves = ["Test"]
|
4
|
+
}
|
5
|
+
|
6
|
+
action "Install" {
|
7
|
+
uses = "docker://culturehq/actions-bundler:latest"
|
8
|
+
args = "install"
|
9
|
+
}
|
10
|
+
|
11
|
+
action "Test" {
|
12
|
+
needs = "Install"
|
13
|
+
uses = "docker://culturehq/actions-bundler:latest"
|
14
|
+
args = "exec rake"
|
15
|
+
}
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.
|
1
|
+
2.6.3
|
data/Gemfile.lock
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
superbara (0.
|
4
|
+
superbara (0.15.0)
|
5
5
|
astrolabe (~> 1.3, >= 1.3.1)
|
6
6
|
binding_of_caller (~> 0.8, >= 0.8.0)
|
7
|
-
capybara (
|
7
|
+
capybara (= 3.29.0, = 3.29)
|
8
8
|
colorize (~> 0.8, >= 0.8.1)
|
9
9
|
faker (~> 1.8, >= 1.8.7)
|
10
10
|
kommando (~> 0.1, >= 0.1.2)
|
@@ -14,94 +14,93 @@ PATH
|
|
14
14
|
pry-stack_explorer
|
15
15
|
rb-readline (~> 0.5, >= 0.5.5)
|
16
16
|
rspec (~> 3.7, >= 3.7.0)
|
17
|
-
selenium-webdriver (
|
17
|
+
selenium-webdriver (= 4.0.0.alpha3)
|
18
18
|
sinatra (~> 2.0, >= 2.0.1)
|
19
19
|
|
20
20
|
GEM
|
21
21
|
remote: https://rubygems.org/
|
22
22
|
specs:
|
23
|
-
addressable (2.
|
24
|
-
public_suffix (>= 2.0.2, <
|
23
|
+
addressable (2.7.0)
|
24
|
+
public_suffix (>= 2.0.2, < 5.0)
|
25
25
|
ast (2.4.0)
|
26
26
|
astrolabe (1.3.1)
|
27
27
|
parser (~> 2.2)
|
28
28
|
binding_of_caller (0.8.0)
|
29
29
|
debug_inspector (>= 0.0.1)
|
30
|
-
byebug (
|
31
|
-
capybara (3.
|
30
|
+
byebug (11.0.1)
|
31
|
+
capybara (3.29.0)
|
32
32
|
addressable
|
33
33
|
mini_mime (>= 0.1.3)
|
34
34
|
nokogiri (~> 1.8)
|
35
35
|
rack (>= 1.6.0)
|
36
36
|
rack-test (>= 0.6.3)
|
37
|
-
regexp_parser (~> 1.
|
37
|
+
regexp_parser (~> 1.5)
|
38
38
|
xpath (~> 3.2)
|
39
|
-
childprocess (0.
|
40
|
-
|
39
|
+
childprocess (1.0.1)
|
40
|
+
rake (< 13.0)
|
41
41
|
coderay (1.1.2)
|
42
42
|
colorize (0.8.1)
|
43
|
-
concurrent-ruby (1.
|
43
|
+
concurrent-ruby (1.1.5)
|
44
44
|
debug_inspector (0.0.3)
|
45
45
|
diff-lcs (1.3)
|
46
|
-
faker (1.9.
|
46
|
+
faker (1.9.6)
|
47
47
|
i18n (>= 0.7)
|
48
|
-
|
49
|
-
i18n (1.1.1)
|
48
|
+
i18n (1.6.0)
|
50
49
|
concurrent-ruby (~> 1.0)
|
51
50
|
interception (0.5)
|
52
51
|
kommando (0.1.2)
|
53
|
-
method_source (0.9.
|
54
|
-
mini_mime (1.0.
|
55
|
-
mini_portile2 (2.
|
52
|
+
method_source (0.9.2)
|
53
|
+
mini_mime (1.0.2)
|
54
|
+
mini_portile2 (2.4.0)
|
56
55
|
mustermann (1.0.3)
|
57
|
-
nokogiri (1.
|
58
|
-
mini_portile2 (~> 2.
|
59
|
-
parser (2.
|
56
|
+
nokogiri (1.10.4)
|
57
|
+
mini_portile2 (~> 2.4.0)
|
58
|
+
parser (2.6.4.1)
|
60
59
|
ast (~> 2.4.0)
|
61
|
-
pry (0.
|
60
|
+
pry (0.12.2)
|
62
61
|
coderay (~> 1.1.0)
|
63
62
|
method_source (~> 0.9.0)
|
64
|
-
pry-byebug (3.
|
65
|
-
byebug (~>
|
63
|
+
pry-byebug (3.7.0)
|
64
|
+
byebug (~> 11.0)
|
66
65
|
pry (~> 0.10)
|
67
|
-
pry-rescue (1.
|
66
|
+
pry-rescue (1.5.0)
|
68
67
|
interception (>= 0.5)
|
69
|
-
pry
|
70
|
-
pry-stack_explorer (0.4.9.
|
68
|
+
pry (>= 0.12.0)
|
69
|
+
pry-stack_explorer (0.4.9.3)
|
71
70
|
binding_of_caller (>= 0.7)
|
72
71
|
pry (>= 0.9.11)
|
73
|
-
public_suffix (
|
74
|
-
rack (2.0.
|
75
|
-
rack-protection (2.0.
|
72
|
+
public_suffix (4.0.1)
|
73
|
+
rack (2.0.7)
|
74
|
+
rack-protection (2.0.7)
|
76
75
|
rack
|
77
76
|
rack-test (1.1.0)
|
78
77
|
rack (>= 1.0, < 3)
|
79
78
|
rake (12.3.0)
|
80
79
|
rb-readline (0.5.5)
|
81
|
-
regexp_parser (1.
|
80
|
+
regexp_parser (1.6.0)
|
82
81
|
rspec (3.8.0)
|
83
82
|
rspec-core (~> 3.8.0)
|
84
83
|
rspec-expectations (~> 3.8.0)
|
85
84
|
rspec-mocks (~> 3.8.0)
|
86
|
-
rspec-core (3.8.
|
85
|
+
rspec-core (3.8.2)
|
87
86
|
rspec-support (~> 3.8.0)
|
88
|
-
rspec-expectations (3.8.
|
87
|
+
rspec-expectations (3.8.4)
|
89
88
|
diff-lcs (>= 1.2.0, < 2.0)
|
90
89
|
rspec-support (~> 3.8.0)
|
91
|
-
rspec-mocks (3.8.
|
90
|
+
rspec-mocks (3.8.1)
|
92
91
|
diff-lcs (>= 1.2.0, < 2.0)
|
93
92
|
rspec-support (~> 3.8.0)
|
94
|
-
rspec-support (3.8.
|
95
|
-
rubyzip (1.2.
|
96
|
-
selenium-webdriver (
|
97
|
-
childprocess (
|
93
|
+
rspec-support (3.8.2)
|
94
|
+
rubyzip (1.2.4)
|
95
|
+
selenium-webdriver (4.0.0.alpha3)
|
96
|
+
childprocess (>= 0.5, < 2.0)
|
98
97
|
rubyzip (~> 1.2, >= 1.2.2)
|
99
|
-
sinatra (2.0.
|
98
|
+
sinatra (2.0.7)
|
100
99
|
mustermann (~> 1.0)
|
101
100
|
rack (~> 2.0)
|
102
|
-
rack-protection (= 2.0.
|
101
|
+
rack-protection (= 2.0.7)
|
103
102
|
tilt (~> 2.0)
|
104
|
-
tilt (2.0.
|
103
|
+
tilt (2.0.9)
|
105
104
|
xpath (3.2.0)
|
106
105
|
nokogiri (~> 1.8)
|
107
106
|
|
@@ -114,4 +113,4 @@ DEPENDENCIES
|
|
114
113
|
superbara!
|
115
114
|
|
116
115
|
BUNDLED WITH
|
117
|
-
1.17.
|
116
|
+
1.17.3
|
@@ -0,0 +1,20 @@
|
|
1
|
+
require "kommando"
|
2
|
+
|
3
|
+
files = Dir.glob("*.rb")
|
4
|
+
files = files - ["slow.rb"]
|
5
|
+
files.shuffle!
|
6
|
+
|
7
|
+
for file in files
|
8
|
+
k = Kommando.new "superbara run #{file}", output: true
|
9
|
+
done = false
|
10
|
+
k.out.once /🏁/ do
|
11
|
+
done = true
|
12
|
+
k.in.writeln "q"
|
13
|
+
end
|
14
|
+
|
15
|
+
k.run_async
|
16
|
+
loop do
|
17
|
+
break if done
|
18
|
+
sleep 0.1
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
visit 'the-internet.herokuapp.com/broken_images'
|
2
|
+
|
3
|
+
wait 5 do
|
4
|
+
has_text? 'Broken Images'
|
5
|
+
end
|
6
|
+
|
7
|
+
broken_img = (all 'div.example img').first
|
8
|
+
visit broken_img[:src]
|
9
|
+
wait 5 do
|
10
|
+
has_text? 'Not Found'
|
11
|
+
end
|
12
|
+
|
13
|
+
back
|
14
|
+
|
15
|
+
wait 5 do
|
16
|
+
has_text? 'Broken Images'
|
17
|
+
end
|
18
|
+
|
19
|
+
normal_img = (all 'div.example img').last
|
20
|
+
visit normal_img[:src]
|
21
|
+
wait 5 do
|
22
|
+
has_no_text? 'Not Found'
|
23
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
visit "the-internet.herokuapp.com/dynamic_content"
|
2
|
+
|
3
|
+
wait 5 do
|
4
|
+
has_text? "Dynamic Content"
|
5
|
+
end
|
6
|
+
|
7
|
+
click_on "click here"
|
8
|
+
|
9
|
+
wait 5 do
|
10
|
+
has_text? "Dynamic Content"
|
11
|
+
end
|
12
|
+
|
13
|
+
old_text = find("#content > div:nth-child(7) > div.large-10.columns").text
|
14
|
+
|
15
|
+
reload
|
16
|
+
|
17
|
+
wait 5 do
|
18
|
+
has_text? "Dynamic Content"
|
19
|
+
end
|
20
|
+
|
21
|
+
new_text = find("#content > div:nth-child(7) > div.large-10.columns").text
|
22
|
+
|
23
|
+
wait 5 do
|
24
|
+
old_text != new_text
|
25
|
+
end
|
@@ -0,0 +1,65 @@
|
|
1
|
+
visit 'the-internet.herokuapp.com/dynamic_controls'
|
2
|
+
|
3
|
+
wait 5 do
|
4
|
+
has_text? 'Dynamic Controls'
|
5
|
+
end
|
6
|
+
|
7
|
+
within '#checkbox-example' do
|
8
|
+
wait 5 do
|
9
|
+
has_selector? '#checkbox > input[type="checkbox"]'
|
10
|
+
end
|
11
|
+
|
12
|
+
click "#checkbox-example > button"
|
13
|
+
|
14
|
+
wait 5 do
|
15
|
+
has_no_selector? '#loading'
|
16
|
+
end
|
17
|
+
|
18
|
+
wait 5 do
|
19
|
+
has_no_selector? '#checkbox > input[type="checkbox"]'
|
20
|
+
end
|
21
|
+
|
22
|
+
click '#checkbox-example > button'
|
23
|
+
|
24
|
+
wait 5 do
|
25
|
+
has_no_selector? '#loading'
|
26
|
+
end
|
27
|
+
|
28
|
+
wait 5 do
|
29
|
+
has_selector? 'div > #checkbox'
|
30
|
+
end
|
31
|
+
|
32
|
+
end
|
33
|
+
|
34
|
+
within '#input-example' do
|
35
|
+
wait 5 do
|
36
|
+
textbox = find 'input[type="text"]'
|
37
|
+
textbox[:disabled]
|
38
|
+
end
|
39
|
+
|
40
|
+
click "button"
|
41
|
+
|
42
|
+
wait 8 do
|
43
|
+
has_selector? "#message"
|
44
|
+
end
|
45
|
+
|
46
|
+
textbox = find 'input[type="text"]'
|
47
|
+
|
48
|
+
wait 5 do
|
49
|
+
textbox[:disabled] == nil
|
50
|
+
end
|
51
|
+
|
52
|
+
textbox.type "asdasd"
|
53
|
+
|
54
|
+
click "button"
|
55
|
+
|
56
|
+
wait 8 do
|
57
|
+
has_selector? "#message"
|
58
|
+
end
|
59
|
+
|
60
|
+
wait 5 do
|
61
|
+
textbox = find 'input[type="text"]'
|
62
|
+
textbox[:disabled]
|
63
|
+
end
|
64
|
+
|
65
|
+
end
|
@@ -0,0 +1,43 @@
|
|
1
|
+
visit "the-internet.herokuapp.com/dynamic_loading"
|
2
|
+
|
3
|
+
wait 5 do
|
4
|
+
has_text? "Dynamically Loaded Page Elements"
|
5
|
+
end
|
6
|
+
|
7
|
+
click_link "Example 1"
|
8
|
+
|
9
|
+
wait 5 do
|
10
|
+
has_text? "Example 1"
|
11
|
+
end
|
12
|
+
|
13
|
+
click "#start > button"
|
14
|
+
|
15
|
+
wait 5 do
|
16
|
+
has_no_selector? "#loading"
|
17
|
+
end
|
18
|
+
|
19
|
+
wait 5 do
|
20
|
+
has_text? "Hello World"
|
21
|
+
end
|
22
|
+
|
23
|
+
back
|
24
|
+
|
25
|
+
wait 5 do
|
26
|
+
has_text? "Dynamically Loaded Page Elements"
|
27
|
+
end
|
28
|
+
|
29
|
+
click_link "Example 2"
|
30
|
+
|
31
|
+
wait 5 do
|
32
|
+
has_text? "Example 2"
|
33
|
+
end
|
34
|
+
|
35
|
+
click "#start > button"
|
36
|
+
|
37
|
+
wait 5 do
|
38
|
+
has_no_selector? "#loading"
|
39
|
+
end
|
40
|
+
|
41
|
+
wait 5 do
|
42
|
+
has_text? "Hello World"
|
43
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
puts "TODO"
|
@@ -0,0 +1,14 @@
|
|
1
|
+
visit 'the-internet.herokuapp.com/forgot_password'
|
2
|
+
|
3
|
+
wait 5 do
|
4
|
+
has_text? 'Forgot Password'
|
5
|
+
end
|
6
|
+
|
7
|
+
email_input = find '#email'
|
8
|
+
email_input.type 'ngonsdofigjnsdfg@nfdojgndfog.com'
|
9
|
+
|
10
|
+
click '#form_submit'
|
11
|
+
|
12
|
+
wait 5 do
|
13
|
+
has_text? "Your e-mail's been sent!"
|
14
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
visit 'the-internet.herokuapp.com/login'
|
2
|
+
|
3
|
+
wait 5 do
|
4
|
+
has_text? 'Login Page'
|
5
|
+
end
|
6
|
+
|
7
|
+
find('#username').type 'tomsmith'
|
8
|
+
find('#password').type 'SuperSecretPassword!'
|
9
|
+
|
10
|
+
click 'button'
|
11
|
+
|
12
|
+
wait 5 do
|
13
|
+
has_text? 'Welcome to the Secure Area.'
|
14
|
+
end
|
15
|
+
sleep 1
|
16
|
+
|
17
|
+
click 'a.button'
|
@@ -0,0 +1,41 @@
|
|
1
|
+
visit 'the-internet.herokuapp.com/frames'
|
2
|
+
|
3
|
+
wait 5 do
|
4
|
+
has_text? 'Frames'
|
5
|
+
end
|
6
|
+
|
7
|
+
click_link 'Nested Frames'
|
8
|
+
|
9
|
+
wait 5 do
|
10
|
+
has_selector? 'html > frameset'
|
11
|
+
end
|
12
|
+
|
13
|
+
top_frame = find 'html > frameset > frame:nth-child(1)'
|
14
|
+
switch_to_frame top_frame
|
15
|
+
|
16
|
+
left_frame = find 'html > frameset > frame:nth-child(1)'
|
17
|
+
switch_to_frame left_frame
|
18
|
+
|
19
|
+
wait 10 do
|
20
|
+
has_text? 'LEFT'
|
21
|
+
end
|
22
|
+
|
23
|
+
back
|
24
|
+
|
25
|
+
wait 5 do
|
26
|
+
has_text? 'Frames'
|
27
|
+
end
|
28
|
+
|
29
|
+
click_link 'iFrame'
|
30
|
+
|
31
|
+
wait 10 do
|
32
|
+
has_text? 'An iFrame containing the TinyMCE WYSIWYG Editor'
|
33
|
+
end
|
34
|
+
|
35
|
+
iframe = find '#mce_0_ifr'
|
36
|
+
within_frame iframe do
|
37
|
+
text = find('#tinymce').text
|
38
|
+
wait 5 do
|
39
|
+
text == 'Your content goes here.'
|
40
|
+
end
|
41
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
visit 'the-internet.herokuapp.com/geolocation'
|
2
|
+
|
3
|
+
wait 5 do
|
4
|
+
has_text? 'Geolocation'
|
5
|
+
end
|
6
|
+
|
7
|
+
click '#content > div > button'
|
8
|
+
|
9
|
+
page.execute_script """
|
10
|
+
navigator.geolocation.getCurrentPosition = function(success) { console.log(success) }
|
11
|
+
"""
|
12
|
+
|
13
|
+
puts "TODO: api deprecated?"
|
14
|
+
|
15
|
+
# wait 5 do
|
16
|
+
# has_text? 'Latitude'
|
17
|
+
# end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
visit 'the-internet.herokuapp.com/horizontal_slider'
|
2
|
+
|
3
|
+
wait 5 do
|
4
|
+
has_text? 'Horizontal Slider'
|
5
|
+
end
|
6
|
+
|
7
|
+
slider = find '#content > div > div > input[type="range"]'
|
8
|
+
slider.type :right, :right, :right
|
9
|
+
|
10
|
+
wait 5 do
|
11
|
+
(find '#range').text == "4"
|
12
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
visit 'the-internet.herokuapp.com/hovers'
|
2
|
+
|
3
|
+
wait 5 do
|
4
|
+
has_text? 'Hovers'
|
5
|
+
end
|
6
|
+
|
7
|
+
find('#content > div > div:nth-child(3) > img').hover
|
8
|
+
|
9
|
+
wait 0.1 do
|
10
|
+
has_text? 'user1'
|
11
|
+
end
|
12
|
+
|
13
|
+
find('#content > div > div:nth-child(4) > img').hover
|
14
|
+
|
15
|
+
wait 0.1 do
|
16
|
+
has_text? 'user2'
|
17
|
+
end
|
18
|
+
|
19
|
+
find('#content > div > div:nth-child(5) > img').hover
|
20
|
+
|
21
|
+
wait 0.1 do
|
22
|
+
has_text? 'user3'
|
23
|
+
end
|
24
|
+
|
25
|
+
find("h3", text: "Hovers").hover
|
26
|
+
|
@@ -0,0 +1,21 @@
|
|
1
|
+
visit 'the-internet.herokuapp.com/javascript_alerts'
|
2
|
+
|
3
|
+
wait 5 do
|
4
|
+
has_text? 'JavaScript Alerts'
|
5
|
+
end
|
6
|
+
|
7
|
+
accept_alert do
|
8
|
+
click '#content > div > ul > li:nth-child(1) > button'
|
9
|
+
end
|
10
|
+
|
11
|
+
accept_confirm do
|
12
|
+
click '#content > div > ul > li:nth-child(2) > button'
|
13
|
+
end
|
14
|
+
|
15
|
+
accept_prompt do
|
16
|
+
click '#content > div > ul > li:nth-child(3) > button'
|
17
|
+
end
|
18
|
+
|
19
|
+
wait 0.1 do
|
20
|
+
has_text? "You entered:"
|
21
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
visit 'the-internet.herokuapp.com/notification_message_rendered'
|
2
|
+
|
3
|
+
wait 5 do
|
4
|
+
has_text? 'Notification Message'
|
5
|
+
end
|
6
|
+
|
7
|
+
reload
|
8
|
+
|
9
|
+
wait 1 do
|
10
|
+
has_text? 'Notification Message'
|
11
|
+
end
|
12
|
+
|
13
|
+
click_link 'Click here'
|
14
|
+
|
15
|
+
wait 1 do
|
16
|
+
has_text? 'Action successful'
|
17
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
visit 'the-internet.herokuapp.com/redirector'
|
2
|
+
|
3
|
+
wait 5 do
|
4
|
+
has_text? 'Redirection'
|
5
|
+
end
|
6
|
+
|
7
|
+
click_link 'here'
|
8
|
+
|
9
|
+
wait 5 do
|
10
|
+
has_text? 'Status Codes'
|
11
|
+
end
|
12
|
+
|
13
|
+
click_link '200'
|
14
|
+
|
15
|
+
wait 5 do
|
16
|
+
has_text? 'This page returned a 200 status code'
|
17
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
visit 'the-internet.herokuapp.com/windows'
|
2
|
+
|
3
|
+
wait 5 do
|
4
|
+
has_text? 'Opening a new window'
|
5
|
+
end
|
6
|
+
|
7
|
+
click_link 'Click Here'
|
8
|
+
switch_to_window windows.last
|
9
|
+
|
10
|
+
wait 5 do
|
11
|
+
has_text? 'New Window'
|
12
|
+
end
|
13
|
+
|
14
|
+
switch_to_window windows.first
|
15
|
+
|
16
|
+
wait 5 do
|
17
|
+
has_text? 'Opening a new window'
|
18
|
+
end
|
data/lib/superbara/chrome.rb
CHANGED
@@ -10,7 +10,7 @@ module Superbara; module Chrome
|
|
10
10
|
|
11
11
|
def self.register_drivers
|
12
12
|
options = ::Selenium::WebDriver::Chrome::Options.new
|
13
|
-
options.add_argument 'window-size=
|
13
|
+
options.add_argument 'window-size=1300,800'
|
14
14
|
options.add_argument 'disable-infobars'
|
15
15
|
|
16
16
|
capabilities = Selenium::WebDriver::Remote::Capabilities.chrome(
|
@@ -31,12 +31,13 @@ module Superbara; module Chrome
|
|
31
31
|
end
|
32
32
|
|
33
33
|
Capybara.register_driver :chrome_remote do
|
34
|
-
chrome_url = ENV['CHROME_URL']
|
34
|
+
chrome_url = ENV['CHROME_URL']
|
35
35
|
|
36
36
|
Capybara::Selenium::Driver.new(nil,
|
37
37
|
browser: :remote,
|
38
38
|
http_client: client,
|
39
39
|
desired_capabilities: capabilities,
|
40
|
+
options: options,
|
40
41
|
url: chrome_url
|
41
42
|
)
|
42
43
|
end
|
data/lib/superbara/version.rb
CHANGED
data/superbara.gemspec
CHANGED
@@ -29,8 +29,8 @@ Gem::Specification.new do |spec|
|
|
29
29
|
|
30
30
|
spec.add_dependency 'pry-byebug', '~> 3.6', '>= 3.6.0'
|
31
31
|
spec.add_dependency 'binding_of_caller', '~> 0.8', '>=0.8.0'
|
32
|
-
spec.add_dependency 'capybara', '
|
33
|
-
spec.add_dependency 'selenium-webdriver', '
|
32
|
+
spec.add_dependency 'capybara', '3.29', '3.29.0'
|
33
|
+
spec.add_dependency 'selenium-webdriver', '4.0.0.alpha3', '4.0.0.alpha3'
|
34
34
|
spec.add_dependency 'faker', '~> 1.8', '>= 1.8.7'
|
35
35
|
spec.add_dependency 'sinatra', '~> 2.0', '>= 2.0.1'
|
36
36
|
spec.add_dependency 'astrolabe', '~> 1.3', '>= 1.3.1'
|
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.
|
4
|
+
version: 0.15.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matti Paksula
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-09-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: colorize
|
@@ -62,82 +62,76 @@ dependencies:
|
|
62
62
|
name: pry-byebug
|
63
63
|
requirement: !ruby/object:Gem::Requirement
|
64
64
|
requirements:
|
65
|
-
- - "~>"
|
66
|
-
- !ruby/object:Gem::Version
|
67
|
-
version: '3.6'
|
68
65
|
- - ">="
|
69
66
|
- !ruby/object:Gem::Version
|
70
67
|
version: 3.6.0
|
68
|
+
- - "~>"
|
69
|
+
- !ruby/object:Gem::Version
|
70
|
+
version: '3.6'
|
71
71
|
type: :runtime
|
72
72
|
prerelease: false
|
73
73
|
version_requirements: !ruby/object:Gem::Requirement
|
74
74
|
requirements:
|
75
|
-
- - "~>"
|
76
|
-
- !ruby/object:Gem::Version
|
77
|
-
version: '3.6'
|
78
75
|
- - ">="
|
79
76
|
- !ruby/object:Gem::Version
|
80
77
|
version: 3.6.0
|
78
|
+
- - "~>"
|
79
|
+
- !ruby/object:Gem::Version
|
80
|
+
version: '3.6'
|
81
81
|
- !ruby/object:Gem::Dependency
|
82
82
|
name: binding_of_caller
|
83
83
|
requirement: !ruby/object:Gem::Requirement
|
84
84
|
requirements:
|
85
|
-
- - "~>"
|
86
|
-
- !ruby/object:Gem::Version
|
87
|
-
version: '0.8'
|
88
85
|
- - ">="
|
89
86
|
- !ruby/object:Gem::Version
|
90
87
|
version: 0.8.0
|
88
|
+
- - "~>"
|
89
|
+
- !ruby/object:Gem::Version
|
90
|
+
version: '0.8'
|
91
91
|
type: :runtime
|
92
92
|
prerelease: false
|
93
93
|
version_requirements: !ruby/object:Gem::Requirement
|
94
94
|
requirements:
|
95
|
-
- - "~>"
|
96
|
-
- !ruby/object:Gem::Version
|
97
|
-
version: '0.8'
|
98
95
|
- - ">="
|
99
96
|
- !ruby/object:Gem::Version
|
100
97
|
version: 0.8.0
|
98
|
+
- - "~>"
|
99
|
+
- !ruby/object:Gem::Version
|
100
|
+
version: '0.8'
|
101
101
|
- !ruby/object:Gem::Dependency
|
102
102
|
name: capybara
|
103
103
|
requirement: !ruby/object:Gem::Requirement
|
104
104
|
requirements:
|
105
|
-
- -
|
105
|
+
- - '='
|
106
106
|
- !ruby/object:Gem::Version
|
107
|
-
version: '3.
|
108
|
-
- -
|
107
|
+
version: '3.29'
|
108
|
+
- - '='
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version: 3.
|
110
|
+
version: 3.29.0
|
111
111
|
type: :runtime
|
112
112
|
prerelease: false
|
113
113
|
version_requirements: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
|
-
- -
|
115
|
+
- - '='
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version: '3.
|
118
|
-
- -
|
117
|
+
version: '3.29'
|
118
|
+
- - '='
|
119
119
|
- !ruby/object:Gem::Version
|
120
|
-
version: 3.
|
120
|
+
version: 3.29.0
|
121
121
|
- !ruby/object:Gem::Dependency
|
122
122
|
name: selenium-webdriver
|
123
123
|
requirement: !ruby/object:Gem::Requirement
|
124
124
|
requirements:
|
125
|
-
- -
|
126
|
-
- !ruby/object:Gem::Version
|
127
|
-
version: '3.12'
|
128
|
-
- - ">="
|
125
|
+
- - '='
|
129
126
|
- !ruby/object:Gem::Version
|
130
|
-
version:
|
127
|
+
version: 4.0.0.alpha3
|
131
128
|
type: :runtime
|
132
129
|
prerelease: false
|
133
130
|
version_requirements: !ruby/object:Gem::Requirement
|
134
131
|
requirements:
|
135
|
-
- -
|
136
|
-
- !ruby/object:Gem::Version
|
137
|
-
version: '3.12'
|
138
|
-
- - ">="
|
132
|
+
- - '='
|
139
133
|
- !ruby/object:Gem::Version
|
140
|
-
version:
|
134
|
+
version: 4.0.0.alpha3
|
141
135
|
- !ruby/object:Gem::Dependency
|
142
136
|
name: faker
|
143
137
|
requirement: !ruby/object:Gem::Requirement
|
@@ -202,22 +196,22 @@ dependencies:
|
|
202
196
|
name: rspec
|
203
197
|
requirement: !ruby/object:Gem::Requirement
|
204
198
|
requirements:
|
205
|
-
- - "~>"
|
206
|
-
- !ruby/object:Gem::Version
|
207
|
-
version: '3.7'
|
208
199
|
- - ">="
|
209
200
|
- !ruby/object:Gem::Version
|
210
201
|
version: 3.7.0
|
202
|
+
- - "~>"
|
203
|
+
- !ruby/object:Gem::Version
|
204
|
+
version: '3.7'
|
211
205
|
type: :runtime
|
212
206
|
prerelease: false
|
213
207
|
version_requirements: !ruby/object:Gem::Requirement
|
214
208
|
requirements:
|
215
|
-
- - "~>"
|
216
|
-
- !ruby/object:Gem::Version
|
217
|
-
version: '3.7'
|
218
209
|
- - ">="
|
219
210
|
- !ruby/object:Gem::Version
|
220
211
|
version: 3.7.0
|
212
|
+
- - "~>"
|
213
|
+
- !ruby/object:Gem::Version
|
214
|
+
version: '3.7'
|
221
215
|
- !ruby/object:Gem::Dependency
|
222
216
|
name: pry-rescue
|
223
217
|
requirement: !ruby/object:Gem::Requirement
|
@@ -282,42 +276,42 @@ dependencies:
|
|
282
276
|
name: bundler
|
283
277
|
requirement: !ruby/object:Gem::Requirement
|
284
278
|
requirements:
|
285
|
-
- - "~>"
|
286
|
-
- !ruby/object:Gem::Version
|
287
|
-
version: '1.15'
|
288
279
|
- - ">="
|
289
280
|
- !ruby/object:Gem::Version
|
290
281
|
version: 1.15.0
|
282
|
+
- - "~>"
|
283
|
+
- !ruby/object:Gem::Version
|
284
|
+
version: '1.15'
|
291
285
|
type: :development
|
292
286
|
prerelease: false
|
293
287
|
version_requirements: !ruby/object:Gem::Requirement
|
294
288
|
requirements:
|
295
|
-
- - "~>"
|
296
|
-
- !ruby/object:Gem::Version
|
297
|
-
version: '1.15'
|
298
289
|
- - ">="
|
299
290
|
- !ruby/object:Gem::Version
|
300
291
|
version: 1.15.0
|
292
|
+
- - "~>"
|
293
|
+
- !ruby/object:Gem::Version
|
294
|
+
version: '1.15'
|
301
295
|
- !ruby/object:Gem::Dependency
|
302
296
|
name: rake
|
303
297
|
requirement: !ruby/object:Gem::Requirement
|
304
298
|
requirements:
|
305
|
-
- - "~>"
|
306
|
-
- !ruby/object:Gem::Version
|
307
|
-
version: '12.3'
|
308
299
|
- - ">="
|
309
300
|
- !ruby/object:Gem::Version
|
310
301
|
version: 12.3.0
|
302
|
+
- - "~>"
|
303
|
+
- !ruby/object:Gem::Version
|
304
|
+
version: '12.3'
|
311
305
|
type: :development
|
312
306
|
prerelease: false
|
313
307
|
version_requirements: !ruby/object:Gem::Requirement
|
314
308
|
requirements:
|
315
|
-
- - "~>"
|
316
|
-
- !ruby/object:Gem::Version
|
317
|
-
version: '12.3'
|
318
309
|
- - ">="
|
319
310
|
- !ruby/object:Gem::Version
|
320
311
|
version: 12.3.0
|
312
|
+
- - "~>"
|
313
|
+
- !ruby/object:Gem::Version
|
314
|
+
version: '12.3'
|
321
315
|
description: Better way to build Capybara tests
|
322
316
|
email:
|
323
317
|
- matti.paksula@iki.fi
|
@@ -326,6 +320,7 @@ executables:
|
|
326
320
|
extensions: []
|
327
321
|
extra_rdoc_files: []
|
328
322
|
files:
|
323
|
+
- ".github/main.workflow"
|
329
324
|
- ".gitignore"
|
330
325
|
- ".kung/build/hooks/post-build"
|
331
326
|
- ".kung/build/hooks/pre-build"
|
@@ -407,6 +402,34 @@ files:
|
|
407
402
|
- examples/sites/pharos.sh/main.rb
|
408
403
|
- examples/sites/vr.fi/helsinki-tampere/main.rb
|
409
404
|
- examples/spec/minimal_spec.rb
|
405
|
+
- examples/the-internet/abtest.rb
|
406
|
+
- examples/the-internet/basic_auth.rb
|
407
|
+
- examples/the-internet/bin/run_all.rb
|
408
|
+
- examples/the-internet/broken_images.rb
|
409
|
+
- examples/the-internet/dynamic_content.rb
|
410
|
+
- examples/the-internet/dynamic_controls.rb
|
411
|
+
- examples/the-internet/dynamic_loading.rb
|
412
|
+
- examples/the-internet/exit_intent.rb
|
413
|
+
- examples/the-internet/file_download.rb
|
414
|
+
- examples/the-internet/file_upload.rb
|
415
|
+
- examples/the-internet/floating_menu.rb
|
416
|
+
- examples/the-internet/forgot_password.rb
|
417
|
+
- examples/the-internet/form_authentication.rb
|
418
|
+
- examples/the-internet/frames.rb
|
419
|
+
- examples/the-internet/geolocation.rb
|
420
|
+
- examples/the-internet/horizontal_slider.rb
|
421
|
+
- examples/the-internet/hovers.rb
|
422
|
+
- examples/the-internet/infinite_scroll.rb
|
423
|
+
- examples/the-internet/javascript_alerts.rb
|
424
|
+
- examples/the-internet/javascript_error.rb
|
425
|
+
- examples/the-internet/jquery_uimenus.rb
|
426
|
+
- examples/the-internet/key_presses.rb
|
427
|
+
- examples/the-internet/large.rb
|
428
|
+
- examples/the-internet/notification_message.rb
|
429
|
+
- examples/the-internet/redirector.rb
|
430
|
+
- examples/the-internet/slow.rb
|
431
|
+
- examples/the-internet/windows.rb
|
432
|
+
- examples/the-internet/wysiwyg_editor.rb
|
410
433
|
- exe/superbara
|
411
434
|
- lib/capybara_monkey.rb
|
412
435
|
- lib/pry_monkey.rb
|
@@ -464,11 +487,9 @@ files:
|
|
464
487
|
- tests/tags/notags.rb
|
465
488
|
- tests/tags/simple.rb
|
466
489
|
- vendor/chromedriver/linux64/.gitkeep
|
467
|
-
- vendor/chromedriver/linux64/chromedriver
|
468
490
|
- vendor/chromedriver/mac64/.gitkeep
|
469
491
|
- vendor/chromedriver/mac64/chromedriver
|
470
492
|
- vendor/chromedriver/win32/.gitkeep
|
471
|
-
- vendor/chromedriver/win32/chromedriver.exe
|
472
493
|
- vendor/robot/mac64/robot
|
473
494
|
- web/public/1.html
|
474
495
|
- web/public/2.html
|
@@ -500,8 +521,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
500
521
|
- !ruby/object:Gem::Version
|
501
522
|
version: '0'
|
502
523
|
requirements: []
|
503
|
-
|
504
|
-
rubygems_version: 2.7.6
|
524
|
+
rubygems_version: 3.0.4
|
505
525
|
signing_key:
|
506
526
|
specification_version: 4
|
507
527
|
summary: Super Capybara
|