sunomono 1.0.3 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +24 -10
- data/change_log.md +13 -0
- data/lib/helpers/sunomono_helpers.rb +1 -1
- data/lib/skeleton_appium/features/support/android/appium.txt +4 -1
- data/lib/skeleton_appium/features/support/hooks.rb +4 -0
- data/lib/sunomono.rb +3 -6
- data/lib/sunomono/version.rb +1 -1
- data/lib/templates/appium_base_screen.tt +10 -4
- data/lib/templates/appium_screen.tt +3 -4
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e78bd6d08bbd1eb3a9d57309b2e4a695e8cae07d
|
4
|
+
data.tar.gz: be49f6d3a87b3f5b634082fe1862aca2c2a25a3f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0a3cb49c5508d42ab7fada0432a22e4f790cded0269fec966f3468c228be6194a18f9c055955d5517d1370e6483a1201480ed50cfc9838d42ea0d7dc1463b39f
|
7
|
+
data.tar.gz: 9194214f8ad6c50bee9c94d58bfe762c096f555355b5e68f4ec693e9995e109a6e7c58e7c836a97e0578aa1962609517c21440805ede66fa00d493ee55bb3d00
|
data/README.md
CHANGED
@@ -80,23 +80,37 @@ There are nine generators that are responsible to create the templates for Featu
|
|
80
80
|
|
81
81
|
####Features
|
82
82
|
|
83
|
+
To create calabash based files:
|
84
|
+
|
85
|
+
|
83
86
|
```
|
84
|
-
suno generate feature FeatureName
|
87
|
+
suno generate calabash-feature FeatureName
|
85
88
|
```
|
86
|
-
|
89
|
+
|
90
|
+
To create appium based files:
|
91
|
+
|
92
|
+
```
|
93
|
+
suno generate appium-feature FeatureName
|
94
|
+
```
|
95
|
+
|
96
|
+
The feature generator will create a Platform independent feature and its files.
|
97
|
+
So this command will create the FeatureName.feature file inside the folder `feature`, the file FeatureName_steps.rb inside the folder `features/step_definitions`, the files FeatureName_screen.rb inside the folders `features/android/screens` and `features/ios/screens`.
|
98
|
+
|
99
|
+
|
100
|
+
#### Independent Feature by platform
|
87
101
|
|
88
102
|
To create calabash based files:
|
89
103
|
|
90
104
|
```
|
91
|
-
suno generate
|
92
|
-
suno generate
|
105
|
+
suno generate android-feature calabash AndroidFeatureName
|
106
|
+
suno generate ios-feature calabash iOSFeatureName
|
93
107
|
```
|
94
108
|
|
95
109
|
To create appium based files:
|
96
110
|
|
97
111
|
```
|
98
|
-
suno generate
|
99
|
-
suno generate
|
112
|
+
suno generate android-feature appium AndroidFeatureName
|
113
|
+
suno generate ios-feature appium iOSFeatureName
|
100
114
|
|
101
115
|
```
|
102
116
|
|
@@ -135,15 +149,15 @@ The screen generator will create both Platform dependent screens in the folders
|
|
135
149
|
To create calabash based files:
|
136
150
|
|
137
151
|
```
|
138
|
-
suno generate
|
139
|
-
suno generate
|
152
|
+
suno generate android-screen calabash AndroidScreenName
|
153
|
+
suno generate ios-screen calabash iOSScreenName
|
140
154
|
```
|
141
155
|
|
142
156
|
To create appium based files:
|
143
157
|
|
144
158
|
```
|
145
|
-
suno generate
|
146
|
-
suno generate
|
159
|
+
suno generate android-screen appium AndroidScreenName
|
160
|
+
suno generate ios-screen appium iOSScreenName
|
147
161
|
```
|
148
162
|
|
149
163
|
The android-screen and ios-screen will create only the Android and iOS dependent screens respectively.
|
data/change_log.md
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
## Change log Sunomono
|
2
|
+
|
3
|
+
|
4
|
+
### Version 1.0.4
|
5
|
+
|
6
|
+
- Change the method name to identificator, because the element name
|
7
|
+
overriding the appium element class and the driver dont start.
|
8
|
+
- Create check_trait method
|
9
|
+
- adding automationName to android caps to avoid problems on locate
|
10
|
+
elements on the screen
|
11
|
+
- Change appium screen template
|
12
|
+
- Bumped the gem to 1.0.4
|
13
|
+
|
@@ -149,7 +149,7 @@ end
|
|
149
149
|
|
150
150
|
def framework_avaliable?(framework)
|
151
151
|
if framework.downcase != 'calabash' && framework.downcase != 'appium'
|
152
|
-
puts
|
152
|
+
puts "#{framework} is a invalid framework choice calabash or appium"
|
153
153
|
exit 1
|
154
154
|
end
|
155
155
|
end
|
@@ -1,4 +1,7 @@
|
|
1
1
|
[caps]
|
2
2
|
platformName = "Platform name e.g Android"
|
3
3
|
deviceName = "Device name e.g Nexus_5 or device ID"
|
4
|
-
app = "path to apk"
|
4
|
+
app = "path to apk"
|
5
|
+
# Use automationName with UiAutomator2, because default automator,
|
6
|
+
# not recognize any elements on the screen
|
7
|
+
automationName = "UiAutomator2"
|
data/lib/sunomono.rb
CHANGED
@@ -14,7 +14,7 @@ module Sunomono
|
|
14
14
|
class Generate < Thor
|
15
15
|
include Thor::Actions
|
16
16
|
|
17
|
-
desc '
|
17
|
+
desc 'calabash-feature [RESOURCE_NAME]', 'Generates an OS independent feature'
|
18
18
|
option :lang,
|
19
19
|
banner: 'any of the gherkin supported languages',
|
20
20
|
default: :en
|
@@ -29,7 +29,7 @@ module Sunomono
|
|
29
29
|
create_screen_file name, 'IOS'
|
30
30
|
end
|
31
31
|
|
32
|
-
desc '
|
32
|
+
desc 'appium-feature [RESOURCE_NAME]', 'Generates an OS independent feature'
|
33
33
|
option :lang,
|
34
34
|
banner: 'any of the gherkin supported languages',
|
35
35
|
default: :en
|
@@ -237,10 +237,7 @@ module Sunomono
|
|
237
237
|
default: :en
|
238
238
|
|
239
239
|
def new(platform, name)
|
240
|
-
|
241
|
-
puts "#{platform} is a invalid platform, please type calabash or appium"
|
242
|
-
exit 1
|
243
|
-
end
|
240
|
+
framework_avaliable?(platform)
|
244
241
|
|
245
242
|
I18n.config.default_locale = options[:lang]
|
246
243
|
# Thor will be responsible to look for identical
|
data/lib/sunomono/version.rb
CHANGED
@@ -1,13 +1,19 @@
|
|
1
1
|
require 'appium_lib'
|
2
2
|
|
3
3
|
class BaseScreen
|
4
|
-
def self.
|
4
|
+
def self.identificator(element_name, &block)
|
5
5
|
define_method(element_name.to_s, *block)
|
6
6
|
end
|
7
7
|
|
8
8
|
class << self
|
9
|
-
alias_method :value, :
|
10
|
-
alias_method :action, :
|
11
|
-
alias_method :trait, :
|
9
|
+
alias_method :value, :identificator
|
10
|
+
alias_method :action, :identificator
|
11
|
+
alias_method :trait, :identificator
|
12
|
+
end
|
13
|
+
|
14
|
+
def check_trait(timeout = 10)
|
15
|
+
raise ElementNotFoundError,
|
16
|
+
"#{trait} not found" unless
|
17
|
+
wait_true(timeout) { find_element(:id, trait).displayed? }
|
12
18
|
end
|
13
19
|
end
|
@@ -1,7 +1,6 @@
|
|
1
1
|
class <%= config[:name] %>Screen < BaseScreen
|
2
|
-
|
3
|
-
#trait(:trait) { "'#{layout_name}'" }
|
2
|
+
|
4
3
|
# <%= I18n.translate 'comments.elements' %>
|
5
|
-
#
|
6
|
-
#
|
4
|
+
# identificator(:trait) { pending 'Insert button identificator' }
|
5
|
+
# identificator(:button) { pending 'Insert button identificator' }
|
7
6
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sunomono
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Oscar Tanner
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2017-
|
12
|
+
date: 2017-11-13 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -117,6 +117,7 @@ files:
|
|
117
117
|
- SUNOMONO_CALABASH.md
|
118
118
|
- bin/suno
|
119
119
|
- bin/sunomono
|
120
|
+
- change_log.md
|
120
121
|
- circle.yml
|
121
122
|
- lib/aws/android/app_installation_hooks.rb
|
122
123
|
- lib/aws/android/app_life_cycle_hooks.rb
|