aipim-rails 0.0.40 → 0.0.41
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/aipim +1 -0
- data/lib/aipim-rails/parser.rb +0 -1
- data/lib/screenshot.rb +19 -7
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f25b31823c9434d9542ec3b7e49232710328078c
|
4
|
+
data.tar.gz: 2b58a29e80cc8c65f93842659d21f0b9c86bcdf9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eb94643d94ec7378c7a338d0510b33567879e4b7207127a5fb7c337b76a347dbf02894c372925009ba34c5f664227b7e8e62780a73b2d5f5205d62dff26f36ca
|
7
|
+
data.tar.gz: e2c5fc42631e661b1fae18519c036140e0a74089406aba95604f2deada1e69072b7801dc4c46a9b208a97ee6d6e6c60513c29b661b00536c82ee1c414ef231f6
|
data/bin/aipim
CHANGED
data/lib/aipim-rails/parser.rb
CHANGED
data/lib/screenshot.rb
CHANGED
@@ -1,14 +1,26 @@
|
|
1
1
|
require 'selenium-webdriver'
|
2
2
|
|
3
|
-
%x[rm aipim/screenshots/*]
|
3
|
+
%x[rm -r aipim/screenshots/*]
|
4
|
+
|
5
|
+
Before do |scenario|
|
6
|
+
@ScenarioTitle = scenario.title
|
7
|
+
@ScenarioDescription = scenario.description
|
8
|
+
@FeatureFile = scenario.file.to_s.split('/')
|
9
|
+
@FeatureFile.delete_at(0)
|
10
|
+
@FeatureFile = @FeatureFile.join('/')
|
11
|
+
@FeatureName = scenario.feature.title
|
12
|
+
@ScenarioTags = scenario.source_tag_names
|
4
13
|
|
5
|
-
Before('@javascript') do |scenario|
|
6
14
|
page.driver.browser.manage.window.maximize
|
15
|
+
page.driver.browser.manage.window.resize_to(1024, 768)
|
7
16
|
end
|
8
17
|
|
9
|
-
After
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
end
|
18
|
+
After do
|
19
|
+
if (@ScenarioTags.include?('@screenshot') && @ScenarioTags.include?('@javascript')) && !page.driver.browser.nil?
|
20
|
+
path = "aipim/screenshots/#{@FeatureFile}"
|
21
|
+
system("mkdir -p #{path}")
|
14
22
|
|
23
|
+
sleep(1.0)
|
24
|
+
page.driver.save_screenshot("#{path}/#{Time.now.to_i}.png")
|
25
|
+
end
|
26
|
+
end
|