appium_capybara 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0ff17c423f2cd9915801abcce91f72d23933eb13
4
- data.tar.gz: c90294a8d5c44ac21f859ec9f617d2737ce1cb11
3
+ metadata.gz: ca507d5d838309ce9f87abb36b455d93f1976f50
4
+ data.tar.gz: 455c1acb293a3d4dd21345ae8d9fadc95b26902a
5
5
  SHA512:
6
- metadata.gz: 55e306b1d46ecd54c261e43b1ad645ee41b15af529c89722bdafbcb1ebf759d14430037aa2345f63aa3908b5f0dde259d2db7901c0c969949f17e2fa64e0518d
7
- data.tar.gz: 7abf9df9044ff3995259988496e97b733c20c94cfebd602370ee13a5d04dfd9bd3264854525b30c8319fab9de417b0bfd6078104aa3599d53f302a5b820acb89
6
+ metadata.gz: 5b1beedf97fffe89d72d7e45ef69eb5630f44e23c67aaa1a26c9de87a43efbdfe90ef4301d4a510e7fb6f6b4faaa23c9a6049ab1b8328801dd4f526fcfa97b1a
7
+ data.tar.gz: 38c63a6beb485723a0e164124dd2132d454a42dd5409008392628841be99438c8ec165254cd49f58d5f614b91e77fd6564e51f0c37e95f8a6d4dfc5770dfbd4e
data/README.md CHANGED
@@ -1,11 +1,14 @@
1
- appium_capybara
2
- ===============
1
+ # appium_capybara [![Gem Version](https://badge.fury.io/rb/appium_capybara.svg)](http://badge.fury.io/rb/appium_capybara)
2
+
3
3
 
4
4
  Gem enabling appium support in capybara
5
5
 
6
- ##Driver Setup
6
+ ## Driver Setup
7
7
  Set up the appium_capybara driver by running this before starting your test.
