Skip to content

Commit

Permalink
Merge pull request #1295 from calabash/release/0.20.5
Browse files Browse the repository at this point in the history
Release/0.20.5
  • Loading branch information
jmoody authored Apr 19, 2017
2 parents 4753008 + d564ab3 commit 348a902
Show file tree
Hide file tree
Showing 12 changed files with 197 additions and 12 deletions.
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
### 0.20.5

This release adds a public API for manually managing SpringBoard alerts.
This behavior is only available when running with Xcode 8.x. See this
pull-request for API examples: [run\_loop#611](https://github.com/calabash/run_loop/pull/611).

This release does not require a server update.

* IRB: rescue LoadError on require 'irb/\*' #1294
* DeviceAgent: add public API for managing SpringBoard alerts #1292
* Fix logical inconsistency in warning emitted by
Launcher#calabash\_no\_launch? #1275 @duboviy
* Fix typo in contributing doc #1264 @acroos
* Update Calabash.podspec #1253 @nadzeya

### 0.20.4

This release, combined with DeviceAgent 1.0.4 and run-loop 2.2.4
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ on how to make a good commit message.
Xamarin has a two additional support channels for you. If your question or bug report is UITest or Test Cloud related, your best chance of quick, accurate response will be on one of these channels.

1. [Post your question on the Xamarin Forums](http://forums.xamarin.com/categories/xamarin-test-cloud).
2. [mailto:support@example.org](Send and email to support@xamarin.com)
2. [Send an email to support@xamarin.com](mailto:support@xamarin.com)

### CI Environments (Travis, Jenkins, Bamboo, Team City)

Expand Down
2 changes: 1 addition & 1 deletion Calabash.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Pod::Spec.new do |s|

s.name = 'Calabash'
s.version = '0.20.3'
s.version = '0.20.4'
s.license = { :type => 'Eclipse Public License 1.0', :text => <<-LICENSE
Calabash-ios Copyright (2016) Xamarin. All rights reserved.
The use and distribution terms for this software are covered by the
Expand Down
1 change: 0 additions & 1 deletion calabash-cucumber/bin/calabash-ios
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/usr/bin/env ruby

require 'rubygems'
require 'fileutils'
require 'cfpropertylist'
require 'rexml/document'
Expand Down
1 change: 0 additions & 1 deletion calabash-cucumber/bin/frank-calabash
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/usr/bin/env ruby

require 'rubygems'
require 'fileutils'

def print_usage
Expand Down
2 changes: 1 addition & 1 deletion calabash-cucumber/calabash-cucumber.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Gem::Specification.new do |s|
# Match the xamarin-test-cloud dependency.
s.add_dependency('bundler', '~> 1.3')
s.add_dependency("clipboard", "~> 1.0")
s.add_dependency("run_loop", ">= 2.2.4", "< 3.0")
s.add_dependency("run_loop", ">= 2.4.1", "< 3.0")

# Shared with run-loop.
s.add_dependency('json')
Expand Down
68 changes: 68 additions & 0 deletions calabash-cucumber/lib/calabash-cucumber/device_agent.rb
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,74 @@ def springboard_alert
client.springboard_alert
end

# EXPERIMENTAL: This API may change.
#
# Disables Calabash's ability to dismiss SpringBoard alerts automatically.
def dismiss_springboard_alerts_automatically!
client.set_dismiss_springboard_alerts_automatically(true)
end

# EXPERIMENTAL: This API may change.
#
# Enables Calabash's ability to dismiss SpringBoard alerts automatically.
def dismiss_springboard_alerts_manually!
client.set_dismiss_springboard_alerts_automatically(false)
end

# EXPERIMENTAL: This API may change.
#
# Enables or disables Calabash's ability to dismiss SpringBoard alerts
# automatically.
#
# @param true_or_false
def set_dismiss_springboard_alerts_automatically(true_or_false)
client.set_dismiss_springboard_alerts_automatically(true_or_false)
end

# EXPERIMENTAL: This API may change.
#
# Wait for a SpringBoard alert to appear.
def wait_for_springboard_alert(timeout=nil)
if timeout
client.wait_for_springboard_alert(timeout)
else
client.wait_for_springboard_alert
end
end

# EXPERIMENTAL: This API may change.
#
# Wait for a SpringBoard alert to disappear.
def wait_for_no_springboard_alert(timeout=nil)
if timeout
client.wait_for_no_springboard_alert(timeout)
else
client.wait_for_no_springboard_alert
end
end

# EXPERIMENTAL: This API may change.
#
# @param [String] button_title The title of the button to touch.
#
# Please pay attention to non-ASCII characters in button titles.
#
# "Don’t Allow" => UTF-8 single quote in Don't
# "Don't Allow" => ASCII single quote in Don't
#
# Only UTF-8 string will match the button title.
#
# @return true if a SpringBoard alert is dismissed.
#
# @raise RuntimeError If there is no SpringBoard alert visible
# @raise RuntimeError If the SpringBoard alert does not have a button
# matching button_title.
# @raise RuntimeError If there is an error dismissing the SpringBoard
# alert.
def dismiss_springboard_alert(button_title)
client.dismiss_springboard_alert(button_title)
end

=begin
PRIVATE
=end
Expand Down
4 changes: 2 additions & 2 deletions calabash-cucumber/lib/calabash-cucumber/keyboard_helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ def keyboard_type(query = "* isFirstResponder:1")
query_result = _query_wrapper(query, :keyboardType).first
keyboard_type = KEYBOARD_TYPES[query_result]

if !keyboard_type
if !keyboard_type
RunLoop.log_debug("Found query_result:#{query_result}, but expected
to match key in #{KEYBOARD_TYPES}")
keyboard_type = :unknown
Expand All @@ -227,7 +227,7 @@ def keyboard_type(query = "* isFirstResponder:1")

private

# @!visbility private
# @!visibility private
KEYBOARD_TYPES = {
0 => :default,
1 => :ascii_capable,
Expand Down
2 changes: 1 addition & 1 deletion calabash-cucumber/lib/calabash-cucumber/launcher.rb
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ def calabash_no_launch?
RunLoop.log_warn(%Q[
Calabash::Cucumber::Launcher #calabash_no_launch? and support for the NO_LAUNCH
environment variable has been removed from Calabash. This always returns
true. Please remove this method call from your hooks.
false. Please remove this method call from your hooks.
])
false
end
Expand Down
2 changes: 1 addition & 1 deletion calabash-cucumber/lib/calabash-cucumber/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module Cucumber

# @!visibility public
# The Calabash iOS gem version.
VERSION = "0.20.4"
VERSION = "0.20.5"

# @!visibility public
# The minimum required version of the Calabash embedded server.
Expand Down
19 changes: 16 additions & 3 deletions calabash-cucumber/scripts/.irbrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
require "irb/completion"
require "irb/ext/save-history"
require "benchmark"
begin
require "irb/completion"
require "irb/ext/save-history"
rescue LoadError => e
puts %Q[
Caught a LoadError while requiring an irb module.
#{e}
An error like this usually means your ruby installation is corrupt.
]
exit(1)
end

begin
require "awesome_print"
Expand All @@ -25,6 +36,8 @@ $ gem install calabash-cucumber
exit(1)
end

require "benchmark"

AwesomePrint.irb!

ARGV.concat ["--readline", "--prompt-mode", "simple"]
Expand Down
91 changes: 91 additions & 0 deletions changelog/0.20.5.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
### 0.20.5

This release combined with run-loop 2.4.1 provides fixes for several critical
bugs related to:

1. Code signing the DeviceAgent-Runner.app for physical devices
2. Text entry and keyboard interactions

This release does not require a server update.

### Code Signing

Definining a `CODE_SIGN_IDENTITY` is no longer necessary, but is
supported if for some reason you require a specific identity for
signing.

The code signing algorithm has been improved. We expect there will be
fewer problems installing DeviceAgent-Runner.app on physical devices.

However, @ablarg\_twitter has identified a problem with adopting 2.4.1 -
DeviceAgent installation may fail with this error message:

```
This application's application-identifier entitlement does not match
that of the installed application
```

A fix for this problem will be available in the next release of
run-loop.

### Text Entry

Text entry is stable on all architectures. Previously we reported that
text entry was not stable on i386 simulators and armv7 devices.

### Apple System Ruby

Calabash no longer supports running with Apple's system ruby.

We recommend using rbenv. We has updated our
[Ruby on MacOS](https://github.com/calabash/calabash-ios/wiki/Ruby-on-MacOS)
page with more details.

We are recommending that users install ruby 2.3.1 or higher. Ruby 2.4
_is not supported at this time_. We are aware that this is causing
problems for some users. We are tracking this issue here:

* Cannot use Ruby 2.4.x, which uses JSON 2.x, with Calabash iOS #1286

### iOS 8 and MacOS Sierra

Apple has removed UIAutomation from Xcode 8. Our replacement for UIAutomation
is DeviceAgent. DeviceAgent is based on Apple's XCUITest framework. XCUITest
is only available for iOS > 9. If you need to test iOS 8, you must have Xcode 7
installed. macOS Sierra does not support Xcode 7. Keep this in mind when making
your macOS upgrade plans.

### Breaking Changes

0.20.0 shipped with a mistake in the `Calabash::Cucumber::DeviceAgent`
API. That module incorrect forwarded missing methods to `Core`. Some
users will experience failing tests if they are making calls to `Core`
methods through the `Core::device_agent` method. You should only be
calling `Core#device_agent` if absolutely necessary. As time goes on,
we are finding edge cases where the DeviceAgent query engine is extremely
slow to respond.

### DeviceAgent

Our goal for this transition is 100% backward compatibility with
UIAutomation. We think we are close, but we need your help to discover
what is missing. Since UIAutomation is not available, all `uia_*` calls
now raise an error when tests are run with DeviceAgent. The text of the
error will have workarounds and examples to help you transition your
tests. When you find something you cannot do with DeviceAgent, please
create a GitHub issue.

Please see the
[DeviceAgent](https://github.com/calabash/calabash-ios/wiki/DeviceAgent)
on the Calabash iOS Wiki for more details.

Requirements:

* Calabash iOS server == 0.20.4
* run\_loop >= 2.4.1
* Ruby >= 2.2, < 2.4

These two wiki pages have instructions for updating the most recent versions.

* [Updating your Calabash iOS version.](https://github.com/calabash/calabash-ios/wiki/B1-Updating-your-Calabash-iOS-version)
* [Updating your run-loop version.](https://github.com/calabash/calabash-ios/wiki/Updating-your-run-loop-version)

0 comments on commit 348a902

Please sign in to comment.