test_sweet 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +18 -0
- data/CODE_OF_CONDUCT.md +13 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +88 -0
- data/LICENSE.txt +21 -0
- data/README.md +32 -0
- data/Rakefile +1 -0
- data/app/app_delegate.rb +5 -0
- data/bin/console +14 -0
- data/bin/setup +7 -0
- data/lib/tasks/test_sweet.rb +35 -0
- data/lib/test_sweet/version.rb +3 -0
- data/lib/test_sweet.rb +35 -0
- data/resources/Default-568h@2x.png +0 -0
- data/templates/CODE_OF_CONDUCT.md +13 -0
- data/templates/Gemfile +4 -0
- data/templates/Gemfile.lock +88 -0
- data/templates/LICENSE.txt +21 -0
- data/templates/README.md +43 -0
- data/templates/Rakefile +1 -0
- data/templates/features/example.feature +8 -0
- data/templates/features/step_definitions/core_steps.rb +11 -0
- data/templates/features/step_definitions/example_steps.rb +7 -0
- data/templates/features/step_definitions/screenshotting_steps.rb +6 -0
- data/templates/features/support/env.rb +28 -0
- data/test_sweet.gemspec +28 -0
- metadata +157 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 95a1fa5ce2c8c9d7bb64bca93da6eafa224e9238
|
4
|
+
data.tar.gz: e05cfafbd044d0458b578771ca8ad328d8a77685
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: fcbbc76a7dec0d932f58adfca01bc9ff8f45cc0bb9fbf56a5943d59a8b387564ae60abf802987dcd9463dce64f453d60d8566aebd0199fc68d5baca5c75618c9
|
7
|
+
data.tar.gz: e3aa07233a4af24919e234957dede1d8fce4de6721a7a63637ac1c07895f32ca74bccecbd328f2805d367f9717f738d61b540aed6756c60b38705da5785df813
|
data/.gitignore
ADDED
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
# Contributor Code of Conduct
|
2
|
+
|
3
|
+
As contributors and maintainers of this project, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
|
4
|
+
|
5
|
+
We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, age, or religion.
|
6
|
+
|
7
|
+
Examples of unacceptable behavior by participants include the use of sexual language or imagery, derogatory comments or personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct.
|
8
|
+
|
9
|
+
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed from the project team.
|
10
|
+
|
11
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.
|
12
|
+
|
13
|
+
This Code of Conduct is adapted from the [Contributor Covenant](http:contributor-covenant.org), version 1.0.0, available at [http://contributor-covenant.org/version/1/0/0/](http://contributor-covenant.org/version/1/0/0/)
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,88 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
test_sweet (0.1.0)
|
5
|
+
appium_lib (>= 7.0)
|
6
|
+
cucumber (>= 2.0)
|
7
|
+
motion-juxtapose (>= 0.3)
|
8
|
+
rspec (>= 3.3.0)
|
9
|
+
|
10
|
+
GEM
|
11
|
+
remote: https://rubygems.org/
|
12
|
+
specs:
|
13
|
+
appium_lib (7.0.0)
|
14
|
+
awesome_print (~> 1.6)
|
15
|
+
json (~> 1.8)
|
16
|
+
nokogiri (~> 1.6.6)
|
17
|
+
selenium-webdriver (~> 2.45)
|
18
|
+
toml (~> 0.0)
|
19
|
+
awesome_print (1.6.1)
|
20
|
+
blankslate (2.1.2.4)
|
21
|
+
builder (3.2.2)
|
22
|
+
childprocess (0.5.6)
|
23
|
+
ffi (~> 1.0, >= 1.0.11)
|
24
|
+
cucumber (2.0.0)
|
25
|
+
builder (>= 2.1.2)
|
26
|
+
cucumber-core (~> 1.1.3)
|
27
|
+
diff-lcs (>= 1.1.3)
|
28
|
+
gherkin (~> 2.12)
|
29
|
+
multi_json (>= 1.7.5, < 2.0)
|
30
|
+
multi_test (>= 0.1.2)
|
31
|
+
cucumber-core (1.1.3)
|
32
|
+
gherkin (~> 2.12.0)
|
33
|
+
diff-lcs (1.2.5)
|
34
|
+
ffi (1.9.10)
|
35
|
+
gherkin (2.12.2)
|
36
|
+
multi_json (~> 1.3)
|
37
|
+
haml (4.0.6)
|
38
|
+
tilt
|
39
|
+
json (1.8.3)
|
40
|
+
mini_portile (0.6.2)
|
41
|
+
motion-juxtapose (0.3.1)
|
42
|
+
haml
|
43
|
+
sinatra (~> 1.4)
|
44
|
+
multi_json (1.11.2)
|
45
|
+
multi_test (0.1.2)
|
46
|
+
nokogiri (1.6.6.2)
|
47
|
+
mini_portile (~> 0.6.0)
|
48
|
+
parslet (1.5.0)
|
49
|
+
blankslate (~> 2.0)
|
50
|
+
rack (1.6.4)
|
51
|
+
rack-protection (1.5.3)
|
52
|
+
rack
|
53
|
+
rake (10.4.2)
|
54
|
+
rspec (3.3.0)
|
55
|
+
rspec-core (~> 3.3.0)
|
56
|
+
rspec-expectations (~> 3.3.0)
|
57
|
+
rspec-mocks (~> 3.3.0)
|
58
|
+
rspec-core (3.3.1)
|
59
|
+
rspec-support (~> 3.3.0)
|
60
|
+
rspec-expectations (3.3.0)
|
61
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
62
|
+
rspec-support (~> 3.3.0)
|
63
|
+
rspec-mocks (3.3.1)
|
64
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
65
|
+
rspec-support (~> 3.3.0)
|
66
|
+
rspec-support (3.3.0)
|
67
|
+
rubyzip (1.1.7)
|
68
|
+
selenium-webdriver (2.46.2)
|
69
|
+
childprocess (~> 0.5)
|
70
|
+
multi_json (~> 1.0)
|
71
|
+
rubyzip (~> 1.0)
|
72
|
+
websocket (~> 1.0)
|
73
|
+
sinatra (1.4.6)
|
74
|
+
rack (~> 1.4)
|
75
|
+
rack-protection (~> 1.4)
|
76
|
+
tilt (>= 1.3, < 3)
|
77
|
+
tilt (2.0.1)
|
78
|
+
toml (0.1.2)
|
79
|
+
parslet (~> 1.5.0)
|
80
|
+
websocket (1.2.2)
|
81
|
+
|
82
|
+
PLATFORMS
|
83
|
+
ruby
|
84
|
+
|
85
|
+
DEPENDENCIES
|
86
|
+
bundler (~> 1.9)
|
87
|
+
rake (~> 10.0)
|
88
|
+
test_sweet!
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2015 David Larrabee
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
# Test Sweet
|
2
|
+
|
3
|
+
Integration testing your RubyMotion applications the simple and sweet way.
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
gem 'test_sweet'
|
10
|
+
|
11
|
+
And then execute:
|
12
|
+
|
13
|
+
$ bundle
|
14
|
+
$ rake test_sweet
|
15
|
+
|
16
|
+
Or install it yourself as:
|
17
|
+
|
18
|
+
$ gem install test_sweet
|
19
|
+
|
20
|
+
## Usage
|
21
|
+
|
22
|
+
After you have initialized your Test Sweet you can add new features and run them with the same command.
|
23
|
+
|
24
|
+
$ rake test_sweet
|
25
|
+
|
26
|
+
## Contributing
|
27
|
+
|
28
|
+
1. Fork it
|
29
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
30
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
31
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
32
|
+
5. Create new Pull Request
|
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require "bundler/gem_tasks"
|
data/app/app_delegate.rb
ADDED
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "sabram"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start
|
data/bin/setup
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
namespace :test_sweet do
|
2
|
+
desc "Initial setup of Test Sweet"
|
3
|
+
task :initialize do
|
4
|
+
if TestSweet.verify_initialized
|
5
|
+
puts "TestSweet seems to already be initialized, start testing!"
|
6
|
+
else
|
7
|
+
TestSweet.init
|
8
|
+
puts "TestSweet has been setup, write your features and run again!"
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
task :prepare do
|
13
|
+
Rake::Task["build:simulator"].invoke
|
14
|
+
end
|
15
|
+
|
16
|
+
desc "Run integration tests"
|
17
|
+
task :run do
|
18
|
+
if TestSweet.verify_initialized
|
19
|
+
Rake::Task["test_sweet:prepare"].invoke
|
20
|
+
ENV['test_sweet-target'] = Motion::Project::App.config.deployment_target
|
21
|
+
ENV['test_sweet-app'] = Motion::Project::App.config.app_bundle('iPhoneSimulator')
|
22
|
+
ENV['test_sweet-device-name'] = Motion::Project::App.config.device_family_string(
|
23
|
+
ENV['device'],
|
24
|
+
Motion::Project::App.config.device_family_ints[0],
|
25
|
+
ENV['test_sweet-target'],
|
26
|
+
ENV['retina'])
|
27
|
+
|
28
|
+
exec("cucumber")
|
29
|
+
else
|
30
|
+
Rake::Task["test_sweet:initialize"].invoke
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
desc "Shorthand for test_sweet:run"
|
35
|
+
task :test_sweet => ["test_sweet:run"]
|
data/lib/test_sweet.rb
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
require "test_sweet/version"
|
2
|
+
require 'fileutils'
|
3
|
+
require "rubygems"
|
4
|
+
require "tasks/test_sweet"
|
5
|
+
|
6
|
+
class TestSweet
|
7
|
+
def self.init
|
8
|
+
`cucumber --init`
|
9
|
+
|
10
|
+
spec = Gem::Specification.find_by_name("test_sweet")
|
11
|
+
gem_root = spec.gem_dir
|
12
|
+
|
13
|
+
files = [
|
14
|
+
'features/support/env.rb',
|
15
|
+
'features/step_definitions/core_steps.rb',
|
16
|
+
'features/step_definitions/example_steps.rb',
|
17
|
+
'features/step_definitions/screenshotting_steps.rb',
|
18
|
+
'features/example.feature'
|
19
|
+
]
|
20
|
+
|
21
|
+
files.each do |f|
|
22
|
+
content = File.open("#{gem_root}/templates/#{f}", "r").read
|
23
|
+
File.open(f, 'w+') { |file| file.write(content) }
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
def self.verify_initialized
|
28
|
+
begin
|
29
|
+
File.new('features/support/env.rb')
|
30
|
+
true
|
31
|
+
rescue Errno::ENOENT
|
32
|
+
false
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
Binary file
|
@@ -0,0 +1,13 @@
|
|
1
|
+
# Contributor Code of Conduct
|
2
|
+
|
3
|
+
As contributors and maintainers of this project, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
|
4
|
+
|
5
|
+
We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, age, or religion.
|
6
|
+
|
7
|
+
Examples of unacceptable behavior by participants include the use of sexual language or imagery, derogatory comments or personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct.
|
8
|
+
|
9
|
+
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed from the project team.
|
10
|
+
|
11
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.
|
12
|
+
|
13
|
+
This Code of Conduct is adapted from the [Contributor Covenant](http:contributor-covenant.org), version 1.0.0, available at [http://contributor-covenant.org/version/1/0/0/](http://contributor-covenant.org/version/1/0/0/)
|
data/templates/Gemfile
ADDED
@@ -0,0 +1,88 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
sabram (0.1.8)
|
5
|
+
appium_lib (>= 7.0)
|
6
|
+
cucumber (>= 2.0)
|
7
|
+
motion-juxtapose (>= 0.3)
|
8
|
+
rspec (>= 3.3.0)
|
9
|
+
|
10
|
+
GEM
|
11
|
+
remote: https://rubygems.org/
|
12
|
+
specs:
|
13
|
+
appium_lib (7.0.0)
|
14
|
+
awesome_print (~> 1.6)
|
15
|
+
json (~> 1.8)
|
16
|
+
nokogiri (~> 1.6.6)
|
17
|
+
selenium-webdriver (~> 2.45)
|
18
|
+
toml (~> 0.0)
|
19
|
+
awesome_print (1.6.1)
|
20
|
+
blankslate (2.1.2.4)
|
21
|
+
builder (3.2.2)
|
22
|
+
childprocess (0.5.6)
|
23
|
+
ffi (~> 1.0, >= 1.0.11)
|
24
|
+
cucumber (2.0.0)
|
25
|
+
builder (>= 2.1.2)
|
26
|
+
cucumber-core (~> 1.1.3)
|
27
|
+
diff-lcs (>= 1.1.3)
|
28
|
+
gherkin (~> 2.12)
|
29
|
+
multi_json (>= 1.7.5, < 2.0)
|
30
|
+
multi_test (>= 0.1.2)
|
31
|
+
cucumber-core (1.1.3)
|
32
|
+
gherkin (~> 2.12.0)
|
33
|
+
diff-lcs (1.2.5)
|
34
|
+
ffi (1.9.10)
|
35
|
+
gherkin (2.12.2)
|
36
|
+
multi_json (~> 1.3)
|
37
|
+
haml (4.0.6)
|
38
|
+
tilt
|
39
|
+
json (1.8.3)
|
40
|
+
mini_portile (0.6.2)
|
41
|
+
motion-juxtapose (0.3.1)
|
42
|
+
haml
|
43
|
+
sinatra (~> 1.4)
|
44
|
+
multi_json (1.11.2)
|
45
|
+
multi_test (0.1.2)
|
46
|
+
nokogiri (1.6.6.2)
|
47
|
+
mini_portile (~> 0.6.0)
|
48
|
+
parslet (1.5.0)
|
49
|
+
blankslate (~> 2.0)
|
50
|
+
rack (1.6.4)
|
51
|
+
rack-protection (1.5.3)
|
52
|
+
rack
|
53
|
+
rake (10.4.2)
|
54
|
+
rspec (3.3.0)
|
55
|
+
rspec-core (~> 3.3.0)
|
56
|
+
rspec-expectations (~> 3.3.0)
|
57
|
+
rspec-mocks (~> 3.3.0)
|
58
|
+
rspec-core (3.3.1)
|
59
|
+
rspec-support (~> 3.3.0)
|
60
|
+
rspec-expectations (3.3.0)
|
61
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
62
|
+
rspec-support (~> 3.3.0)
|
63
|
+
rspec-mocks (3.3.1)
|
64
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
65
|
+
rspec-support (~> 3.3.0)
|
66
|
+
rspec-support (3.3.0)
|
67
|
+
rubyzip (1.1.7)
|
68
|
+
selenium-webdriver (2.46.2)
|
69
|
+
childprocess (~> 0.5)
|
70
|
+
multi_json (~> 1.0)
|
71
|
+
rubyzip (~> 1.0)
|
72
|
+
websocket (~> 1.0)
|
73
|
+
sinatra (1.4.6)
|
74
|
+
rack (~> 1.4)
|
75
|
+
rack-protection (~> 1.4)
|
76
|
+
tilt (>= 1.3, < 3)
|
77
|
+
tilt (2.0.1)
|
78
|
+
toml (0.1.2)
|
79
|
+
parslet (~> 1.5.0)
|
80
|
+
websocket (1.2.2)
|
81
|
+
|
82
|
+
PLATFORMS
|
83
|
+
ruby
|
84
|
+
|
85
|
+
DEPENDENCIES
|
86
|
+
bundler (~> 1.9)
|
87
|
+
rake (~> 10.0)
|
88
|
+
sabram!
|
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2015 David Larrabee
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/templates/README.md
ADDED
@@ -0,0 +1,43 @@
|
|
1
|
+
# Sabram
|
2
|
+
|
3
|
+
Sabram helps you run integration tests against your RubyMotion application. You
|
4
|
+
can install it as a system gem and run the tests with the CLI or add it in your
|
5
|
+
gemfile and run the tests with the provided rake task
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
Add this line to your application's Gemfile:
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
gem 'sabram'
|
13
|
+
```
|
14
|
+
|
15
|
+
And then execute:
|
16
|
+
|
17
|
+
$ bundle
|
18
|
+
|
19
|
+
Or install it yourself as:
|
20
|
+
|
21
|
+
$ gem install sabram
|
22
|
+
|
23
|
+
## Usage
|
24
|
+
|
25
|
+
```
|
26
|
+
sabram --init
|
27
|
+
# run your appium server
|
28
|
+
sabram
|
29
|
+
```
|
30
|
+
|
31
|
+
## Development
|
32
|
+
|
33
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `bin/console` for an interactive prompt that will allow you to experiment.
|
34
|
+
|
35
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release` to create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
36
|
+
|
37
|
+
## Contributing
|
38
|
+
|
39
|
+
1. Fork it ( https://github.com/[my-github-username]/sabram/fork )
|
40
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
41
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
42
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
43
|
+
5. Create a new Pull Request
|
data/templates/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require "bundler/gem_tasks"
|
@@ -0,0 +1,11 @@
|
|
1
|
+
Given(/^I wait for (\d+) seconds$/) do |seconds|
|
2
|
+
sleep seconds.to_i
|
3
|
+
end
|
4
|
+
|
5
|
+
When(/^I touch at position (\d+),(\d+)$/) do |x, y|
|
6
|
+
Appium::TouchAction.new.press(x: x, y: y, fingers: 1, tapCount: 1, duration: 0.5).perform
|
7
|
+
end
|
8
|
+
|
9
|
+
When(/^I touch "([^"]*)"$/) do |view_name|
|
10
|
+
find_element(:name, view_name).click
|
11
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
require 'rspec'
|
2
|
+
require 'appium_lib'
|
3
|
+
require 'cucumber/ast'
|
4
|
+
require 'motion-juxtapose'
|
5
|
+
|
6
|
+
Juxtapose::AppiumStrategy.setup
|
7
|
+
|
8
|
+
# Create a custom World class so we don't pollute `Object` with Appium methods
|
9
|
+
class AppiumWorld; end
|
10
|
+
|
11
|
+
caps = {
|
12
|
+
caps: {
|
13
|
+
platformName: "ios",
|
14
|
+
platformVersion: ENV['target'],
|
15
|
+
app: ENV['test_sweet-app'],
|
16
|
+
deviceName: ENV['test_sweet-device-name']
|
17
|
+
}
|
18
|
+
}
|
19
|
+
Appium::Driver.new(caps)
|
20
|
+
|
21
|
+
Appium.promote_appium_methods AppiumWorld
|
22
|
+
|
23
|
+
World do
|
24
|
+
AppiumWorld.new
|
25
|
+
end
|
26
|
+
|
27
|
+
Before { $driver.start_driver }
|
28
|
+
After { $driver.driver_quit }
|
data/test_sweet.gemspec
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'test_sweet/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "test_sweet"
|
8
|
+
spec.version = TestSweet::VERSION
|
9
|
+
spec.authors = ["David Larrabee"]
|
10
|
+
spec.email = ["david.larrabee@meyouhealth.com"]
|
11
|
+
spec.description = %q{Integration testing your rubymotion applications the simple and sweet way.}
|
12
|
+
spec.summary = %q{Integration testing your rubymotion applications the simple and sweet way.}
|
13
|
+
spec.homepage = "https://github.com/squidpunch/test_sweet"
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
17
|
+
spec.bindir = "bin"
|
18
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
19
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
20
|
+
spec.require_paths = ["lib"]
|
21
|
+
|
22
|
+
spec.add_dependency "appium_lib", ">= 7.0"
|
23
|
+
spec.add_dependency "motion-juxtapose", ">= 0.3"
|
24
|
+
spec.add_dependency "cucumber", ">= 2.0"
|
25
|
+
spec.add_dependency "rspec", ">= 3.3.0"
|
26
|
+
spec.add_development_dependency "bundler", "~> 1.9"
|
27
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
28
|
+
end
|
metadata
ADDED
@@ -0,0 +1,157 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: test_sweet
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- David Larrabee
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-07-08 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: appium_lib
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '7.0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '7.0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: motion-juxtapose
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0.3'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0.3'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: cucumber
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '2.0'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '2.0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rspec
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 3.3.0
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 3.3.0
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: bundler
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '1.9'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '1.9'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rake
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '10.0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '10.0'
|
97
|
+
description: Integration testing your rubymotion applications the simple and sweet
|
98
|
+
way.
|
99
|
+
email:
|
100
|
+
- david.larrabee@meyouhealth.com
|
101
|
+
executables:
|
102
|
+
- console
|
103
|
+
- setup
|
104
|
+
extensions: []
|
105
|
+
extra_rdoc_files: []
|
106
|
+
files:
|
107
|
+
- ".gitignore"
|
108
|
+
- CODE_OF_CONDUCT.md
|
109
|
+
- Gemfile
|
110
|
+
- Gemfile.lock
|
111
|
+
- LICENSE.txt
|
112
|
+
- README.md
|
113
|
+
- Rakefile
|
114
|
+
- app/app_delegate.rb
|
115
|
+
- bin/console
|
116
|
+
- bin/setup
|
117
|
+
- lib/tasks/test_sweet.rb
|
118
|
+
- lib/test_sweet.rb
|
119
|
+
- lib/test_sweet/version.rb
|
120
|
+
- resources/Default-568h@2x.png
|
121
|
+
- templates/CODE_OF_CONDUCT.md
|
122
|
+
- templates/Gemfile
|
123
|
+
- templates/Gemfile.lock
|
124
|
+
- templates/LICENSE.txt
|
125
|
+
- templates/README.md
|
126
|
+
- templates/Rakefile
|
127
|
+
- templates/features/example.feature
|
128
|
+
- templates/features/step_definitions/core_steps.rb
|
129
|
+
- templates/features/step_definitions/example_steps.rb
|
130
|
+
- templates/features/step_definitions/screenshotting_steps.rb
|
131
|
+
- templates/features/support/env.rb
|
132
|
+
- test_sweet.gemspec
|
133
|
+
homepage: https://github.com/squidpunch/test_sweet
|
134
|
+
licenses:
|
135
|
+
- MIT
|
136
|
+
metadata: {}
|
137
|
+
post_install_message:
|
138
|
+
rdoc_options: []
|
139
|
+
require_paths:
|
140
|
+
- lib
|
141
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - ">="
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '0'
|
146
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
147
|
+
requirements:
|
148
|
+
- - ">="
|
149
|
+
- !ruby/object:Gem::Version
|
150
|
+
version: '0'
|
151
|
+
requirements: []
|
152
|
+
rubyforge_project:
|
153
|
+
rubygems_version: 2.2.2
|
154
|
+
signing_key:
|
155
|
+
specification_version: 4
|
156
|
+
summary: Integration testing your rubymotion applications the simple and sweet way.
|
157
|
+
test_files: []
|