8
+
8
9
  ```ruby
10
+ require 'appium_capybara'
11
+
9
12
  desired_caps_ios = {
10
13
  platform: "Mac",
11
14
  deviceName: "iPhone Simulator",
@@ -13,7 +16,9 @@ desired_caps_ios = {
13
16
  platformVersion: "7.1",
14
17
  app: "full/path/to/app.zip"
15
18
  }
19
+
16
20
  url = "http://localhost:4723/wd/hub" # or a sauce labs url
21
+
17
22
  Capybara.register_driver(:appium) do |app|
18
23
  appium_lib_options = {
19
24
  server_url: url
@@ -23,6 +28,12 @@ Capybara.register_driver(:appium) do |app|
23
28
  caps: desired_caps_ios
24
29
  }
25
30
  Appium::Capybara::Driver.new app, all_options
26
- end
31
+ end
32
+
27
33
  Capybara.default_driver = :appium
28
- ```
34
+ ```
35
+
36
+ ## Publishing to rubygems
37
+
38
+ Make sure to run `thor bump` or manually modify version.rb before publishing. RubyGems will not allow the same
39
+ version to be published twice. After the version is bumped, run `thor publish`
@@ -1,5 +1,11 @@
1
1
  require_relative 'lib/appium_capybara/version'
2
2
 
3
+ class Gem::Specification
4
+ def remove_zip_files array
5
+ array.reject { |e| File.extname(e).downcase == '.zip' }
6
+ end
7
+ end
8
+
3
9
  Gem::Specification.new do |s|
4
10
  # 1.8.x is not supported
5
11
  s.required_ruby_version = '>= 1.9.3'
@@ -19,5 +25,5 @@ Gem::Specification.new do |s|
19
25
 
20
26
  s.add_development_dependency 'appium_thor', '~> 0.0', '>= 0.0.6'
21
27
 
22
- s.files = `git ls-files`.split "\n"
28
+ s.files = s.remove_zip_files(`git ls-files`.split("\n"))
23
29
  end
data/example/Gemfile ADDED
@@ -0,0 +1,5 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gem 'appium_capybara', '~> 0.0.1'
4
+ gem 'rspec', '~> 3.0.0'
5
+ gem 'site_prism', '~> 2.6'
@@ -0,0 +1,8 @@
1
+ [caps]
2
+ platformName = "ios"
3
+ deviceName ="iPhone Simulator"
4
+ app = "./UICatalog.app.zip"
5
+
6
+ [appium_lib]
7
+ sauce_username = ""
8
+ sauce_access_key = ""
@@ -0,0 +1,10 @@
1
+ require 'appium_capybara'
2
+ require 'rspec'
3
+ require 'site_prism'
4
+
5
+ Capybara.register_driver(:appium) do |app|
6
+ opts = Appium.load_appium_txt file: File.join(Dir.pwd, 'appium.txt')
7
+ Appium::Capybara::Driver.new app, opts
8
+ end
9
+
10
+ Capybara.default_driver = :appium
@@ -0,0 +1,7 @@
1
+ module Pages
2
+ class Home < SitePrism::Page
3
+ # UIANavigationBar
4
+ # name: UICatalog
5
+ elements :navigation_bar, :accessibility_id, 'UICatalog'
6
+ end
7
+ end
@@ -0,0 +1,8 @@
1
+ require_relative 'spec_helper'
2
+
3
+ describe 'UICatalog smoke test' do
4
+ it 'should detect the nav bar' do
5
+ home_page = Pages::Home.new
6
+ expect(home_page.navigation_bar.first).to be_truthy
7
+ end
8
+ end
@@ -0,0 +1,4 @@
1
+ require_relative 'capybara_init'
2
+
3
+ # pages
4
+ require_relative 'home_page'
@@ -26,4 +26,7 @@ Capybara.add_selector(:class) do
26
26
  end
27
27
  Capybara.add_selector(:name) do
28
28
  custom(:name) { |locator| locator }
29
+ end
30
+ Capybara.add_selector(:accessibility_id) do
31
+ custom(:accessibility_id) { |locator| locator }
29
32
  end
@@ -1,6 +1,6 @@
1
1
  module Appium
2
2
  module Capybara
3
- VERSION = '0.0.1' unless defined? ::Appium::Capybara::VERSION
4
- DATE = '2014-07-31' unless defined? ::Appium::Capybara::DATE
3
+ VERSION = '0.0.2' unless defined? ::Appium::Capybara::VERSION
4
+ DATE = '2014-08-01' unless defined? ::Appium::Capybara::DATE
5
5
  end
6
6
  end
data/release_notes.md ADDED
@@ -0,0 +1,13 @@
1
+ #### v0.0.2 2014-08-01
2
+
3
+ - [de768ce](https://github.com/appium/appium_capybara/commit/de768cecd634f0079867aceb41350ba808423add) Release 0.0.2
4
+ - [3d8b064](https://github.com/appium/appium_capybara/commit/3d8b064bb79100a5da1644abc00e21765053558e) Merge pull request #2 from appium/accessibility_id
5
+ - [839ada4](https://github.com/appium/appium_capybara/commit/839ada45545b92e1162225b64d3e00ac36d8f86e) Find by accessibility_id
6
+ - [d12cd0b](https://github.com/appium/appium_capybara/commit/d12cd0b2d5e1a3d42c2b45c6ef7f6f10da9f5f28) Add Gemfile for example
7
+ - [f5acbac](https://github.com/appium/appium_capybara/commit/f5acbacc26ea3e59d5822f52b1a75d6838da6ca9) Update example
8
+ - [09d08d2](https://github.com/appium/appium_capybara/commit/09d08d2bcde545a0fc414acaf3e201d08d862a01) Update example
9
+ - [c77fe1d](https://github.com/appium/appium_capybara/commit/c77fe1dc7fdd91a7697617be0e867ea4b4610bcc) Delete gemnasium badge until it's fixed
10
+ - [58ddf67](https://github.com/appium/appium_capybara/commit/58ddf676d3d31e8b16feeff251e5958daa8363b0) Add example. Remove zip from gemfile
11
+ - [cb08a1f](https://github.com/appium/appium_capybara/commit/cb08a1f61e6c2a896c1c7d65175d1bd3e1f866d5) Update README.md
12
+ - [b862741](https://github.com/appium/appium_capybara/commit/b8627416054552b72e501e1203c1fb3dd734daf7) Add gem badges
13
+ - [08c2579](https://github.com/appium/appium_capybara/commit/08c257956de7e6e391cb4228dbe9f429da9cc90b) Add publishing note to readme. Add rel notes
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: appium_capybara
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - sbonebrake@yammer-inc.com
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-07-31 00:00:00.000000000 Z
12
+ date: 2014-08-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: appium_lib
@@ -85,6 +85,12 @@ files:
85
85
  - README.md
86
86
  - Thorfile
87
87
  - appium_capybara.gemspec
88
+ - example/Gemfile
89
+ - example/appium.txt
90
+ - example/spec/capybara_init.rb
91
+ - example/spec/home_page.rb
92
+ - example/spec/ios_example_spec.rb
93
+ - example/spec/spec_helper.rb
88
94
  - lib/appium_capybara.rb
89
95
  - lib/appium_capybara/driver/appium/driver.rb
90
96
  - lib/appium_capybara/driver/appium/node.rb
@@ -94,6 +100,7 @@ files:
94
100
  - lib/appium_capybara/ext/selector_ext.rb
95
101
  - lib/appium_capybara/ext/session_ext.rb
96
102
  - lib/appium_capybara/version.rb
103
+ - release_notes.md
97
104
  homepage: https://github.com/appium/appium_capybara
98
105
  licenses:
99
106
  - http://www.apache.org/licenses/LICENSE-2.0.txt