run_loop 0.0.15 → 0.0.16

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: e15aebe74a7820488f165be856fae7da8c537245
4
- data.tar.gz: 3b37351e5551c10778b94e3aeeaff5f0a146f8c6
3
+ metadata.gz: aabb5bbbc7bf6211a9e87b46baf7457d99cb09ec
4
+ data.tar.gz: eb013c7fc3fed7008ba09827dbe87aa9083c0ed1
5
5
  SHA512:
6
- metadata.gz: 8f16a06b03f84929c4e9bb21a5da6eb9bd0933b215acb1b7f81236f7930404087c08b7c9d387cb020a7a72909f40a49e5055bd529cce30c139cc06cb10c6001e
7
- data.tar.gz: e91e79cf6162dc314dd46bf4ab7758ab058e2d129467eae9fd56ab4564255a3e39f85e654eb42e219882b4aa7dd0c315dc6a48fe6f687918709b05673f0b9a3b
6
+ metadata.gz: f74ac8bdf22e7dd2b2f90f20c975b12e351b546d891bd287fc0848bb35ad46315452fb8d3157e6fcb0bd05c3bad557c68f2bed1575a435cb35c11a38c12b1f29
7
+ data.tar.gz: 74c9a9cdba9ad1301d9e5f023cf1f221c835dfc905b5d6fb15ed585f1e8a55ef023c888f30e34502ff6fd7c96ee87ad699ba5873f5e6a3f7841e46e2a6c26388
data/lib/run_loop/core.rb CHANGED
@@ -34,7 +34,7 @@ module RunLoop
34
34
 
35
35
  device = options[:device] || :iphone
36
36
  udid = options[:udid]
37
- timeout = options[:timeout] || 10
37
+ timeout = options[:timeout] || 30
38
38
 
39
39
  log_file = options[:log_path]
40
40
 
@@ -125,7 +125,7 @@ module RunLoop
125
125
  read_response(run_loop, 0)
126
126
  end
127
127
  rescue TimeoutError => e
128
- raise TimeoutError, "Time out waiting for UIAutomation run-loop to Start. \n #{File.read(log_file)}"
128
+ raise TimeoutError, "Time out waiting for UIAutomation run-loop to Start. \n Logfile #{log_file} \n #{File.read(log_file)}"
129
129
  end
130
130
 
131
131
  run_loop
@@ -1,3 +1,3 @@
1
1
  module RunLoop
2
- VERSION = '0.0.15'
2
+ VERSION = '0.0.16'
3
3
  end
@@ -487,19 +487,6 @@ goog.base = function(me, opt_methodName, var_args) {
487
487
  goog.scope = function(fn) {
488
488
  fn.call(goog.global)
489
489
  };
490
- goog.provide("goog.debug.Error");
491
- goog.debug.Error = function(opt_msg) {
492
- if(Error.captureStackTrace) {
493
- Error.captureStackTrace(this, goog.debug.Error)
494
- }else {
495
- this.stack = (new Error).stack || ""
496
- }
497
- if(opt_msg) {
498
- this.message = String(opt_msg)
499
- }
500
- };
501
- goog.inherits(goog.debug.Error, Error);
502
- goog.debug.Error.prototype.name = "CustomError";
503
490
  goog.provide("goog.string");
504
491
  goog.provide("goog.string.Unicode");
505
492
  goog.string.Unicode = {NBSP:"\u00a0"};
@@ -940,6 +927,19 @@ goog.string.parseInt = function(value) {
940
927
  }
941
928
  return NaN
942
929
  };
930
+ goog.provide("goog.debug.Error");
931
+ goog.debug.Error = function(opt_msg) {
932
+ if(Error.captureStackTrace) {
933
+ Error.captureStackTrace(this, goog.debug.Error)
934
+ }else {
935
+ this.stack = (new Error).stack || ""
936
+ }
937
+ if(opt_msg) {
938
+ this.message = String(opt_msg)
939
+ }
940
+ };
941
+ goog.inherits(goog.debug.Error, Error);
942
+ goog.debug.Error.prototype.name = "CustomError";
943
943
  goog.provide("goog.asserts");
944
944
  goog.provide("goog.asserts.AssertionError");
945
945
  goog.require("goog.debug.Error");
@@ -20809,6 +20809,190 @@ calabash_script.utils.clj__GT_js = function clj__GT_js(x) {
20809
20809
  }
20810
20810
  }
20811
20811
  };
20812
+ goog.provide("calabash_script.ext");
20813
+ goog.require("cljs.core");
20814
+ goog.provide("calabash_script.log");
20815
+ goog.require("cljs.core");
20816
+ calabash_script.log.log = function() {
20817
+ var log__delegate = function(more) {
20818
+ return UIALogger.logMessage(cljs.core.apply.call(null, cljs.core.str, more))
20819
+ };
20820
+ var log = function(var_args) {
20821
+ var more = null;
20822
+ if(goog.isDef(var_args)) {
20823
+ more = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0)
20824
+ }
20825
+ return log__delegate.call(this, more)
20826
+ };
20827
+ log.cljs$lang$maxFixedArity = 0;
20828
+ log.cljs$lang$applyTo = function(arglist__2934) {
20829
+ var more = cljs.core.seq(arglist__2934);
20830
+ return log__delegate(more)
20831
+ };
20832
+ log.cljs$lang$arity$variadic = log__delegate;
20833
+ return log
20834
+ }();
20835
+ calabash_script.log.logTree = function logTree(el) {
20836
+ return el.logElementTree()
20837
+ };
20838
+ goog.provide("calabash_script.tests");
20839
+ goog.require("cljs.core");
20840
+ goog.require("calabash_script.utils");
20841
+ goog.require("calabash_script.log");
20842
+ calabash_script.tests.fail = function() {
20843
+ var fail__delegate = function(reason, kwargs) {
20844
+ var map__2948 = cljs.core.apply.call(null, cljs.core.hash_map, kwargs);
20845
+ var map__2948__$1 = cljs.core.seq_QMARK_.call(null, map__2948) ? cljs.core.apply.call(null, cljs.core.hash_map, map__2948) : map__2948;
20846
+ var screenshot = cljs.core._lookup.call(null, map__2948__$1, "\ufdd0'screenshot", "screenshot");
20847
+ if(cljs.core.truth_(screenshot)) {
20848
+ calabash_script.utils.screenshot.call(null, screenshot)
20849
+ }else {
20850
+ }
20851
+ throw new Error(reason);
20852
+ };
20853
+ var fail = function(reason, var_args) {
20854
+ var kwargs = null;
20855
+ if(goog.isDef(var_args)) {
20856
+ kwargs = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0)
20857
+ }
20858
+ return fail__delegate.call(this, reason, kwargs)
20859
+ };
20860
+ fail.cljs$lang$maxFixedArity = 1;
20861
+ fail.cljs$lang$applyTo = function(arglist__2949) {
20862
+ var reason = cljs.core.first(arglist__2949);
20863
+ var kwargs = cljs.core.rest(arglist__2949);
20864
+ return fail__delegate(reason, kwargs)
20865
+ };
20866
+ fail.cljs$lang$arity$variadic = fail__delegate;
20867
+ return fail
20868
+ }();
20869
+ calabash_script.tests.fail_if = function() {
20870
+ var fail_if__delegate = function(condition, kwargs) {
20871
+ var map__2951 = cljs.core.apply.call(null, cljs.core.hash_map, kwargs);
20872
+ var map__2951__$1 = cljs.core.seq_QMARK_.call(null, map__2951) ? cljs.core.apply.call(null, cljs.core.hash_map, map__2951) : map__2951;
20873
+ var screenshot = cljs.core._lookup.call(null, map__2951__$1, "\ufdd0'screenshot", "screenshot");
20874
+ var message = cljs.core._lookup.call(null, map__2951__$1, "\ufdd0'message", "Failed");
20875
+ if(cljs.core.truth_(condition)) {
20876
+ return calabash_script.tests.fail.call(null, message, screenshot)
20877
+ }else {
20878
+ return null
20879
+ }
20880
+ };
20881
+ var fail_if = function(condition, var_args) {
20882
+ var kwargs = null;
20883
+ if(goog.isDef(var_args)) {
20884
+ kwargs = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0)
20885
+ }
20886
+ return fail_if__delegate.call(this, condition, kwargs)
20887
+ };
20888
+ fail_if.cljs$lang$maxFixedArity = 1;
20889
+ fail_if.cljs$lang$applyTo = function(arglist__2952) {
20890
+ var condition = cljs.core.first(arglist__2952);
20891
+ var kwargs = cljs.core.rest(arglist__2952);
20892
+ return fail_if__delegate(condition, kwargs)
20893
+ };
20894
+ fail_if.cljs$lang$arity$variadic = fail_if__delegate;
20895
+ return fail_if
20896
+ }();
20897
+ calabash_script.tests.fail_if_not = function() {
20898
+ var fail_if_not__delegate = function(x, kwargs) {
20899
+ return cljs.core.apply.call(null, calabash_script.tests.fail_if, cljs.core.not.call(null, x), kwargs)
20900
+ };
20901
+ var fail_if_not = function(x, var_args) {
20902
+ var kwargs = null;
20903
+ if(goog.isDef(var_args)) {
20904
+ kwargs = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0)
20905
+ }
20906
+ return fail_if_not__delegate.call(this, x, kwargs)
20907
+ };
20908
+ fail_if_not.cljs$lang$maxFixedArity = 1;
20909
+ fail_if_not.cljs$lang$applyTo = function(arglist__2953) {
20910
+ var x = cljs.core.first(arglist__2953);
20911
+ var kwargs = cljs.core.rest(arglist__2953);
20912
+ return fail_if_not__delegate(x, kwargs)
20913
+ };
20914
+ fail_if_not.cljs$lang$arity$variadic = fail_if_not__delegate;
20915
+ return fail_if_not
20916
+ }();
20917
+ calabash_script.tests._STAR_uia_tests_STAR_ = cljs.core.atom.call(null, cljs.core.ObjMap.EMPTY);
20918
+ calabash_script.tests.define_uia_test = function define_uia_test(doc, test) {
20919
+ return cljs.core.swap_BANG_.call(null, calabash_script.tests._STAR_uia_tests_STAR_, cljs.core.assoc, doc, test)
20920
+ };
20921
+ calabash_script.tests.run_all_BANG_ = function run_all_BANG_() {
20922
+ calabash_script.log.log.call(null, "Running tests: ", cljs.core.keys.call(null, cljs.core.deref.call(null, calabash_script.tests._STAR_uia_tests_STAR_)));
20923
+ var G__2957_2960 = cljs.core.seq.call(null, cljs.core.deref.call(null, calabash_script.tests._STAR_uia_tests_STAR_));
20924
+ while(true) {
20925
+ if(G__2957_2960) {
20926
+ var vec__2958_2961 = cljs.core.first.call(null, G__2957_2960);
20927
+ var name_2962 = cljs.core.nth.call(null, vec__2958_2961, 0, null);
20928
+ var test_2963 = cljs.core.nth.call(null, vec__2958_2961, 1, null);
20929
+ UIALogger.logStart(name_2962);
20930
+ try {
20931
+ test_2963.call(null);
20932
+ cljs.core.swap_BANG_.call(null, calabash_script.tests._STAR_uia_tests_STAR_, cljs.core.assoc, name_2962, cljs.core.ObjMap.fromObject(["\ufdd0'result"], {"\ufdd0'result":"\ufdd0'pass"}));
20933
+ UIALogger.logPass(name_2962)
20934
+ }catch(e2959) {
20935
+ if(cljs.core.instance_QMARK_.call(null, Object, e2959)) {
20936
+ var e_2964 = e2959;
20937
+ cljs.core.swap_BANG_.call(null, calabash_script.tests._STAR_uia_tests_STAR_, cljs.core.assoc, name_2962, cljs.core.ObjMap.fromObject(["\ufdd0'result", "\ufdd0'message"], {"\ufdd0'result":"\ufdd0'fail", "\ufdd0'message":[cljs.core.str(e_2964)].join("")}));
20938
+ UIALogger.logFail(name_2962)
20939
+ }else {
20940
+ if("\ufdd0'else") {
20941
+ throw e2959;
20942
+ }else {
20943
+ }
20944
+ }
20945
+ }
20946
+ var G__2965 = cljs.core.next.call(null, G__2957_2960);
20947
+ G__2957_2960 = G__2965;
20948
+ continue
20949
+ }else {
20950
+ }
20951
+ break
20952
+ }
20953
+ return calabash_script.log.log.call(null, cljs.core.deref.call(null, calabash_script.tests._STAR_uia_tests_STAR_))
20954
+ };
20955
+ goog.provide("calabash_script.convert");
20956
+ goog.require("cljs.core");
20957
+ calabash_script.convert.point__GT_map = function point__GT_map(rect) {
20958
+ var temp__3971__auto__ = rect.origin;
20959
+ if(cljs.core.truth_(temp__3971__auto__)) {
20960
+ var point = temp__3971__auto__;
20961
+ return cljs.core.ObjMap.fromObject(["\ufdd0'x", "\ufdd0'y"], {"\ufdd0'x":point.x, "\ufdd0'y":point.y})
20962
+ }else {
20963
+ return cljs.core.ObjMap.EMPTY
20964
+ }
20965
+ };
20966
+ calabash_script.convert.size__GT_map = function size__GT_map(rect) {
20967
+ var temp__3971__auto__ = rect.size;
20968
+ if(cljs.core.truth_(temp__3971__auto__)) {
20969
+ var size = temp__3971__auto__;
20970
+ return cljs.core.ObjMap.fromObject(["\ufdd0'width", "\ufdd0'height"], {"\ufdd0'width":size.width, "\ufdd0'height":size.height})
20971
+ }else {
20972
+ return cljs.core.ObjMap.EMPTY
20973
+ }
20974
+ };
20975
+ calabash_script.convert.uia__GT_map = function uia__GT_map(uia_el) {
20976
+ var rect = function() {
20977
+ var temp__3971__auto__ = uia_el.rect();
20978
+ if(cljs.core.truth_(temp__3971__auto__)) {
20979
+ var rect = temp__3971__auto__;
20980
+ return cljs.core.merge.call(null, calabash_script.convert.point__GT_map.call(null, rect), calabash_script.convert.size__GT_map.call(null, rect))
20981
+ }else {
20982
+ return cljs.core.ObjMap.EMPTY
20983
+ }
20984
+ }();
20985
+ var hp = function() {
20986
+ var temp__3971__auto__ = uia_el.hitpoint();
20987
+ if(cljs.core.truth_(temp__3971__auto__)) {
20988
+ var point = temp__3971__auto__;
20989
+ return cljs.core.ObjMap.fromObject(["\ufdd0'x", "\ufdd0'y"], {"\ufdd0'x":point.x, "\ufdd0'y":point.y})
20990
+ }else {
20991
+ return cljs.core.ObjMap.EMPTY
20992
+ }
20993
+ }();
20994
+ return cljs.core.ObjMap.fromObject(["\ufdd0'el", "\ufdd0'hit-point", "\ufdd0'rect", "\ufdd0'name", "\ufdd0'label"], {"\ufdd0'el":uia_el, "\ufdd0'hit-point":hp, "\ufdd0'rect":rect, "\ufdd0'name":cljs.core.truth_(uia_el.name) ? uia_el.name() : null, "\ufdd0'label":cljs.core.truth_(uia_el.label) ? uia_el.label() : null})
20995
+ };
20812
20996
  goog.provide("calabash_script.uia");
20813
20997
  goog.require("cljs.core");
20814
20998
  calabash_script.uia.classes = function() {
@@ -20824,1905 +21008,1732 @@ calabash_script.uia.classes = function() {
20824
21008
  typeof UIAWindow != "undefined" && UIAWindow], true)], true));
20825
21009
  return cljs.core.assoc.call(null, clz_map, "\ufdd0'view", Object)
20826
21010
  }();
20827
- goog.provide("cljs.reader");
21011
+ goog.provide("calabash_script.query");
20828
21012
  goog.require("cljs.core");
20829
- goog.require("goog.string");
20830
- cljs.reader.PushbackReader = {};
20831
- cljs.reader.read_char = function read_char(reader) {
20832
- if(function() {
20833
- var and__3822__auto__ = reader;
20834
- if(and__3822__auto__) {
20835
- return reader.cljs$reader$PushbackReader$read_char$arity$1
20836
- }else {
20837
- return and__3822__auto__
20838
- }
20839
- }()) {
20840
- return reader.cljs$reader$PushbackReader$read_char$arity$1(reader)
21013
+ goog.require("calabash_script.utils");
21014
+ goog.require("calabash_script.convert");
21015
+ goog.require("calabash_script.uia");
21016
+ goog.require("calabash_script.log");
21017
+ calabash_script.query.dir_QMARK_ = cljs.core.PersistentHashSet.fromArray(["\ufdd0'parent", "\ufdd0'child", "\ufdd0'descendant"]);
21018
+ calabash_script.query.desc = function desc(el, acc) {
21019
+ var temp__3971__auto__ = cljs.core.seq.call(null, el);
21020
+ if(temp__3971__auto__) {
21021
+ var els = temp__3971__auto__;
21022
+ var children = cljs.core.mapcat.call(null, function(p1__2935_SHARP_) {
21023
+ return desc.call(null, p1__2935_SHARP_, cljs.core.PersistentVector.EMPTY)
21024
+ }, els);
21025
+ return cljs.core.reduce.call(null, cljs.core.conj, acc, cljs.core.cons.call(null, el, children))
20841
21026
  }else {
20842
- var x__2384__auto__ = reader == null ? null : reader;
20843
- return function() {
20844
- var or__3824__auto__ = cljs.reader.read_char[goog.typeOf(x__2384__auto__)];
20845
- if(or__3824__auto__) {
20846
- return or__3824__auto__
20847
- }else {
20848
- var or__3824__auto____$1 = cljs.reader.read_char["_"];
20849
- if(or__3824__auto____$1) {
20850
- return or__3824__auto____$1
20851
- }else {
20852
- throw cljs.core.missing_protocol.call(null, "PushbackReader.read-char", reader);
20853
- }
20854
- }
20855
- }().call(null, reader)
21027
+ return cljs.core.conj.call(null, acc, el)
20856
21028
  }
20857
21029
  };
20858
- cljs.reader.unread = function unread(reader, ch) {
20859
- if(function() {
20860
- var and__3822__auto__ = reader;
20861
- if(and__3822__auto__) {
20862
- return reader.cljs$reader$PushbackReader$unread$arity$2
21030
+ calabash_script.query.dir_seq = function() {
21031
+ var method_table__2556__auto__ = cljs.core.atom.call(null, cljs.core.ObjMap.EMPTY);
21032
+ var prefer_table__2557__auto__ = cljs.core.atom.call(null, cljs.core.ObjMap.EMPTY);
21033
+ var method_cache__2558__auto__ = cljs.core.atom.call(null, cljs.core.ObjMap.EMPTY);
21034
+ var cached_hierarchy__2559__auto__ = cljs.core.atom.call(null, cljs.core.ObjMap.EMPTY);
21035
+ var hierarchy__2560__auto__ = cljs.core._lookup.call(null, cljs.core.ObjMap.EMPTY, "\ufdd0'hierarchy", cljs.core.global_hierarchy);
21036
+ return new cljs.core.MultiFn("dir-seq", function(dir, _) {
21037
+ return dir
21038
+ }, "\ufdd0'default", hierarchy__2560__auto__, method_table__2556__auto__, prefer_table__2557__auto__, method_cache__2558__auto__, cached_hierarchy__2559__auto__)
21039
+ }();
21040
+ cljs.core._add_method.call(null, calabash_script.query.dir_seq, "\ufdd0'parent", function(_, coll) {
21041
+ var no_parent_QMARK_ = function(el) {
21042
+ var or__3824__auto__ = cljs.core.not.call(null, el.parent);
21043
+ if(or__3824__auto__) {
21044
+ return or__3824__auto__
21045
+ }else {
21046
+ var or__3824__auto____$1 = el.parent() == null;
21047
+ if(or__3824__auto____$1) {
21048
+ return or__3824__auto____$1
21049
+ }else {
21050
+ return cljs.core.instance_QMARK_.call(null, UIAApplication, el.parent())
21051
+ }
21052
+ }
21053
+ };
21054
+ var parents = function(el, acc) {
21055
+ while(true) {
21056
+ if(cljs.core.truth_(no_parent_QMARK_.call(null, el))) {
21057
+ return acc
21058
+ }else {
21059
+ var p = el.parent();
21060
+ var G__2936 = p;
21061
+ var G__2937 = cljs.core.conj.call(null, acc, p);
21062
+ el = G__2936;
21063
+ acc = G__2937;
21064
+ continue
21065
+ }
21066
+ break
21067
+ }
21068
+ };
21069
+ return cljs.core.mapcat.call(null, function(x) {
21070
+ return parents.call(null, x, cljs.core.PersistentVector.EMPTY)
21071
+ }, coll)
21072
+ });
21073
+ cljs.core._add_method.call(null, calabash_script.query.dir_seq, "\ufdd0'child", function(_, coll) {
21074
+ return cljs.core.mapcat.call(null, cljs.core.seq, coll)
21075
+ });
21076
+ cljs.core._add_method.call(null, calabash_script.query.dir_seq, "\ufdd0'descendant", function(_, coll) {
21077
+ return cljs.core.mapcat.call(null, function(p1__2938_SHARP_) {
21078
+ return calabash_script.query.desc.call(null, p1__2938_SHARP_, cljs.core.PersistentVector.EMPTY)
21079
+ }, coll)
21080
+ });
21081
+ calabash_script.query.valid_QMARK_ = function valid_QMARK_(el) {
21082
+ return!function() {
21083
+ var or__3824__auto__ = el == null;
21084
+ if(or__3824__auto__) {
21085
+ return or__3824__auto__
21086
+ }else {
21087
+ return cljs.core.instance_QMARK_.call(null, UIAElementNil, el)
21088
+ }
21089
+ }()
21090
+ };
21091
+ calabash_script.query.filter_by_type = function filter_by_type(type, coll) {
21092
+ var uia_class = calabash_script.uia.classes.call(null, type);
21093
+ return cljs.core.filter.call(null, function(x) {
21094
+ var and__3822__auto__ = calabash_script.query.valid_QMARK_.call(null, x);
21095
+ if(cljs.core.truth_(and__3822__auto__)) {
21096
+ return cljs.core.instance_QMARK_.call(null, uia_class, x)
20863
21097
  }else {
20864
21098
  return and__3822__auto__
20865
21099
  }
21100
+ }, coll)
21101
+ };
21102
+ calabash_script.query.matches_QMARK_ = function matches_QMARK_(sel, obj, val) {
21103
+ if(function() {
21104
+ var or__3824__auto__ = cljs.core.keyword_QMARK_.call(null, sel);
21105
+ if(or__3824__auto__) {
21106
+ return or__3824__auto__
21107
+ }else {
21108
+ return cljs.core.string_QMARK_.call(null, sel)
21109
+ }
20866
21110
  }()) {
20867
- return reader.cljs$reader$PushbackReader$unread$arity$2(reader, ch)
20868
- }else {
20869
- var x__2384__auto__ = reader == null ? null : reader;
20870
- return function() {
20871
- var or__3824__auto__ = cljs.reader.unread[goog.typeOf(x__2384__auto__)];
21111
+ var kw_sel = cljs.core.keyword.call(null, sel);
21112
+ if(cljs.core._EQ_.call(null, "\ufdd0'marked", kw_sel)) {
21113
+ var or__3824__auto__ = cljs.core._EQ_.call(null, obj.name(), val);
20872
21114
  if(or__3824__auto__) {
20873
21115
  return or__3824__auto__
20874
21116
  }else {
20875
- var or__3824__auto____$1 = cljs.reader.unread["_"];
21117
+ var or__3824__auto____$1 = cljs.core._EQ_.call(null, obj.label(), val);
20876
21118
  if(or__3824__auto____$1) {
20877
21119
  return or__3824__auto____$1
20878
21120
  }else {
20879
- throw cljs.core.missing_protocol.call(null, "PushbackReader.unread", reader);
21121
+ var and__3822__auto__ = obj.value;
21122
+ if(cljs.core.truth_(and__3822__auto__)) {
21123
+ return cljs.core._EQ_.call(null, obj.value(), val)
21124
+ }else {
21125
+ return and__3822__auto__
21126
+ }
20880
21127
  }
20881
21128
  }
20882
- }().call(null, reader, ch)
20883
- }
20884
- };
20885
- goog.provide("cljs.reader.StringPushbackReader");
20886
- cljs.reader.StringPushbackReader = function(s, index_atom, buffer_atom) {
20887
- this.s = s;
20888
- this.index_atom = index_atom;
20889
- this.buffer_atom = buffer_atom
20890
- };
20891
- cljs.reader.StringPushbackReader.cljs$lang$type = true;
20892
- cljs.reader.StringPushbackReader.cljs$lang$ctorPrSeq = function(this__2324__auto__) {
20893
- return cljs.core.list.call(null, "cljs.reader/StringPushbackReader")
20894
- };
20895
- cljs.reader.StringPushbackReader.cljs$lang$ctorPrWriter = function(this__2324__auto__, writer__2325__auto__, opt__2326__auto__) {
20896
- return cljs.core._write.call(null, writer__2325__auto__, "cljs.reader/StringPushbackReader")
20897
- };
20898
- cljs.reader.StringPushbackReader.prototype.cljs$reader$PushbackReader$ = true;
20899
- cljs.reader.StringPushbackReader.prototype.cljs$reader$PushbackReader$read_char$arity$1 = function(reader) {
20900
- var self__ = this;
20901
- if(cljs.core.empty_QMARK_.call(null, cljs.core.deref.call(null, self__.buffer_atom))) {
20902
- var idx = cljs.core.deref.call(null, self__.index_atom);
20903
- cljs.core.swap_BANG_.call(null, self__.index_atom, cljs.core.inc);
20904
- return self__.s[idx]
20905
- }else {
20906
- var buf = cljs.core.deref.call(null, self__.buffer_atom);
20907
- cljs.core.swap_BANG_.call(null, self__.buffer_atom, cljs.core.rest);
20908
- return cljs.core.first.call(null, buf)
20909
- }
20910
- };
20911
- cljs.reader.StringPushbackReader.prototype.cljs$reader$PushbackReader$unread$arity$2 = function(reader, ch) {
20912
- var self__ = this;
20913
- return cljs.core.swap_BANG_.call(null, self__.buffer_atom, function(p1__3665_SHARP_) {
20914
- return cljs.core.cons.call(null, ch, p1__3665_SHARP_)
20915
- })
20916
- };
20917
- cljs.reader.push_back_reader = function push_back_reader(s) {
20918
- return new cljs.reader.StringPushbackReader(s, cljs.core.atom.call(null, 0), cljs.core.atom.call(null, null))
20919
- };
20920
- cljs.reader.whitespace_QMARK_ = function whitespace_QMARK_(ch) {
20921
- var or__3824__auto__ = goog.string.isBreakingWhitespace(ch);
20922
- if(cljs.core.truth_(or__3824__auto__)) {
20923
- return or__3824__auto__
20924
- }else {
20925
- return"," === ch
20926
- }
20927
- };
20928
- cljs.reader.numeric_QMARK_ = function numeric_QMARK_(ch) {
20929
- return goog.string.isNumeric(ch)
20930
- };
20931
- cljs.reader.comment_prefix_QMARK_ = function comment_prefix_QMARK_(ch) {
20932
- return";" === ch
20933
- };
20934
- cljs.reader.number_literal_QMARK_ = function number_literal_QMARK_(reader, initch) {
20935
- var or__3824__auto__ = cljs.reader.numeric_QMARK_.call(null, initch);
20936
- if(or__3824__auto__) {
20937
- return or__3824__auto__
21129
+ }else {
21130
+ var res = obj.withValueForKey(val, cljs.core.name.call(null, kw_sel));
21131
+ return calabash_script.query.valid_QMARK_.call(null, res)
21132
+ }
20938
21133
  }else {
20939
- var and__3822__auto__ = function() {
20940
- var or__3824__auto____$1 = "+" === initch;
20941
- if(or__3824__auto____$1) {
20942
- return or__3824__auto____$1
21134
+ if(cljs.core.vector_QMARK_.call(null, sel)) {
21135
+ var G__2940 = cljs.core.count.call(null, sel);
21136
+ if(cljs.core._EQ_.call(null, 2, G__2940)) {
21137
+ var key = cljs.core.name.call(null, cljs.core.first.call(null, sel));
21138
+ var rel = cljs.core.name.call(null, cljs.core.second.call(null, sel));
21139
+ return calabash_script.query.valid_QMARK_.call(null, obj.withPredicate([cljs.core.str(key), cljs.core.str(" "), cljs.core.str(rel), cljs.core.str(" "), cljs.core.str(val)].join("")))
20943
21140
  }else {
20944
- return"-" === initch
21141
+ if("\ufdd0'else") {
21142
+ return null
21143
+ }else {
21144
+ return null
21145
+ }
20945
21146
  }
20946
- }();
20947
- if(cljs.core.truth_(and__3822__auto__)) {
20948
- return cljs.reader.numeric_QMARK_.call(null, function() {
20949
- var next_ch = cljs.reader.read_char.call(null, reader);
20950
- cljs.reader.unread.call(null, reader, next_ch);
20951
- return next_ch
20952
- }())
20953
21147
  }else {
20954
- return and__3822__auto__
21148
+ return null
20955
21149
  }
20956
21150
  }
20957
21151
  };
20958
- cljs.reader.reader_error = function() {
20959
- var reader_error__delegate = function(rdr, msg) {
20960
- throw new Error(cljs.core.apply.call(null, cljs.core.str, msg));
20961
- };
20962
- var reader_error = function(rdr, var_args) {
20963
- var msg = null;
20964
- if(goog.isDef(var_args)) {
20965
- msg = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0)
20966
- }
20967
- return reader_error__delegate.call(this, rdr, msg)
20968
- };
20969
- reader_error.cljs$lang$maxFixedArity = 1;
20970
- reader_error.cljs$lang$applyTo = function(arglist__3666) {
20971
- var rdr = cljs.core.first(arglist__3666);
20972
- var msg = cljs.core.rest(arglist__3666);
20973
- return reader_error__delegate(rdr, msg)
21152
+ calabash_script.query.query_map = function query_map(q, coll, dir) {
21153
+ var filter_fn = function(x) {
21154
+ return cljs.core.every_QMARK_.call(null, cljs.core.true_QMARK_, cljs.core.map.call(null, function(p__2943) {
21155
+ var vec__2944 = p__2943;
21156
+ var sel = cljs.core.nth.call(null, vec__2944, 0, null);
21157
+ var val = cljs.core.nth.call(null, vec__2944, 1, null);
21158
+ return calabash_script.query.matches_QMARK_.call(null, sel, x, val)
21159
+ }, q))
20974
21160
  };
20975
- reader_error.cljs$lang$arity$variadic = reader_error__delegate;
20976
- return reader_error
20977
- }();
20978
- cljs.reader.macro_terminating_QMARK_ = function macro_terminating_QMARK_(ch) {
20979
- var and__3822__auto__ = !(ch === "#");
20980
- if(and__3822__auto__) {
20981
- var and__3822__auto____$1 = !(ch === "'");
20982
- if(and__3822__auto____$1) {
20983
- var and__3822__auto____$2 = !(ch === ":");
20984
- if(and__3822__auto____$2) {
20985
- return cljs.reader.macros.call(null, ch)
20986
- }else {
20987
- return and__3822__auto____$2
20988
- }
21161
+ return cljs.core.filter.call(null, filter_fn, coll)
21162
+ };
21163
+ calabash_script.query.IQuery = {};
21164
+ calabash_script.query._query = function _query(q, coll, dir) {
21165
+ if(function() {
21166
+ var and__3822__auto__ = q;
21167
+ if(and__3822__auto__) {
21168
+ return q.calabash_script$query$IQuery$_query$arity$3
20989
21169
  }else {
20990
- return and__3822__auto____$1
21170
+ return and__3822__auto__
20991
21171
  }
21172
+ }()) {
21173
+ return q.calabash_script$query$IQuery$_query$arity$3(q, coll, dir)
20992
21174
  }else {
20993
- return and__3822__auto__
20994
- }
20995
- };
20996
- cljs.reader.read_token = function read_token(rdr, initch) {
20997
- var sb = new goog.string.StringBuffer(initch);
20998
- var ch = cljs.reader.read_char.call(null, rdr);
20999
- while(true) {
21000
- if(function() {
21001
- var or__3824__auto__ = ch == null;
21175
+ var x__2384__auto__ = q == null ? null : q;
21176
+ return function() {
21177
+ var or__3824__auto__ = calabash_script.query._query[goog.typeOf(x__2384__auto__)];
21002
21178
  if(or__3824__auto__) {
21003
21179
  return or__3824__auto__
21004
21180
  }else {
21005
- var or__3824__auto____$1 = cljs.reader.whitespace_QMARK_.call(null, ch);
21181
+ var or__3824__auto____$1 = calabash_script.query._query["_"];
21006
21182
  if(or__3824__auto____$1) {
21007
21183
  return or__3824__auto____$1
21008
21184
  }else {
21009
- return cljs.reader.macro_terminating_QMARK_.call(null, ch)
21185
+ throw cljs.core.missing_protocol.call(null, "IQuery.-query", q);
21010
21186
  }
21011
21187
  }
21012
- }()) {
21013
- cljs.reader.unread.call(null, rdr, ch);
21014
- return sb.toString()
21015
- }else {
21016
- var G__3667 = function() {
21017
- sb.append(ch);
21018
- return sb
21019
- }();
21020
- var G__3668 = cljs.reader.read_char.call(null, rdr);
21021
- sb = G__3667;
21022
- ch = G__3668;
21023
- continue
21024
- }
21025
- break
21026
- }
21027
- };
21028
- cljs.reader.skip_line = function skip_line(reader, _) {
21029
- while(true) {
21030
- var ch = cljs.reader.read_char.call(null, reader);
21031
- if(function() {
21032
- var or__3824__auto__ = ch === "n";
21033
- if(or__3824__auto__) {
21034
- return or__3824__auto__
21035
- }else {
21036
- var or__3824__auto____$1 = ch === "r";
21037
- if(or__3824__auto____$1) {
21038
- return or__3824__auto____$1
21039
- }else {
21040
- return ch == null
21041
- }
21042
- }
21043
- }()) {
21044
- return reader
21045
- }else {
21046
- continue
21047
- }
21048
- break
21049
- }
21050
- };
21051
- cljs.reader.int_pattern = cljs.core.re_pattern.call(null, "([-+]?)(?:(0)|([1-9][0-9]*)|0[xX]([0-9A-Fa-f]+)|0([0-7]+)|([1-9][0-9]?)[rR]([0-9A-Za-z]+)|0[0-9]+)(N)?");
21052
- cljs.reader.ratio_pattern = cljs.core.re_pattern.call(null, "([-+]?[0-9]+)/([0-9]+)");
21053
- cljs.reader.float_pattern = cljs.core.re_pattern.call(null, "([-+]?[0-9]+(\\.[0-9]*)?([eE][-+]?[0-9]+)?)(M)?");
21054
- cljs.reader.symbol_pattern = cljs.core.re_pattern.call(null, "[:]?([^0-9/].*/)?([^0-9/][^/]*)");
21055
- cljs.reader.re_find_STAR_ = function re_find_STAR_(re, s) {
21056
- var matches = re.exec(s);
21057
- if(matches == null) {
21058
- return null
21059
- }else {
21060
- if(matches.length === 1) {
21061
- return matches[0]
21062
- }else {
21063
- return matches
21064
- }
21188
+ }().call(null, q, coll, dir)
21065
21189
  }
21066
21190
  };
21067
- cljs.reader.match_int = function match_int(s) {
21068
- var groups = cljs.reader.re_find_STAR_.call(null, cljs.reader.int_pattern, s);
21069
- var group3 = groups[2];
21070
- if(!function() {
21071
- var or__3824__auto__ = group3 == null;
21072
- if(or__3824__auto__) {
21073
- return or__3824__auto__
21074
- }else {
21075
- return group3.length < 1
21076
- }
21077
- }()) {
21078
- return 0
21079
- }else {
21080
- var negate = "-" === groups[1] ? -1 : 1;
21081
- var a = cljs.core.truth_(groups[3]) ? [groups[3], 10] : cljs.core.truth_(groups[4]) ? [groups[4], 16] : cljs.core.truth_(groups[5]) ? [groups[5], 8] : cljs.core.truth_(groups[7]) ? [groups[7], parseInt(groups[7])] : "\ufdd0'default" ? [null, null] : null;
21082
- var n = a[0];
21083
- var radix = a[1];
21084
- if(n == null) {
21085
- return null
21086
- }else {
21087
- return negate * parseInt(n, radix)
21088
- }
21089
- }
21191
+ cljs.core.PersistentHashMap.prototype.calabash_script$query$IQuery$ = true;
21192
+ cljs.core.PersistentHashMap.prototype.calabash_script$query$IQuery$_query$arity$3 = function(q, coll, dir) {
21193
+ return calabash_script.query.query_map.call(null, q, coll, dir)
21090
21194
  };
21091
- cljs.reader.match_ratio = function match_ratio(s) {
21092
- var groups = cljs.reader.re_find_STAR_.call(null, cljs.reader.ratio_pattern, s);
21093
- var numinator = groups[1];
21094
- var denominator = groups[2];
21095
- return parseInt(numinator) / parseInt(denominator)
21195
+ cljs.core.PersistentArrayMap.prototype.calabash_script$query$IQuery$ = true;
21196
+ cljs.core.PersistentArrayMap.prototype.calabash_script$query$IQuery$_query$arity$3 = function(q, coll, dir) {
21197
+ return calabash_script.query.query_map.call(null, q, coll, dir)
21096
21198
  };
21097
- cljs.reader.match_float = function match_float(s) {
21098
- return parseFloat(s)
21199
+ cljs.core.ObjMap.prototype.calabash_script$query$IQuery$ = true;
21200
+ cljs.core.ObjMap.prototype.calabash_script$query$IQuery$_query$arity$3 = function(q, coll, dir) {
21201
+ return calabash_script.query.query_map.call(null, q, coll, dir)
21099
21202
  };
21100
- cljs.reader.re_matches_STAR_ = function re_matches_STAR_(re, s) {
21101
- var matches = re.exec(s);
21102
- if(function() {
21103
- var and__3822__auto__ = !(matches == null);
21104
- if(and__3822__auto__) {
21105
- return matches[0] === s
21106
- }else {
21107
- return and__3822__auto__
21108
- }
21109
- }()) {
21110
- if(matches.length === 1) {
21111
- return matches[0]
21203
+ cljs.core.PersistentVector.prototype.calabash_script$query$IQuery$ = true;
21204
+ cljs.core.PersistentVector.prototype.calabash_script$query$IQuery$_query$arity$3 = function(q, coll, dir) {
21205
+ return cljs.core.first.call(null, cljs.core.reduce.call(null, function(p__2945, next) {
21206
+ var vec__2946 = p__2945;
21207
+ var coll__$1 = cljs.core.nth.call(null, vec__2946, 0, null);
21208
+ var dir__$1 = cljs.core.nth.call(null, vec__2946, 1, null);
21209
+ if(cljs.core.truth_(calabash_script.query.dir_QMARK_.call(null, next))) {
21210
+ return cljs.core.PersistentVector.fromArray([coll__$1, next], true)
21112
21211
  }else {
21113
- return matches
21212
+ return cljs.core.PersistentVector.fromArray([calabash_script.query._query.call(null, next, coll__$1, dir__$1), dir__$1], true)
21114
21213
  }
21115
- }else {
21116
- return null
21117
- }
21214
+ }, cljs.core.PersistentVector.fromArray([coll, dir], true), q))
21118
21215
  };
21119
- cljs.reader.match_number = function match_number(s) {
21120
- if(cljs.core.truth_(cljs.reader.re_matches_STAR_.call(null, cljs.reader.int_pattern, s))) {
21121
- return cljs.reader.match_int.call(null, s)
21122
- }else {
21123
- if(cljs.core.truth_(cljs.reader.re_matches_STAR_.call(null, cljs.reader.ratio_pattern, s))) {
21124
- return cljs.reader.match_ratio.call(null, s)
21125
- }else {
21126
- if(cljs.core.truth_(cljs.reader.re_matches_STAR_.call(null, cljs.reader.float_pattern, s))) {
21127
- return cljs.reader.match_float.call(null, s)
21128
- }else {
21129
- return null
21130
- }
21131
- }
21132
- }
21216
+ String.prototype.calabash_script$query$IQuery$ = true;
21217
+ String.prototype.calabash_script$query$IQuery$_query$arity$3 = function(kw, coll, dir) {
21218
+ return calabash_script.query.filter_by_type.call(null, cljs.core.keyword.call(null, kw), calabash_script.query.dir_seq.call(null, dir, coll))
21133
21219
  };
21134
- cljs.reader.escape_char_map = function escape_char_map(c) {
21135
- if(c === "t") {
21136
- return"\t"
21137
- }else {
21138
- if(c === "r") {
21139
- return"\r"
21140
- }else {
21141
- if(c === "n") {
21142
- return"\n"
21143
- }else {
21144
- if(c === "\\") {
21145
- return"\\"
21146
- }else {
21147
- if(c === '"') {
21148
- return'"'
21149
- }else {
21150
- if(c === "b") {
21151
- return"\b"
21152
- }else {
21153
- if(c === "f") {
21154
- return"\f"
21155
- }else {
21156
- if("\ufdd0'else") {
21157
- return null
21158
- }else {
21159
- return null
21160
- }
21161
- }
21162
- }
21163
- }
21164
- }
21165
- }
21166
- }
21167
- }
21220
+ cljs.core.Keyword.prototype.calabash_script$query$IQuery$ = true;
21221
+ cljs.core.Keyword.prototype.calabash_script$query$IQuery$_query$arity$3 = function(kw, coll, dir) {
21222
+ return calabash_script.query.filter_by_type.call(null, kw, calabash_script.query.dir_seq.call(null, dir, coll))
21168
21223
  };
21169
- cljs.reader.read_2_chars = function read_2_chars(reader) {
21170
- return(new goog.string.StringBuffer(cljs.reader.read_char.call(null, reader), cljs.reader.read_char.call(null, reader))).toString()
21224
+ goog.provide("calabash_script.core");
21225
+ goog.require("cljs.core");
21226
+ goog.require("calabash_script.query");
21227
+ goog.require("calabash_script.tests");
21228
+ goog.require("calabash_script.utils");
21229
+ goog.require("calabash_script.convert");
21230
+ goog.require("calabash_script.uia");
21231
+ goog.require("calabash_script.log");
21232
+ goog.require("calabash_script.tests");
21233
+ goog.require("calabash_script.query");
21234
+ calabash_script.utils.target.call(null).setTimeout(0);
21235
+ cljs.core._STAR_print_fn_STAR_ = function() {
21236
+ var G__2889__delegate = function(args) {
21237
+ return calabash_script.log.log.call(null, cljs.core.apply.call(null, cljs.core.str, args))
21238
+ };
21239
+ var G__2889 = function(var_args) {
21240
+ var args = null;
21241
+ if(goog.isDef(var_args)) {
21242
+ args = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0)
21243
+ }
21244
+ return G__2889__delegate.call(this, args)
21245
+ };
21246
+ G__2889.cljs$lang$maxFixedArity = 0;
21247
+ G__2889.cljs$lang$applyTo = function(arglist__2890) {
21248
+ var args = cljs.core.seq(arglist__2890);
21249
+ return G__2889__delegate(args)
21250
+ };
21251
+ G__2889.cljs$lang$arity$variadic = G__2889__delegate;
21252
+ return G__2889
21253
+ }();
21254
+ UIAElement.prototype.cljs$core$ISeqable$ = true;
21255
+ UIAElement.prototype.cljs$core$ISeqable$_seq$arity$1 = function(this$) {
21256
+ return cljs.core.seq.call(null, this$.elements().toArray())
21171
21257
  };
21172
- cljs.reader.read_4_chars = function read_4_chars(reader) {
21173
- return(new goog.string.StringBuffer(cljs.reader.read_char.call(null, reader), cljs.reader.read_char.call(null, reader), cljs.reader.read_char.call(null, reader), cljs.reader.read_char.call(null, reader))).toString()
21258
+ UIAKey.prototype.cljs$core$ISeqable$ = true;
21259
+ UIAKey.prototype.cljs$core$ISeqable$_seq$arity$1 = function(this$) {
21260
+ return null
21174
21261
  };
21175
- cljs.reader.unicode_2_pattern = cljs.core.re_pattern.call(null, "[0-9A-Fa-f]{2}");
21176
- cljs.reader.unicode_4_pattern = cljs.core.re_pattern.call(null, "[0-9A-Fa-f]{4}");
21177
- cljs.reader.validate_unicode_escape = function validate_unicode_escape(unicode_pattern, reader, escape_char, unicode_str) {
21178
- if(cljs.core.truth_(cljs.core.re_matches.call(null, unicode_pattern, unicode_str))) {
21179
- return unicode_str
21180
- }else {
21181
- return cljs.reader.reader_error.call(null, reader, "Unexpected unicode escape \\", escape_char, unicode_str)
21182
- }
21262
+ calabash_script.core.sleep = function sleep(x) {
21263
+ return calabash_script.utils.target.call(null).delay(x)
21183
21264
  };
21184
- cljs.reader.make_unicode_char = function make_unicode_char(code_str) {
21185
- var code = parseInt(code_str, 16);
21186
- return String.fromCharCode(code)
21265
+ calabash_script.core.duration_exceeds_QMARK_ = function duration_exceeds_QMARK_(start, max) {
21266
+ var end = new Date;
21267
+ var dur_sec = (end - start) / 1E3;
21268
+ return dur_sec >= max
21187
21269
  };
21188
- cljs.reader.escape_char = function escape_char(buffer, reader) {
21189
- var ch = cljs.reader.read_char.call(null, reader);
21190
- var mapresult = cljs.reader.escape_char_map.call(null, ch);
21191
- if(cljs.core.truth_(mapresult)) {
21192
- return mapresult
21193
- }else {
21194
- if(ch === "x") {
21195
- return cljs.reader.make_unicode_char.call(null, cljs.reader.validate_unicode_escape.call(null, cljs.reader.unicode_2_pattern, reader, ch, cljs.reader.read_2_chars.call(null, reader)))
21270
+ calabash_script.core.wait_for = function wait_for(p__2891, pred) {
21271
+ var map__2893 = p__2891;
21272
+ var map__2893__$1 = cljs.core.seq_QMARK_.call(null, map__2893) ? cljs.core.apply.call(null, cljs.core.hash_map, map__2893) : map__2893;
21273
+ var options = map__2893__$1;
21274
+ var screenshot = cljs.core._lookup.call(null, map__2893__$1, "\ufdd0'screenshot", true);
21275
+ var message = cljs.core._lookup.call(null, map__2893__$1, "\ufdd0'message", "Timed out waiting...");
21276
+ var post_timeout = cljs.core._lookup.call(null, map__2893__$1, "\ufdd0'post-timeout", 0);
21277
+ var retry_frequency = cljs.core._lookup.call(null, map__2893__$1, "\ufdd0'retry-frequency", 0.2);
21278
+ var timeout = cljs.core._lookup.call(null, map__2893__$1, "\ufdd0'timeout", 30);
21279
+ var start = new Date;
21280
+ var actions = cljs.core.repeatedly.call(null, function() {
21281
+ var res = pred.call(null);
21282
+ if(cljs.core.truth_(res)) {
21196
21283
  }else {
21197
- if(ch === "u") {
21198
- return cljs.reader.make_unicode_char.call(null, cljs.reader.validate_unicode_escape.call(null, cljs.reader.unicode_4_pattern, reader, ch, cljs.reader.read_4_chars.call(null, reader)))
21199
- }else {
21200
- if(cljs.reader.numeric_QMARK_.call(null, ch)) {
21201
- return String.fromCharCode(ch)
21284
+ calabash_script.core.sleep.call(null, retry_frequency)
21285
+ }
21286
+ return res
21287
+ });
21288
+ var results = cljs.core.filter.call(null, function(res) {
21289
+ if(cljs.core.truth_(calabash_script.core.duration_exceeds_QMARK_.call(null, start, timeout))) {
21290
+ calabash_script.tests.fail.call(null, message, function() {
21291
+ var and__3822__auto__ = screenshot;
21292
+ if(cljs.core.truth_(and__3822__auto__)) {
21293
+ return"timeout"
21202
21294
  }else {
21203
- if("\ufdd0'else") {
21204
- return cljs.reader.reader_error.call(null, reader, "Unexpected unicode escape \\", ch)
21205
- }else {
21206
- return null
21207
- }
21295
+ return and__3822__auto__
21208
21296
  }
21209
- }
21297
+ }())
21298
+ }else {
21210
21299
  }
21300
+ return res
21301
+ }, actions);
21302
+ var result = cljs.core.first.call(null, results);
21303
+ if(post_timeout > 0) {
21304
+ calabash_script.core.sleep.call(null, post_timeout)
21305
+ }else {
21211
21306
  }
21307
+ return result
21212
21308
  };
21213
- cljs.reader.read_past = function read_past(pred, rdr) {
21214
- var ch = cljs.reader.read_char.call(null, rdr);
21215
- while(true) {
21216
- if(cljs.core.truth_(pred.call(null, ch))) {
21217
- var G__3669 = cljs.reader.read_char.call(null, rdr);
21218
- ch = G__3669;
21219
- continue
21220
- }else {
21221
- return ch
21309
+ calabash_script.core.query = function() {
21310
+ var query = null;
21311
+ var query__1 = function(q) {
21312
+ return query.call(null, q, cljs.core.list.call(null, calabash_script.utils.window.call(null)))
21313
+ };
21314
+ var query__2 = function(q, coll) {
21315
+ return query.call(null, q, coll, "\ufdd0'descendant")
21316
+ };
21317
+ var query__3 = function(q, coll, dir) {
21318
+ return cljs.core.map.call(null, calabash_script.convert.uia__GT_map, calabash_script.query._query.call(null, q, coll, dir))
21319
+ };
21320
+ query = function(q, coll, dir) {
21321
+ switch(arguments.length) {
21322
+ case 1:
21323
+ return query__1.call(this, q);
21324
+ case 2:
21325
+ return query__2.call(this, q, coll);
21326
+ case 3:
21327
+ return query__3.call(this, q, coll, dir)
21222
21328
  }
21223
- break
21224
- }
21225
- };
21226
- cljs.reader.read_delimited_list = function read_delimited_list(delim, rdr, recursive_QMARK_) {
21227
- var a = cljs.core.transient$.call(null, cljs.core.PersistentVector.EMPTY);
21228
- while(true) {
21229
- var ch = cljs.reader.read_past.call(null, cljs.reader.whitespace_QMARK_, rdr);
21230
- if(cljs.core.truth_(ch)) {
21231
- }else {
21232
- cljs.reader.reader_error.call(null, rdr, "EOF while reading")
21329
+ throw new Error("Invalid arity: " + arguments.length);
21330
+ };
21331
+ query.cljs$lang$arity$1 = query__1;
21332
+ query.cljs$lang$arity$2 = query__2;
21333
+ query.cljs$lang$arity$3 = query__3;
21334
+ return query
21335
+ }();
21336
+ calabash_script.core.query_el = function() {
21337
+ var query_el__delegate = function(args) {
21338
+ return cljs.core.map.call(null, "\ufdd0'el", cljs.core.apply.call(null, calabash_script.core.query, args))
21339
+ };
21340
+ var query_el = function(var_args) {
21341
+ var args = null;
21342
+ if(goog.isDef(var_args)) {
21343
+ args = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0)
21233
21344
  }
21234
- if(delim === ch) {
21235
- return cljs.core.persistent_BANG_.call(null, a)
21236
- }else {
21237
- var temp__3971__auto__ = cljs.reader.macros.call(null, ch);
21238
- if(cljs.core.truth_(temp__3971__auto__)) {
21239
- var macrofn = temp__3971__auto__;
21240
- var mret = macrofn.call(null, rdr, ch);
21241
- var G__3670 = mret === rdr ? a : cljs.core.conj_BANG_.call(null, a, mret);
21242
- a = G__3670;
21243
- continue
21244
- }else {
21245
- cljs.reader.unread.call(null, rdr, ch);
21246
- var o = cljs.reader.read.call(null, rdr, true, null, recursive_QMARK_);
21247
- var G__3671 = o === rdr ? a : cljs.core.conj_BANG_.call(null, a, o);
21248
- a = G__3671;
21249
- continue
21250
- }
21345
+ return query_el__delegate.call(this, args)
21346
+ };
21347
+ query_el.cljs$lang$maxFixedArity = 0;
21348
+ query_el.cljs$lang$applyTo = function(arglist__2894) {
21349
+ var args = cljs.core.seq(arglist__2894);
21350
+ return query_el__delegate(args)
21351
+ };
21352
+ query_el.cljs$lang$arity$variadic = query_el__delegate;
21353
+ return query_el
21354
+ }();
21355
+ calabash_script.core.log_query = function() {
21356
+ var log_query__delegate = function(args) {
21357
+ return calabash_script.log.log.call(null, cljs.core.apply.call(null, calabash_script.core.query, args))
21358
+ };
21359
+ var log_query = function(var_args) {
21360
+ var args = null;
21361
+ if(goog.isDef(var_args)) {
21362
+ args = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0)
21251
21363
  }
21252
- break
21253
- }
21254
- };
21255
- cljs.reader.not_implemented = function not_implemented(rdr, ch) {
21256
- return cljs.reader.reader_error.call(null, rdr, "Reader for ", ch, " not implemented yet")
21257
- };
21258
- cljs.reader.read_dispatch = function read_dispatch(rdr, _) {
21259
- var ch = cljs.reader.read_char.call(null, rdr);
21260
- var dm = cljs.reader.dispatch_macros.call(null, ch);
21261
- if(cljs.core.truth_(dm)) {
21262
- return dm.call(null, rdr, _)
21263
- }else {
21264
- var temp__3971__auto__ = cljs.reader.maybe_read_tagged_type.call(null, rdr, ch);
21265
- if(cljs.core.truth_(temp__3971__auto__)) {
21266
- var obj = temp__3971__auto__;
21267
- return obj
21364
+ return log_query__delegate.call(this, args)
21365
+ };
21366
+ log_query.cljs$lang$maxFixedArity = 0;
21367
+ log_query.cljs$lang$applyTo = function(arglist__2895) {
21368
+ var args = cljs.core.seq(arglist__2895);
21369
+ return log_query__delegate(args)
21370
+ };
21371
+ log_query.cljs$lang$arity$variadic = log_query__delegate;
21372
+ return log_query
21373
+ }();
21374
+ calabash_script.core.perform_on = function() {
21375
+ var perform_on__delegate = function(action, args) {
21376
+ var temp__3971__auto__ = cljs.core.seq.call(null, cljs.core.apply.call(null, calabash_script.core.query_el, args));
21377
+ if(temp__3971__auto__) {
21378
+ var res = temp__3971__auto__;
21379
+ return action.call(null, res)
21268
21380
  }else {
21269
- return cljs.reader.reader_error.call(null, rdr, "No dispatch macro for ", ch)
21381
+ return calabash_script.tests.fail.call(null, cljs.core.apply.call(null, cljs.core.str, "No results for query ", args))
21270
21382
  }
21271
- }
21272
- };
21273
- cljs.reader.read_unmatched_delimiter = function read_unmatched_delimiter(rdr, ch) {
21274
- return cljs.reader.reader_error.call(null, rdr, "Unmached delimiter ", ch)
21275
- };
21276
- cljs.reader.read_list = function read_list(rdr, _) {
21277
- return cljs.core.apply.call(null, cljs.core.list, cljs.reader.read_delimited_list.call(null, ")", rdr, true))
21278
- };
21279
- cljs.reader.read_comment = cljs.reader.skip_line;
21280
- cljs.reader.read_vector = function read_vector(rdr, _) {
21281
- return cljs.reader.read_delimited_list.call(null, "]", rdr, true)
21282
- };
21283
- cljs.reader.read_map = function read_map(rdr, _) {
21284
- var l = cljs.reader.read_delimited_list.call(null, "}", rdr, true);
21285
- if(cljs.core.odd_QMARK_.call(null, cljs.core.count.call(null, l))) {
21286
- cljs.reader.reader_error.call(null, rdr, "Map literal must contain an even number of forms")
21287
- }else {
21288
- }
21289
- return cljs.core.apply.call(null, cljs.core.hash_map, l)
21290
- };
21291
- cljs.reader.read_number = function read_number(reader, initch) {
21292
- var buffer = new goog.string.StringBuffer(initch);
21293
- var ch = cljs.reader.read_char.call(null, reader);
21294
- while(true) {
21295
- if(cljs.core.truth_(function() {
21296
- var or__3824__auto__ = ch == null;
21297
- if(or__3824__auto__) {
21298
- return or__3824__auto__
21299
- }else {
21300
- var or__3824__auto____$1 = cljs.reader.whitespace_QMARK_.call(null, ch);
21301
- if(or__3824__auto____$1) {
21302
- return or__3824__auto____$1
21303
- }else {
21304
- return cljs.reader.macros.call(null, ch)
21305
- }
21306
- }
21307
- }())) {
21308
- cljs.reader.unread.call(null, reader, ch);
21309
- var s = buffer.toString();
21310
- var or__3824__auto__ = cljs.reader.match_number.call(null, s);
21311
- if(cljs.core.truth_(or__3824__auto__)) {
21312
- return or__3824__auto__
21313
- }else {
21314
- return cljs.reader.reader_error.call(null, reader, "Invalid number format [", s, "]")
21315
- }
21316
- }else {
21317
- var G__3672 = function() {
21318
- buffer.append(ch);
21319
- return buffer
21320
- }();
21321
- var G__3673 = cljs.reader.read_char.call(null, reader);
21322
- buffer = G__3672;
21323
- ch = G__3673;
21324
- continue
21383
+ };
21384
+ var perform_on = function(action, var_args) {
21385
+ var args = null;
21386
+ if(goog.isDef(var_args)) {
21387
+ args = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0)
21325
21388
  }
21326
- break
21327
- }
21328
- };
21329
- cljs.reader.read_string_STAR_ = function read_string_STAR_(reader, _) {
21330
- var buffer = new goog.string.StringBuffer;
21331
- var ch = cljs.reader.read_char.call(null, reader);
21332
- while(true) {
21333
- if(ch == null) {
21334
- return cljs.reader.reader_error.call(null, reader, "EOF while reading")
21335
- }else {
21336
- if("\\" === ch) {
21337
- var G__3674 = function() {
21338
- buffer.append(cljs.reader.escape_char.call(null, buffer, reader));
21339
- return buffer
21340
- }();
21341
- var G__3675 = cljs.reader.read_char.call(null, reader);
21342
- buffer = G__3674;
21343
- ch = G__3675;
21344
- continue
21345
- }else {
21346
- if('"' === ch) {
21347
- return buffer.toString()
21348
- }else {
21349
- if("\ufdd0'default") {
21350
- var G__3676 = function() {
21351
- buffer.append(ch);
21352
- return buffer
21353
- }();
21354
- var G__3677 = cljs.reader.read_char.call(null, reader);
21355
- buffer = G__3676;
21356
- ch = G__3677;
21357
- continue
21358
- }else {
21359
- return null
21360
- }
21361
- }
21362
- }
21389
+ return perform_on__delegate.call(this, action, args)
21390
+ };
21391
+ perform_on.cljs$lang$maxFixedArity = 1;
21392
+ perform_on.cljs$lang$applyTo = function(arglist__2896) {
21393
+ var action = cljs.core.first(arglist__2896);
21394
+ var args = cljs.core.rest(arglist__2896);
21395
+ return perform_on__delegate(action, args)
21396
+ };
21397
+ perform_on.cljs$lang$arity$variadic = perform_on__delegate;
21398
+ return perform_on
21399
+ }();
21400
+ calabash_script.core.perform_on_first = function() {
21401
+ var perform_on_first__delegate = function(action, args) {
21402
+ return cljs.core.apply.call(null, calabash_script.core.perform_on, function(els) {
21403
+ return action.call(null, cljs.core.first.call(null, els))
21404
+ }, args)
21405
+ };
21406
+ var perform_on_first = function(action, var_args) {
21407
+ var args = null;
21408
+ if(goog.isDef(var_args)) {
21409
+ args = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0)
21363
21410
  }
21364
- break
21365
- }
21366
- };
21367
- cljs.reader.special_symbols = function special_symbols(t, not_found) {
21368
- if(t === "nil") {
21369
- return null
21370
- }else {
21371
- if(t === "true") {
21372
- return true
21373
- }else {
21374
- if(t === "false") {
21375
- return false
21376
- }else {
21377
- if("\ufdd0'else") {
21378
- return not_found
21379
- }else {
21380
- return null
21381
- }
21382
- }
21411
+ return perform_on_first__delegate.call(this, action, args)
21412
+ };
21413
+ perform_on_first.cljs$lang$maxFixedArity = 1;
21414
+ perform_on_first.cljs$lang$applyTo = function(arglist__2898) {
21415
+ var action = cljs.core.first(arglist__2898);
21416
+ var args = cljs.core.rest(arglist__2898);
21417
+ return perform_on_first__delegate(action, args)
21418
+ };
21419
+ perform_on_first.cljs$lang$arity$variadic = perform_on_first__delegate;
21420
+ return perform_on_first
21421
+ }();
21422
+ calabash_script.core.tap = function() {
21423
+ var tap__delegate = function(args) {
21424
+ return cljs.core.apply.call(null, calabash_script.core.perform_on_first, function(p1__2897_SHARP_) {
21425
+ return p1__2897_SHARP_.tap()
21426
+ }, args)
21427
+ };
21428
+ var tap = function(var_args) {
21429
+ var args = null;
21430
+ if(goog.isDef(var_args)) {
21431
+ args = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0)
21383
21432
  }
21384
- }
21385
- };
21386
- cljs.reader.read_symbol = function read_symbol(reader, initch) {
21387
- var token = cljs.reader.read_token.call(null, reader, initch);
21388
- if(cljs.core.truth_(goog.string.contains(token, "/"))) {
21389
- return cljs.core.symbol.call(null, cljs.core.subs.call(null, token, 0, token.indexOf("/")), cljs.core.subs.call(null, token, token.indexOf("/") + 1, token.length))
21390
- }else {
21391
- return cljs.reader.special_symbols.call(null, token, cljs.core.symbol.call(null, token))
21392
- }
21393
- };
21394
- cljs.reader.read_keyword = function read_keyword(reader, initch) {
21395
- var token = cljs.reader.read_token.call(null, reader, cljs.reader.read_char.call(null, reader));
21396
- var a = cljs.reader.re_matches_STAR_.call(null, cljs.reader.symbol_pattern, token);
21397
- var token__$1 = a[0];
21398
- var ns = a[1];
21399
- var name = a[2];
21400
- if(cljs.core.truth_(function() {
21401
- var or__3824__auto__ = function() {
21402
- var and__3822__auto__ = !(void 0 === ns);
21403
- if(and__3822__auto__) {
21404
- return ns.substring(ns.length - 2, ns.length) === ":/"
21405
- }else {
21406
- return and__3822__auto__
21407
- }
21408
- }();
21409
- if(cljs.core.truth_(or__3824__auto__)) {
21410
- return or__3824__auto__
21411
- }else {
21412
- var or__3824__auto____$1 = name[name.length - 1] === ":";
21413
- if(or__3824__auto____$1) {
21414
- return or__3824__auto____$1
21415
- }else {
21416
- return!(token__$1.indexOf("::", 1) === -1)
21417
- }
21433
+ return tap__delegate.call(this, args)
21434
+ };
21435
+ tap.cljs$lang$maxFixedArity = 0;
21436
+ tap.cljs$lang$applyTo = function(arglist__2900) {
21437
+ var args = cljs.core.seq(arglist__2900);
21438
+ return tap__delegate(args)
21439
+ };
21440
+ tap.cljs$lang$arity$variadic = tap__delegate;
21441
+ return tap
21442
+ }();
21443
+ calabash_script.core.double_tap = function() {
21444
+ var double_tap__delegate = function(args) {
21445
+ return cljs.core.apply.call(null, calabash_script.core.perform_on_first, function(p1__2899_SHARP_) {
21446
+ return p1__2899_SHARP_.doubleTap()
21447
+ }, args)
21448
+ };
21449
+ var double_tap = function(var_args) {
21450
+ var args = null;
21451
+ if(goog.isDef(var_args)) {
21452
+ args = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0)
21418
21453
  }
21419
- }())) {
21420
- return cljs.reader.reader_error.call(null, reader, "Invalid token: ", token__$1)
21421
- }else {
21422
- if(function() {
21423
- var and__3822__auto__ = !(ns == null);
21424
- if(and__3822__auto__) {
21425
- return ns.length > 0
21454
+ return double_tap__delegate.call(this, args)
21455
+ };
21456
+ double_tap.cljs$lang$maxFixedArity = 0;
21457
+ double_tap.cljs$lang$applyTo = function(arglist__2902) {
21458
+ var args = cljs.core.seq(arglist__2902);
21459
+ return double_tap__delegate(args)
21460
+ };
21461
+ double_tap.cljs$lang$arity$variadic = double_tap__delegate;
21462
+ return double_tap
21463
+ }();
21464
+ calabash_script.core.two_finger_tap = function() {
21465
+ var two_finger_tap__delegate = function(args) {
21466
+ return cljs.core.apply.call(null, calabash_script.core.perform_on_first, function(p1__2901_SHARP_) {
21467
+ return p1__2901_SHARP_.twoFingerTap()
21468
+ }, args)
21469
+ };
21470
+ var two_finger_tap = function(var_args) {
21471
+ var args = null;
21472
+ if(goog.isDef(var_args)) {
21473
+ args = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0)
21474
+ }
21475
+ return two_finger_tap__delegate.call(this, args)
21476
+ };
21477
+ two_finger_tap.cljs$lang$maxFixedArity = 0;
21478
+ two_finger_tap.cljs$lang$applyTo = function(arglist__2903) {
21479
+ var args = cljs.core.seq(arglist__2903);
21480
+ return two_finger_tap__delegate(args)
21481
+ };
21482
+ two_finger_tap.cljs$lang$arity$variadic = two_finger_tap__delegate;
21483
+ return two_finger_tap
21484
+ }();
21485
+ calabash_script.core.pan = function() {
21486
+ var pan__delegate = function(src_query, tgt_query, kwargs) {
21487
+ var map__2906 = kwargs;
21488
+ var map__2906__$1 = cljs.core.seq_QMARK_.call(null, map__2906) ? cljs.core.apply.call(null, cljs.core.hash_map, map__2906) : map__2906;
21489
+ var duration = cljs.core._lookup.call(null, map__2906__$1, "\ufdd0'duration", 1);
21490
+ var src = cljs.core.first.call(null, cljs.core.seq.call(null, calabash_script.core.query.call(null, src_query)));
21491
+ var tgt = cljs.core.first.call(null, cljs.core.seq.call(null, calabash_script.core.query.call(null, tgt_query)));
21492
+ calabash_script.tests.fail_if_not.call(null, function() {
21493
+ var and__3822__auto__ = src;
21494
+ if(cljs.core.truth_(and__3822__auto__)) {
21495
+ return tgt
21426
21496
  }else {
21427
21497
  return and__3822__auto__
21428
21498
  }
21429
- }()) {
21430
- return cljs.core.keyword.call(null, ns.substring(0, ns.indexOf("/")), name)
21431
- }else {
21432
- return cljs.core.keyword.call(null, token__$1)
21499
+ }(), cljs.core.apply.call(null, cljs.core.str, "Unable to find results for both of ", src_query, tgt_query));
21500
+ return calabash_script.utils.target.call(null).dragFromToForDuration(calabash_script.utils.clj__GT_js.call(null, (new cljs.core.Keyword("\ufdd0'hit-point")).call(null, src)), calabash_script.utils.clj__GT_js.call(null, (new cljs.core.Keyword("\ufdd0'hit-point")).call(null, tgt)), duration)
21501
+ };
21502
+ var pan = function(src_query, tgt_query, var_args) {
21503
+ var kwargs = null;
21504
+ if(goog.isDef(var_args)) {
21505
+ kwargs = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0)
21433
21506
  }
21434
- }
21435
- };
21436
- cljs.reader.desugar_meta = function desugar_meta(f) {
21437
- if(cljs.core.symbol_QMARK_.call(null, f)) {
21438
- return cljs.core.ObjMap.fromObject(["\ufdd0'tag"], {"\ufdd0'tag":f})
21439
- }else {
21440
- if(cljs.core.string_QMARK_.call(null, f)) {
21441
- return cljs.core.ObjMap.fromObject(["\ufdd0'tag"], {"\ufdd0'tag":f})
21442
- }else {
21443
- if(cljs.core.keyword_QMARK_.call(null, f)) {
21444
- return cljs.core.PersistentArrayMap.fromArrays([f], [true])
21445
- }else {
21446
- if("\ufdd0'else") {
21447
- return f
21448
- }else {
21449
- return null
21450
- }
21451
- }
21507
+ return pan__delegate.call(this, src_query, tgt_query, kwargs)
21508
+ };
21509
+ pan.cljs$lang$maxFixedArity = 2;
21510
+ pan.cljs$lang$applyTo = function(arglist__2907) {
21511
+ var src_query = cljs.core.first(arglist__2907);
21512
+ var tgt_query = cljs.core.first(cljs.core.next(arglist__2907));
21513
+ var kwargs = cljs.core.rest(cljs.core.next(arglist__2907));
21514
+ return pan__delegate(src_query, tgt_query, kwargs)
21515
+ };
21516
+ pan.cljs$lang$arity$variadic = pan__delegate;
21517
+ return pan
21518
+ }();
21519
+ calabash_script.core.scroll_to = function() {
21520
+ var scroll_to__delegate = function(args) {
21521
+ return cljs.core.apply.call(null, calabash_script.core.perform_on_first, function(p1__2904_SHARP_) {
21522
+ return p1__2904_SHARP_.scrollToVisible()
21523
+ }, args)
21524
+ };
21525
+ var scroll_to = function(var_args) {
21526
+ var args = null;
21527
+ if(goog.isDef(var_args)) {
21528
+ args = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0)
21452
21529
  }
21453
- }
21454
- };
21455
- cljs.reader.wrapping_reader = function wrapping_reader(sym) {
21456
- return function(rdr, _) {
21457
- return cljs.core.list.call(null, sym, cljs.reader.read.call(null, rdr, true, null, true))
21458
- }
21459
- };
21460
- cljs.reader.throwing_reader = function throwing_reader(msg) {
21461
- return function(rdr, _) {
21462
- return cljs.reader.reader_error.call(null, rdr, msg)
21463
- }
21464
- };
21465
- cljs.reader.read_meta = function read_meta(rdr, _) {
21466
- var m = cljs.reader.desugar_meta.call(null, cljs.reader.read.call(null, rdr, true, null, true));
21467
- if(cljs.core.map_QMARK_.call(null, m)) {
21468
- }else {
21469
- cljs.reader.reader_error.call(null, rdr, "Metadata must be Symbol,Keyword,String or Map")
21470
- }
21471
- var o = cljs.reader.read.call(null, rdr, true, null, true);
21472
- if(function() {
21473
- var G__3679 = o;
21474
- if(G__3679) {
21475
- if(function() {
21476
- var or__3824__auto__ = G__3679.cljs$lang$protocol_mask$partition0$ & 262144;
21477
- if(or__3824__auto__) {
21478
- return or__3824__auto__
21479
- }else {
21480
- return G__3679.cljs$core$IWithMeta$
21481
- }
21482
- }()) {
21483
- return true
21484
- }else {
21485
- if(!G__3679.cljs$lang$protocol_mask$partition0$) {
21486
- return cljs.core.type_satisfies_.call(null, cljs.core.IWithMeta, G__3679)
21487
- }else {
21488
- return false
21489
- }
21490
- }
21491
- }else {
21492
- return cljs.core.type_satisfies_.call(null, cljs.core.IWithMeta, G__3679)
21530
+ return scroll_to__delegate.call(this, args)
21531
+ };
21532
+ scroll_to.cljs$lang$maxFixedArity = 0;
21533
+ scroll_to.cljs$lang$applyTo = function(arglist__2909) {
21534
+ var args = cljs.core.seq(arglist__2909);
21535
+ return scroll_to__delegate(args)
21536
+ };
21537
+ scroll_to.cljs$lang$arity$variadic = scroll_to__delegate;
21538
+ return scroll_to
21539
+ }();
21540
+ calabash_script.core.touch_hold = function() {
21541
+ var touch_hold__delegate = function(duration, args) {
21542
+ return cljs.core.apply.call(null, calabash_script.core.perform_on_first, function(p1__2908_SHARP_) {
21543
+ return p1__2908_SHARP_.touchAndHold(duration)
21544
+ }, args)
21545
+ };
21546
+ var touch_hold = function(duration, var_args) {
21547
+ var args = null;
21548
+ if(goog.isDef(var_args)) {
21549
+ args = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0)
21493
21550
  }
21494
- }()) {
21495
- return cljs.core.with_meta.call(null, o, cljs.core.merge.call(null, cljs.core.meta.call(null, o), m))
21496
- }else {
21497
- return cljs.reader.reader_error.call(null, rdr, "Metadata can only be applied to IWithMetas")
21498
- }
21551
+ return touch_hold__delegate.call(this, duration, args)
21552
+ };
21553
+ touch_hold.cljs$lang$maxFixedArity = 1;
21554
+ touch_hold.cljs$lang$applyTo = function(arglist__2910) {
21555
+ var duration = cljs.core.first(arglist__2910);
21556
+ var args = cljs.core.rest(arglist__2910);
21557
+ return touch_hold__delegate(duration, args)
21558
+ };
21559
+ touch_hold.cljs$lang$arity$variadic = touch_hold__delegate;
21560
+ return touch_hold
21561
+ }();
21562
+ calabash_script.core._STAR_alert_handlers_STAR_ = cljs.core.atom.call(null, cljs.core.list.call(null, cljs.core.constantly.call(null, true)));
21563
+ calabash_script.core.set_alert_handler_BANG_ = function set_alert_handler_BANG_(handler) {
21564
+ return calabash_script.utils.target.call(null)["onAlert"] = handler
21499
21565
  };
21500
- cljs.reader.read_set = function read_set(rdr, _) {
21501
- return cljs.core.set.call(null, cljs.reader.read_delimited_list.call(null, "}", rdr, true))
21566
+ calabash_script.core.add_alert_handler_BANG_ = function add_alert_handler_BANG_(handler) {
21567
+ return cljs.core.swap_BANG_.call(null, calabash_script.core._STAR_alert_handlers_STAR_, function(p1__2911_SHARP_) {
21568
+ return cljs.core.cons.call(null, handler, p1__2911_SHARP_)
21569
+ })
21502
21570
  };
21503
- cljs.reader.read_regex = function read_regex(rdr, ch) {
21504
- return cljs.core.re_pattern.call(null, cljs.reader.read_string_STAR_.call(null, rdr, ch))
21571
+ calabash_script.core.set_alert_handler_BANG_.call(null, function(alert) {
21572
+ var handler_values = cljs.core.map.call(null, function(h) {
21573
+ return h.call(null, alert)
21574
+ }, cljs.core.deref.call(null, calabash_script.core._STAR_alert_handlers_STAR_));
21575
+ return cljs.core.first.call(null, cljs.core.filter.call(null, cljs.core.true_QMARK_, handler_values))
21576
+ });
21577
+ calabash_script.core.alert = function alert() {
21578
+ return calabash_script.utils.normalize.call(null, calabash_script.utils.app.call(null).alert())
21505
21579
  };
21506
- cljs.reader.read_discard = function read_discard(rdr, _) {
21507
- cljs.reader.read.call(null, rdr, true, null, true);
21508
- return rdr
21580
+ calabash_script.core.alert_texts = function alert_texts() {
21581
+ return null
21509
21582
  };
21510
- cljs.reader.macros = function macros(c) {
21511
- if(c === '"') {
21512
- return cljs.reader.read_string_STAR_
21513
- }else {
21514
- if(c === ":") {
21515
- return cljs.reader.read_keyword
21583
+ calabash_script.core.keyboard_visible_QMARK_ = function keyboard_visible_QMARK_() {
21584
+ return calabash_script.query.valid_QMARK_.call(null, calabash_script.utils.keyboard.call(null))
21585
+ };
21586
+ calabash_script.core.keyboard_enter_text = function keyboard_enter_text(txt) {
21587
+ calabash_script.tests.fail_if_not.call(null, calabash_script.core.keyboard_visible_QMARK_.call(null), "Keyboard not visible");
21588
+ return calabash_script.utils.keyboard.call(null).typeString(txt)
21589
+ };
21590
+ calabash_script.core.enter = function enter() {
21591
+ calabash_script.tests.fail_if_not.call(null, calabash_script.core.keyboard_visible_QMARK_.call(null), "Keyboard not visible");
21592
+ return calabash_script.utils.keyboard.call(null).typeString("\n")
21593
+ };
21594
+ calabash_script.core.tap_mark = function tap_mark(mark) {
21595
+ return calabash_script.core.tap.call(null, cljs.core.PersistentVector.fromArray(["\ufdd0'view", cljs.core.ObjMap.fromObject(["\ufdd0'marked"], {"\ufdd0'marked":mark})], true))
21596
+ };
21597
+ calabash_script.core.tap_offset = function tap_offset(offset) {
21598
+ var rect = calabash_script.utils.window.call(null).rect();
21599
+ var center_x = rect["size"]["width"] / 2;
21600
+ var center_y = rect["size"]["height"] / 2;
21601
+ var x = cljs.core.int$.call(null, (new cljs.core.Keyword("\ufdd0'x")).call(null, offset)) - center_x;
21602
+ var y = cljs.core.int$.call(null, (new cljs.core.Keyword("\ufdd0'y")).call(null, offset)) - center_y;
21603
+ calabash_script.log.log.call(null, cljs.core.ObjMap.fromObject(["\ufdd0'tapOffset"], {"\ufdd0'tapOffset":cljs.core.ObjMap.fromObject(["\ufdd0'x", "\ufdd0'y"], {"\ufdd0'x":x, "\ufdd0'y":y})}));
21604
+ return calabash_script.utils.target.call(null).tapWithOptions(calabash_script.utils.clj__GT_js.call(null, offset))
21605
+ };
21606
+ calabash_script.core.element_exists_QMARK_ = function() {
21607
+ var element_exists_QMARK___delegate = function(args) {
21608
+ return cljs.core.boolean$.call(null, cljs.core.seq.call(null, cljs.core.apply.call(null, calabash_script.core.query, args)))
21609
+ };
21610
+ var element_exists_QMARK_ = function(var_args) {
21611
+ var args = null;
21612
+ if(goog.isDef(var_args)) {
21613
+ args = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0)
21614
+ }
21615
+ return element_exists_QMARK___delegate.call(this, args)
21616
+ };
21617
+ element_exists_QMARK_.cljs$lang$maxFixedArity = 0;
21618
+ element_exists_QMARK_.cljs$lang$applyTo = function(arglist__2912) {
21619
+ var args = cljs.core.seq(arglist__2912);
21620
+ return element_exists_QMARK___delegate(args)
21621
+ };
21622
+ element_exists_QMARK_.cljs$lang$arity$variadic = element_exists_QMARK___delegate;
21623
+ return element_exists_QMARK_
21624
+ }();
21625
+ calabash_script.core.element_does_not_exist_QMARK_ = function() {
21626
+ var element_does_not_exist_QMARK___delegate = function(args) {
21627
+ return cljs.core.not.call(null, cljs.core.apply.call(null, calabash_script.core.element_exists_QMARK_, args))
21628
+ };
21629
+ var element_does_not_exist_QMARK_ = function(var_args) {
21630
+ var args = null;
21631
+ if(goog.isDef(var_args)) {
21632
+ args = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0)
21633
+ }
21634
+ return element_does_not_exist_QMARK___delegate.call(this, args)
21635
+ };
21636
+ element_does_not_exist_QMARK_.cljs$lang$maxFixedArity = 0;
21637
+ element_does_not_exist_QMARK_.cljs$lang$applyTo = function(arglist__2913) {
21638
+ var args = cljs.core.seq(arglist__2913);
21639
+ return element_does_not_exist_QMARK___delegate(args)
21640
+ };
21641
+ element_does_not_exist_QMARK_.cljs$lang$arity$variadic = element_does_not_exist_QMARK___delegate;
21642
+ return element_does_not_exist_QMARK_
21643
+ }();
21644
+ calabash_script.core.check_element_exists = function() {
21645
+ var check_element_exists__delegate = function(args) {
21646
+ if(cljs.core.truth_(cljs.core.apply.call(null, calabash_script.core.element_exists_QMARK_, args))) {
21647
+ return null
21516
21648
  }else {
21517
- if(c === ";") {
21518
- return cljs.reader.not_implemented
21519
- }else {
21520
- if(c === "'") {
21521
- return cljs.reader.wrapping_reader.call(null, "\ufdd1'quote")
21522
- }else {
21523
- if(c === "@") {
21524
- return cljs.reader.wrapping_reader.call(null, "\ufdd1'deref")
21525
- }else {
21526
- if(c === "^") {
21527
- return cljs.reader.read_meta
21528
- }else {
21529
- if(c === "`") {
21530
- return cljs.reader.not_implemented
21531
- }else {
21532
- if(c === "~") {
21533
- return cljs.reader.not_implemented
21534
- }else {
21535
- if(c === "(") {
21536
- return cljs.reader.read_list
21537
- }else {
21538
- if(c === ")") {
21539
- return cljs.reader.read_unmatched_delimiter
21540
- }else {
21541
- if(c === "[") {
21542
- return cljs.reader.read_vector
21543
- }else {
21544
- if(c === "]") {
21545
- return cljs.reader.read_unmatched_delimiter
21546
- }else {
21547
- if(c === "{") {
21548
- return cljs.reader.read_map
21549
- }else {
21550
- if(c === "}") {
21551
- return cljs.reader.read_unmatched_delimiter
21552
- }else {
21553
- if(c === "\\") {
21554
- return cljs.reader.read_char
21555
- }else {
21556
- if(c === "%") {
21557
- return cljs.reader.not_implemented
21558
- }else {
21559
- if(c === "#") {
21560
- return cljs.reader.read_dispatch
21561
- }else {
21562
- if("\ufdd0'else") {
21563
- return null
21564
- }else {
21565
- return null
21566
- }
21567
- }
21568
- }
21569
- }
21570
- }
21571
- }
21572
- }
21573
- }
21574
- }
21575
- }
21576
- }
21577
- }
21578
- }
21579
- }
21580
- }
21581
- }
21649
+ return calabash_script.tests.fail.call(null, "Element does not exist: ", cljs.core.apply.call(null, cljs.core.str, args))
21582
21650
  }
21583
- }
21584
- };
21585
- cljs.reader.dispatch_macros = function dispatch_macros(s) {
21586
- if(s === "{") {
21587
- return cljs.reader.read_set
21588
- }else {
21589
- if(s === "<") {
21590
- return cljs.reader.throwing_reader.call(null, "Unreadable form")
21651
+ };
21652
+ var check_element_exists = function(var_args) {
21653
+ var args = null;
21654
+ if(goog.isDef(var_args)) {
21655
+ args = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0)
21656
+ }
21657
+ return check_element_exists__delegate.call(this, args)
21658
+ };
21659
+ check_element_exists.cljs$lang$maxFixedArity = 0;
21660
+ check_element_exists.cljs$lang$applyTo = function(arglist__2914) {
21661
+ var args = cljs.core.seq(arglist__2914);
21662
+ return check_element_exists__delegate(args)
21663
+ };
21664
+ check_element_exists.cljs$lang$arity$variadic = check_element_exists__delegate;
21665
+ return check_element_exists
21666
+ }();
21667
+ calabash_script.core.check_element_does_not_exist = function() {
21668
+ var check_element_does_not_exist__delegate = function(args) {
21669
+ if(cljs.core.truth_(cljs.core.apply.call(null, calabash_script.core.element_exists_QMARK_, args))) {
21670
+ return calabash_script.tests.fail.call(null, "Element does exist: ", cljs.core.apply.call(null, cljs.core.str, args))
21591
21671
  }else {
21592
- if(s === '"') {
21593
- return cljs.reader.read_regex
21594
- }else {
21595
- if(s === "!") {
21596
- return cljs.reader.read_comment
21597
- }else {
21598
- if(s === "_") {
21599
- return cljs.reader.read_discard
21600
- }else {
21601
- if("\ufdd0'else") {
21602
- return null
21603
- }else {
21604
- return null
21605
- }
21606
- }
21607
- }
21608
- }
21672
+ return null
21609
21673
  }
21610
- }
21674
+ };
21675
+ var check_element_does_not_exist = function(var_args) {
21676
+ var args = null;
21677
+ if(goog.isDef(var_args)) {
21678
+ args = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0)
21679
+ }
21680
+ return check_element_does_not_exist__delegate.call(this, args)
21681
+ };
21682
+ check_element_does_not_exist.cljs$lang$maxFixedArity = 0;
21683
+ check_element_does_not_exist.cljs$lang$applyTo = function(arglist__2915) {
21684
+ var args = cljs.core.seq(arglist__2915);
21685
+ return check_element_does_not_exist__delegate(args)
21686
+ };
21687
+ check_element_does_not_exist.cljs$lang$arity$variadic = check_element_does_not_exist__delegate;
21688
+ return check_element_does_not_exist
21689
+ }();
21690
+ calabash_script.core.names = function() {
21691
+ var names__delegate = function(args) {
21692
+ return cljs.core.map.call(null, "\ufdd0'name", cljs.core.apply.call(null, calabash_script.core.query, args))
21693
+ };
21694
+ var names = function(var_args) {
21695
+ var args = null;
21696
+ if(goog.isDef(var_args)) {
21697
+ args = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0)
21698
+ }
21699
+ return names__delegate.call(this, args)
21700
+ };
21701
+ names.cljs$lang$maxFixedArity = 0;
21702
+ names.cljs$lang$applyTo = function(arglist__2916) {
21703
+ var args = cljs.core.seq(arglist__2916);
21704
+ return names__delegate(args)
21705
+ };
21706
+ names.cljs$lang$arity$variadic = names__delegate;
21707
+ return names
21708
+ }();
21709
+ calabash_script.core.set_location = function set_location(location) {
21710
+ return calabash_script.utils.target.call(null).setLocation(calabash_script.utils.clj__GT_js.call(null, location))
21611
21711
  };
21612
- cljs.reader.read = function read(reader, eof_is_error, sentinel, is_recursive) {
21613
- while(true) {
21614
- var ch = cljs.reader.read_char.call(null, reader);
21615
- if(ch == null) {
21616
- if(cljs.core.truth_(eof_is_error)) {
21617
- return cljs.reader.reader_error.call(null, reader, "EOF while reading")
21618
- }else {
21619
- return sentinel
21620
- }
21712
+ goog.provide("cljs.reader");
21713
+ goog.require("cljs.core");
21714
+ goog.require("goog.string");
21715
+ cljs.reader.PushbackReader = {};
21716
+ cljs.reader.read_char = function read_char(reader) {
21717
+ if(function() {
21718
+ var and__3822__auto__ = reader;
21719
+ if(and__3822__auto__) {
21720
+ return reader.cljs$reader$PushbackReader$read_char$arity$1
21621
21721
  }else {
21622
- if(cljs.reader.whitespace_QMARK_.call(null, ch)) {
21623
- var G__3680 = reader;
21624
- var G__3681 = eof_is_error;
21625
- var G__3682 = sentinel;
21626
- var G__3683 = is_recursive;
21627
- reader = G__3680;
21628
- eof_is_error = G__3681;
21629
- sentinel = G__3682;
21630
- is_recursive = G__3683;
21631
- continue
21722
+ return and__3822__auto__
21723
+ }
21724
+ }()) {
21725
+ return reader.cljs$reader$PushbackReader$read_char$arity$1(reader)
21726
+ }else {
21727
+ var x__2384__auto__ = reader == null ? null : reader;
21728
+ return function() {
21729
+ var or__3824__auto__ = cljs.reader.read_char[goog.typeOf(x__2384__auto__)];
21730
+ if(or__3824__auto__) {
21731
+ return or__3824__auto__
21632
21732
  }else {
21633
- if(cljs.reader.comment_prefix_QMARK_.call(null, ch)) {
21634
- var G__3684 = cljs.reader.read_comment.call(null, reader, ch);
21635
- var G__3685 = eof_is_error;
21636
- var G__3686 = sentinel;
21637
- var G__3687 = is_recursive;
21638
- reader = G__3684;
21639
- eof_is_error = G__3685;
21640
- sentinel = G__3686;
21641
- is_recursive = G__3687;
21642
- continue
21733
+ var or__3824__auto____$1 = cljs.reader.read_char["_"];
21734
+ if(or__3824__auto____$1) {
21735
+ return or__3824__auto____$1
21643
21736
  }else {
21644
- if("\ufdd0'else") {
21645
- var f = cljs.reader.macros.call(null, ch);
21646
- var res = cljs.core.truth_(f) ? f.call(null, reader, ch) : cljs.reader.number_literal_QMARK_.call(null, reader, ch) ? cljs.reader.read_number.call(null, reader, ch) : "\ufdd0'else" ? cljs.reader.read_symbol.call(null, reader, ch) : null;
21647
- if(res === reader) {
21648
- var G__3688 = reader;
21649
- var G__3689 = eof_is_error;
21650
- var G__3690 = sentinel;
21651
- var G__3691 = is_recursive;
21652
- reader = G__3688;
21653
- eof_is_error = G__3689;
21654
- sentinel = G__3690;
21655
- is_recursive = G__3691;
21656
- continue
21657
- }else {
21658
- return res
21659
- }
21660
- }else {
21661
- return null
21662
- }
21737
+ throw cljs.core.missing_protocol.call(null, "PushbackReader.read-char", reader);
21663
21738
  }
21664
21739
  }
21665
- }
21666
- break
21740
+ }().call(null, reader)
21667
21741
  }
21668
21742
  };
21669
- cljs.reader.read_string = function read_string(s) {
21670
- var r = cljs.reader.push_back_reader.call(null, s);
21671
- return cljs.reader.read.call(null, r, true, null, false)
21672
- };
21673
- cljs.reader.zero_fill_right = function zero_fill_right(s, width) {
21674
- if(cljs.core._EQ_.call(null, width, cljs.core.count.call(null, s))) {
21675
- return s
21676
- }else {
21677
- if(width < cljs.core.count.call(null, s)) {
21678
- return s.substring(0, width)
21743
+ cljs.reader.unread = function unread(reader, ch) {
21744
+ if(function() {
21745
+ var and__3822__auto__ = reader;
21746
+ if(and__3822__auto__) {
21747
+ return reader.cljs$reader$PushbackReader$unread$arity$2
21679
21748
  }else {
21680
- if("\ufdd0'else") {
21681
- var b = new goog.string.StringBuffer(s);
21682
- while(true) {
21683
- if(b.getLength() < width) {
21684
- var G__3692 = b.append("0");
21685
- b = G__3692;
21686
- continue
21687
- }else {
21688
- return b.toString()
21689
- }
21690
- break
21691
- }
21749
+ return and__3822__auto__
21750
+ }
21751
+ }()) {
21752
+ return reader.cljs$reader$PushbackReader$unread$arity$2(reader, ch)
21753
+ }else {
21754
+ var x__2384__auto__ = reader == null ? null : reader;
21755
+ return function() {
21756
+ var or__3824__auto__ = cljs.reader.unread[goog.typeOf(x__2384__auto__)];
21757
+ if(or__3824__auto__) {
21758
+ return or__3824__auto__
21692
21759
  }else {
21693
- return null
21760
+ var or__3824__auto____$1 = cljs.reader.unread["_"];
21761
+ if(or__3824__auto____$1) {
21762
+ return or__3824__auto____$1
21763
+ }else {
21764
+ throw cljs.core.missing_protocol.call(null, "PushbackReader.unread", reader);
21765
+ }
21694
21766
  }
21695
- }
21767
+ }().call(null, reader, ch)
21696
21768
  }
21697
21769
  };
21698
- cljs.reader.divisible_QMARK_ = function divisible_QMARK_(num, div) {
21699
- return num % div === 0
21770
+ goog.provide("cljs.reader.StringPushbackReader");
21771
+ cljs.reader.StringPushbackReader = function(s, index_atom, buffer_atom) {
21772
+ this.s = s;
21773
+ this.index_atom = index_atom;
21774
+ this.buffer_atom = buffer_atom
21700
21775
  };
21701
- cljs.reader.indivisible_QMARK_ = function indivisible_QMARK_(num, div) {
21702
- return cljs.core.not.call(null, cljs.reader.divisible_QMARK_.call(null, num, div))
21776
+ cljs.reader.StringPushbackReader.cljs$lang$type = true;
21777
+ cljs.reader.StringPushbackReader.cljs$lang$ctorPrSeq = function(this__2324__auto__) {
21778
+ return cljs.core.list.call(null, "cljs.reader/StringPushbackReader")
21703
21779
  };
21704
- cljs.reader.leap_year_QMARK_ = function leap_year_QMARK_(year) {
21705
- var and__3822__auto__ = cljs.reader.divisible_QMARK_.call(null, year, 4);
21706
- if(cljs.core.truth_(and__3822__auto__)) {
21707
- var or__3824__auto__ = cljs.reader.indivisible_QMARK_.call(null, year, 100);
21708
- if(cljs.core.truth_(or__3824__auto__)) {
21709
- return or__3824__auto__
21710
- }else {
21711
- return cljs.reader.divisible_QMARK_.call(null, year, 400)
21712
- }
21780
+ cljs.reader.StringPushbackReader.cljs$lang$ctorPrWriter = function(this__2324__auto__, writer__2325__auto__, opt__2326__auto__) {
21781
+ return cljs.core._write.call(null, writer__2325__auto__, "cljs.reader/StringPushbackReader")
21782
+ };
21783
+ cljs.reader.StringPushbackReader.prototype.cljs$reader$PushbackReader$ = true;
21784
+ cljs.reader.StringPushbackReader.prototype.cljs$reader$PushbackReader$read_char$arity$1 = function(reader) {
21785
+ var self__ = this;
21786
+ if(cljs.core.empty_QMARK_.call(null, cljs.core.deref.call(null, self__.buffer_atom))) {
21787
+ var idx = cljs.core.deref.call(null, self__.index_atom);
21788
+ cljs.core.swap_BANG_.call(null, self__.index_atom, cljs.core.inc);
21789
+ return self__.s[idx]
21713
21790
  }else {
21714
- return and__3822__auto__
21791
+ var buf = cljs.core.deref.call(null, self__.buffer_atom);
21792
+ cljs.core.swap_BANG_.call(null, self__.buffer_atom, cljs.core.rest);
21793
+ return cljs.core.first.call(null, buf)
21715
21794
  }
21716
21795
  };
21717
- cljs.reader.days_in_month = function() {
21718
- var dim_norm = cljs.core.PersistentVector.fromArray([null, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], true);
21719
- var dim_leap = cljs.core.PersistentVector.fromArray([null, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], true);
21720
- return function(month, leap_year_QMARK_) {
21721
- return cljs.core._lookup.call(null, cljs.core.truth_(leap_year_QMARK_) ? dim_leap : dim_norm, month, null)
21796
+ cljs.reader.StringPushbackReader.prototype.cljs$reader$PushbackReader$unread$arity$2 = function(reader, ch) {
21797
+ var self__ = this;
21798
+ return cljs.core.swap_BANG_.call(null, self__.buffer_atom, function(p1__3665_SHARP_) {
21799
+ return cljs.core.cons.call(null, ch, p1__3665_SHARP_)
21800
+ })
21801
+ };
21802
+ cljs.reader.push_back_reader = function push_back_reader(s) {
21803
+ return new cljs.reader.StringPushbackReader(s, cljs.core.atom.call(null, 0), cljs.core.atom.call(null, null))
21804
+ };
21805
+ cljs.reader.whitespace_QMARK_ = function whitespace_QMARK_(ch) {
21806
+ var or__3824__auto__ = goog.string.isBreakingWhitespace(ch);
21807
+ if(cljs.core.truth_(or__3824__auto__)) {
21808
+ return or__3824__auto__
21809
+ }else {
21810
+ return"," === ch
21722
21811
  }
21723
- }();
21724
- cljs.reader.parse_and_validate_timestamp = function() {
21725
- var timestamp = /(\d\d\d\d)(?:-(\d\d)(?:-(\d\d)(?:[T](\d\d)(?::(\d\d)(?::(\d\d)(?:[.](\d+))?)?)?)?)?)?(?:[Z]|([-+])(\d\d):(\d\d))?/;
21726
- var check = function(low, n, high, msg) {
21727
- if(function() {
21728
- var and__3822__auto__ = low <= n;
21729
- if(and__3822__auto__) {
21730
- return n <= high
21812
+ };
21813
+ cljs.reader.numeric_QMARK_ = function numeric_QMARK_(ch) {
21814
+ return goog.string.isNumeric(ch)
21815
+ };
21816
+ cljs.reader.comment_prefix_QMARK_ = function comment_prefix_QMARK_(ch) {
21817
+ return";" === ch
21818
+ };
21819
+ cljs.reader.number_literal_QMARK_ = function number_literal_QMARK_(reader, initch) {
21820
+ var or__3824__auto__ = cljs.reader.numeric_QMARK_.call(null, initch);
21821
+ if(or__3824__auto__) {
21822
+ return or__3824__auto__
21823
+ }else {
21824
+ var and__3822__auto__ = function() {
21825
+ var or__3824__auto____$1 = "+" === initch;
21826
+ if(or__3824__auto____$1) {
21827
+ return or__3824__auto____$1
21731
21828
  }else {
21732
- return and__3822__auto__
21829
+ return"-" === initch
21733
21830
  }
21734
- }()) {
21831
+ }();
21832
+ if(cljs.core.truth_(and__3822__auto__)) {
21833
+ return cljs.reader.numeric_QMARK_.call(null, function() {
21834
+ var next_ch = cljs.reader.read_char.call(null, reader);
21835
+ cljs.reader.unread.call(null, reader, next_ch);
21836
+ return next_ch
21837
+ }())
21735
21838
  }else {
21736
- throw new Error([cljs.core.str("Assert failed: "), cljs.core.str([cljs.core.str(msg), cljs.core.str(" Failed: "), cljs.core.str(low), cljs.core.str("<="), cljs.core.str(n), cljs.core.str("<="), cljs.core.str(high)].join("")), cljs.core.str("\n"), cljs.core.str(cljs.core.pr_str.call(null, cljs.core.with_meta(cljs.core.list("\ufdd1'<=", "\ufdd1'low", "\ufdd1'n", "\ufdd1'high"), cljs.core.hash_map("\ufdd0'line", 474))))].join(""));
21839
+ return and__3822__auto__
21737
21840
  }
21738
- return n
21841
+ }
21842
+ };
21843
+ cljs.reader.reader_error = function() {
21844
+ var reader_error__delegate = function(rdr, msg) {
21845
+ throw new Error(cljs.core.apply.call(null, cljs.core.str, msg));
21739
21846
  };
21740
- return function(ts) {
21741
- var temp__3974__auto__ = cljs.core.map.call(null, cljs.core.vec, cljs.core.split_at.call(null, 8, cljs.core.re_matches.call(null, timestamp, ts)));
21742
- if(cljs.core.truth_(temp__3974__auto__)) {
21743
- var vec__3697 = temp__3974__auto__;
21744
- var vec__3698 = cljs.core.nth.call(null, vec__3697, 0, null);
21745
- var _ = cljs.core.nth.call(null, vec__3698, 0, null);
21746
- var years = cljs.core.nth.call(null, vec__3698, 1, null);
21747
- var months = cljs.core.nth.call(null, vec__3698, 2, null);
21748
- var days = cljs.core.nth.call(null, vec__3698, 3, null);
21749
- var hours = cljs.core.nth.call(null, vec__3698, 4, null);
21750
- var minutes = cljs.core.nth.call(null, vec__3698, 5, null);
21751
- var seconds = cljs.core.nth.call(null, vec__3698, 6, null);
21752
- var milliseconds = cljs.core.nth.call(null, vec__3698, 7, null);
21753
- var vec__3699 = cljs.core.nth.call(null, vec__3697, 1, null);
21754
- var ___$1 = cljs.core.nth.call(null, vec__3699, 0, null);
21755
- var ___$2 = cljs.core.nth.call(null, vec__3699, 1, null);
21756
- var ___$3 = cljs.core.nth.call(null, vec__3699, 2, null);
21757
- var V = vec__3697;
21758
- var vec__3700 = cljs.core.map.call(null, function(v) {
21759
- return cljs.core.map.call(null, function(p1__3696_SHARP_) {
21760
- return parseInt(p1__3696_SHARP_, 10)
21761
- }, v)
21762
- }, cljs.core.map.call(null, function(p1__3694_SHARP_, p2__3693_SHARP_) {
21763
- return cljs.core.update_in.call(null, p2__3693_SHARP_, cljs.core.PersistentVector.fromArray([0], true), p1__3694_SHARP_)
21764
- }, cljs.core.PersistentVector.fromArray([cljs.core.constantly.call(null, null), function(p1__3695_SHARP_) {
21765
- if(cljs.core._EQ_.call(null, p1__3695_SHARP_, "-")) {
21766
- return"-1"
21767
- }else {
21768
- return"1"
21769
- }
21770
- }], true), V));
21771
- var vec__3701 = cljs.core.nth.call(null, vec__3700, 0, null);
21772
- var ___$4 = cljs.core.nth.call(null, vec__3701, 0, null);
21773
- var y = cljs.core.nth.call(null, vec__3701, 1, null);
21774
- var mo = cljs.core.nth.call(null, vec__3701, 2, null);
21775
- var d = cljs.core.nth.call(null, vec__3701, 3, null);
21776
- var h = cljs.core.nth.call(null, vec__3701, 4, null);
21777
- var m = cljs.core.nth.call(null, vec__3701, 5, null);
21778
- var s = cljs.core.nth.call(null, vec__3701, 6, null);
21779
- var ms = cljs.core.nth.call(null, vec__3701, 7, null);
21780
- var vec__3702 = cljs.core.nth.call(null, vec__3700, 1, null);
21781
- var offset_sign = cljs.core.nth.call(null, vec__3702, 0, null);
21782
- var offset_hours = cljs.core.nth.call(null, vec__3702, 1, null);
21783
- var offset_minutes = cljs.core.nth.call(null, vec__3702, 2, null);
21784
- var offset = offset_sign * (offset_hours * 60 + offset_minutes);
21785
- return cljs.core.PersistentVector.fromArray([cljs.core.not.call(null, years) ? 1970 : y, cljs.core.not.call(null, months) ? 1 : check.call(null, 1, mo, 12, "timestamp month field must be in range 1..12"), cljs.core.not.call(null, days) ? 1 : check.call(null, 1, d, cljs.reader.days_in_month.call(null, mo, cljs.reader.leap_year_QMARK_.call(null, y)), "timestamp day field must be in range 1..last day in month"), cljs.core.not.call(null, hours) ? 0 : check.call(null, 0, h, 23, "timestamp hour field must be in range 0..23"),
21786
- cljs.core.not.call(null, minutes) ? 0 : check.call(null, 0, m, 59, "timestamp minute field must be in range 0..59"), cljs.core.not.call(null, seconds) ? 0 : check.call(null, 0, s, cljs.core._EQ_.call(null, m, 59) ? 60 : 59, "timestamp second field must be in range 0..60"), cljs.core.not.call(null, milliseconds) ? 0 : check.call(null, 0, ms, 999, "timestamp millisecond field must be in range 0..999"), offset], true)
21847
+ var reader_error = function(rdr, var_args) {
21848
+ var msg = null;
21849
+ if(goog.isDef(var_args)) {
21850
+ msg = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0)
21851
+ }
21852
+ return reader_error__delegate.call(this, rdr, msg)
21853
+ };
21854
+ reader_error.cljs$lang$maxFixedArity = 1;
21855
+ reader_error.cljs$lang$applyTo = function(arglist__3666) {
21856
+ var rdr = cljs.core.first(arglist__3666);
21857
+ var msg = cljs.core.rest(arglist__3666);
21858
+ return reader_error__delegate(rdr, msg)
21859
+ };
21860
+ reader_error.cljs$lang$arity$variadic = reader_error__delegate;
21861
+ return reader_error
21862
+ }();
21863
+ cljs.reader.macro_terminating_QMARK_ = function macro_terminating_QMARK_(ch) {
21864
+ var and__3822__auto__ = !(ch === "#");
21865
+ if(and__3822__auto__) {
21866
+ var and__3822__auto____$1 = !(ch === "'");
21867
+ if(and__3822__auto____$1) {
21868
+ var and__3822__auto____$2 = !(ch === ":");
21869
+ if(and__3822__auto____$2) {
21870
+ return cljs.reader.macros.call(null, ch)
21871
+ }else {
21872
+ return and__3822__auto____$2
21873
+ }
21787
21874
  }else {
21788
- return null
21875
+ return and__3822__auto____$1
21789
21876
  }
21790
- }
21791
- }();
21792
- cljs.reader.parse_timestamp = function parse_timestamp(ts) {
21793
- var temp__3971__auto__ = cljs.reader.parse_and_validate_timestamp.call(null, ts);
21794
- if(cljs.core.truth_(temp__3971__auto__)) {
21795
- var vec__3704 = temp__3971__auto__;
21796
- var years = cljs.core.nth.call(null, vec__3704, 0, null);
21797
- var months = cljs.core.nth.call(null, vec__3704, 1, null);
21798
- var days = cljs.core.nth.call(null, vec__3704, 2, null);
21799
- var hours = cljs.core.nth.call(null, vec__3704, 3, null);
21800
- var minutes = cljs.core.nth.call(null, vec__3704, 4, null);
21801
- var seconds = cljs.core.nth.call(null, vec__3704, 5, null);
21802
- var ms = cljs.core.nth.call(null, vec__3704, 6, null);
21803
- var offset = cljs.core.nth.call(null, vec__3704, 7, null);
21804
- return new Date(Date.UTC(years, months - 1, days, hours, minutes, seconds, ms) - offset * 60 * 1E3)
21805
21877
  }else {
21806
- return cljs.reader.reader_error.call(null, null, [cljs.core.str("Unrecognized date/time syntax: "), cljs.core.str(ts)].join(""))
21878
+ return and__3822__auto__
21807
21879
  }
21808
21880
  };
21809
- cljs.reader.read_date = function read_date(s) {
21810
- if(cljs.core.string_QMARK_.call(null, s)) {
21811
- return cljs.reader.parse_timestamp.call(null, s)
21812
- }else {
21813
- return cljs.reader.reader_error.call(null, null, "Instance literal expects a string for its timestamp.")
21881
+ cljs.reader.read_token = function read_token(rdr, initch) {
21882
+ var sb = new goog.string.StringBuffer(initch);
21883
+ var ch = cljs.reader.read_char.call(null, rdr);
21884
+ while(true) {
21885
+ if(function() {
21886
+ var or__3824__auto__ = ch == null;
21887
+ if(or__3824__auto__) {
21888
+ return or__3824__auto__
21889
+ }else {
21890
+ var or__3824__auto____$1 = cljs.reader.whitespace_QMARK_.call(null, ch);
21891
+ if(or__3824__auto____$1) {
21892
+ return or__3824__auto____$1
21893
+ }else {
21894
+ return cljs.reader.macro_terminating_QMARK_.call(null, ch)
21895
+ }
21896
+ }
21897
+ }()) {
21898
+ cljs.reader.unread.call(null, rdr, ch);
21899
+ return sb.toString()
21900
+ }else {
21901
+ var G__3667 = function() {
21902
+ sb.append(ch);
21903
+ return sb
21904
+ }();
21905
+ var G__3668 = cljs.reader.read_char.call(null, rdr);
21906
+ sb = G__3667;
21907
+ ch = G__3668;
21908
+ continue
21909
+ }
21910
+ break
21814
21911
  }
21815
21912
  };
21816
- cljs.reader.read_queue = function read_queue(elems) {
21817
- if(cljs.core.vector_QMARK_.call(null, elems)) {
21818
- return cljs.core.into.call(null, cljs.core.PersistentQueue.EMPTY, elems)
21819
- }else {
21820
- return cljs.reader.reader_error.call(null, null, "Queue literal expects a vector for its elements.")
21913
+ cljs.reader.skip_line = function skip_line(reader, _) {
21914
+ while(true) {
21915
+ var ch = cljs.reader.read_char.call(null, reader);
21916
+ if(function() {
21917
+ var or__3824__auto__ = ch === "n";
21918
+ if(or__3824__auto__) {
21919
+ return or__3824__auto__
21920
+ }else {
21921
+ var or__3824__auto____$1 = ch === "r";
21922
+ if(or__3824__auto____$1) {
21923
+ return or__3824__auto____$1
21924
+ }else {
21925
+ return ch == null
21926
+ }
21927
+ }
21928
+ }()) {
21929
+ return reader
21930
+ }else {
21931
+ continue
21932
+ }
21933
+ break
21821
21934
  }
21822
21935
  };
21823
- cljs.reader.read_uuid = function read_uuid(uuid) {
21824
- if(cljs.core.string_QMARK_.call(null, uuid)) {
21825
- return new cljs.core.UUID(uuid)
21936
+ cljs.reader.int_pattern = cljs.core.re_pattern.call(null, "([-+]?)(?:(0)|([1-9][0-9]*)|0[xX]([0-9A-Fa-f]+)|0([0-7]+)|([1-9][0-9]?)[rR]([0-9A-Za-z]+)|0[0-9]+)(N)?");
21937
+ cljs.reader.ratio_pattern = cljs.core.re_pattern.call(null, "([-+]?[0-9]+)/([0-9]+)");
21938
+ cljs.reader.float_pattern = cljs.core.re_pattern.call(null, "([-+]?[0-9]+(\\.[0-9]*)?([eE][-+]?[0-9]+)?)(M)?");
21939
+ cljs.reader.symbol_pattern = cljs.core.re_pattern.call(null, "[:]?([^0-9/].*/)?([^0-9/][^/]*)");
21940
+ cljs.reader.re_find_STAR_ = function re_find_STAR_(re, s) {
21941
+ var matches = re.exec(s);
21942
+ if(matches == null) {
21943
+ return null
21826
21944
  }else {
21827
- return cljs.reader.reader_error.call(null, null, "UUID literal expects a string as its representation.")
21945
+ if(matches.length === 1) {
21946
+ return matches[0]
21947
+ }else {
21948
+ return matches
21949
+ }
21828
21950
  }
21829
21951
  };
21830
- cljs.reader._STAR_tag_table_STAR_ = cljs.core.atom.call(null, cljs.core.ObjMap.fromObject(["inst", "uuid", "queue"], {"inst":cljs.reader.read_date, "uuid":cljs.reader.read_uuid, "queue":cljs.reader.read_queue}));
21831
- cljs.reader.maybe_read_tagged_type = function maybe_read_tagged_type(rdr, initch) {
21832
- var tag = cljs.reader.read_symbol.call(null, rdr, initch);
21833
- var temp__3971__auto__ = cljs.core._lookup.call(null, cljs.core.deref.call(null, cljs.reader._STAR_tag_table_STAR_), cljs.core.name.call(null, tag), null);
21834
- if(cljs.core.truth_(temp__3971__auto__)) {
21835
- var pfn = temp__3971__auto__;
21836
- return pfn.call(null, cljs.reader.read.call(null, rdr, true, null, false))
21952
+ cljs.reader.match_int = function match_int(s) {
21953
+ var groups = cljs.reader.re_find_STAR_.call(null, cljs.reader.int_pattern, s);
21954
+ var group3 = groups[2];
21955
+ if(!function() {
21956
+ var or__3824__auto__ = group3 == null;
21957
+ if(or__3824__auto__) {
21958
+ return or__3824__auto__
21959
+ }else {
21960
+ return group3.length < 1
21961
+ }
21962
+ }()) {
21963
+ return 0
21837
21964
  }else {
21838
- return cljs.reader.reader_error.call(null, rdr, "Could not find tag parser for ", cljs.core.name.call(null, tag), " in ", cljs.core.pr_str.call(null, cljs.core.keys.call(null, cljs.core.deref.call(null, cljs.reader._STAR_tag_table_STAR_))))
21965
+ var negate = "-" === groups[1] ? -1 : 1;
21966
+ var a = cljs.core.truth_(groups[3]) ? [groups[3], 10] : cljs.core.truth_(groups[4]) ? [groups[4], 16] : cljs.core.truth_(groups[5]) ? [groups[5], 8] : cljs.core.truth_(groups[7]) ? [groups[7], parseInt(groups[7])] : "\ufdd0'default" ? [null, null] : null;
21967
+ var n = a[0];
21968
+ var radix = a[1];
21969
+ if(n == null) {
21970
+ return null
21971
+ }else {
21972
+ return negate * parseInt(n, radix)
21973
+ }
21839
21974
  }
21840
21975
  };
21841
- cljs.reader.register_tag_parser_BANG_ = function register_tag_parser_BANG_(tag, f) {
21842
- var tag__$1 = cljs.core.name.call(null, tag);
21843
- var old_parser = cljs.core._lookup.call(null, cljs.core.deref.call(null, cljs.reader._STAR_tag_table_STAR_), tag__$1, null);
21844
- cljs.core.swap_BANG_.call(null, cljs.reader._STAR_tag_table_STAR_, cljs.core.assoc, tag__$1, f);
21845
- return old_parser
21976
+ cljs.reader.match_ratio = function match_ratio(s) {
21977
+ var groups = cljs.reader.re_find_STAR_.call(null, cljs.reader.ratio_pattern, s);
21978
+ var numinator = groups[1];
21979
+ var denominator = groups[2];
21980
+ return parseInt(numinator) / parseInt(denominator)
21846
21981
  };
21847
- cljs.reader.deregister_tag_parser_BANG_ = function deregister_tag_parser_BANG_(tag) {
21848
- var tag__$1 = cljs.core.name.call(null, tag);
21849
- var old_parser = cljs.core._lookup.call(null, cljs.core.deref.call(null, cljs.reader._STAR_tag_table_STAR_), tag__$1, null);
21850
- cljs.core.swap_BANG_.call(null, cljs.reader._STAR_tag_table_STAR_, cljs.core.dissoc, tag__$1);
21851
- return old_parser
21982
+ cljs.reader.match_float = function match_float(s) {
21983
+ return parseFloat(s)
21852
21984
  };
21853
- goog.provide("calabash_script.convert");
21854
- goog.require("cljs.core");
21855
- calabash_script.convert.point__GT_map = function point__GT_map(rect) {
21856
- var temp__3971__auto__ = rect.origin;
21857
- if(cljs.core.truth_(temp__3971__auto__)) {
21858
- var point = temp__3971__auto__;
21859
- return cljs.core.ObjMap.fromObject(["\ufdd0'x", "\ufdd0'y"], {"\ufdd0'x":point.x, "\ufdd0'y":point.y})
21985
+ cljs.reader.re_matches_STAR_ = function re_matches_STAR_(re, s) {
21986
+ var matches = re.exec(s);
21987
+ if(function() {
21988
+ var and__3822__auto__ = !(matches == null);
21989
+ if(and__3822__auto__) {
21990
+ return matches[0] === s
21991
+ }else {
21992
+ return and__3822__auto__
21993
+ }
21994
+ }()) {
21995
+ if(matches.length === 1) {
21996
+ return matches[0]
21997
+ }else {
21998
+ return matches
21999
+ }
21860
22000
  }else {
21861
- return cljs.core.ObjMap.EMPTY
22001
+ return null
21862
22002
  }
21863
22003
  };
21864
- calabash_script.convert.size__GT_map = function size__GT_map(rect) {
21865
- var temp__3971__auto__ = rect.size;
21866
- if(cljs.core.truth_(temp__3971__auto__)) {
21867
- var size = temp__3971__auto__;
21868
- return cljs.core.ObjMap.fromObject(["\ufdd0'width", "\ufdd0'height"], {"\ufdd0'width":size.width, "\ufdd0'height":size.height})
22004
+ cljs.reader.match_number = function match_number(s) {
22005
+ if(cljs.core.truth_(cljs.reader.re_matches_STAR_.call(null, cljs.reader.int_pattern, s))) {
22006
+ return cljs.reader.match_int.call(null, s)
21869
22007
  }else {
21870
- return cljs.core.ObjMap.EMPTY
21871
- }
21872
- };
21873
- calabash_script.convert.uia__GT_map = function uia__GT_map(uia_el) {
21874
- var rect = function() {
21875
- var temp__3971__auto__ = uia_el.rect();
21876
- if(cljs.core.truth_(temp__3971__auto__)) {
21877
- var rect = temp__3971__auto__;
21878
- return cljs.core.merge.call(null, calabash_script.convert.point__GT_map.call(null, rect), calabash_script.convert.size__GT_map.call(null, rect))
21879
- }else {
21880
- return cljs.core.ObjMap.EMPTY
21881
- }
21882
- }();
21883
- var hp = function() {
21884
- var temp__3971__auto__ = uia_el.hitpoint();
21885
- if(cljs.core.truth_(temp__3971__auto__)) {
21886
- var point = temp__3971__auto__;
21887
- return cljs.core.ObjMap.fromObject(["\ufdd0'x", "\ufdd0'y"], {"\ufdd0'x":point.x, "\ufdd0'y":point.y})
22008
+ if(cljs.core.truth_(cljs.reader.re_matches_STAR_.call(null, cljs.reader.ratio_pattern, s))) {
22009
+ return cljs.reader.match_ratio.call(null, s)
21888
22010
  }else {
21889
- return cljs.core.ObjMap.EMPTY
22011
+ if(cljs.core.truth_(cljs.reader.re_matches_STAR_.call(null, cljs.reader.float_pattern, s))) {
22012
+ return cljs.reader.match_float.call(null, s)
22013
+ }else {
22014
+ return null
22015
+ }
21890
22016
  }
21891
- }();
21892
- return cljs.core.ObjMap.fromObject(["\ufdd0'el", "\ufdd0'hit-point", "\ufdd0'rect", "\ufdd0'name", "\ufdd0'label"], {"\ufdd0'el":uia_el, "\ufdd0'hit-point":hp, "\ufdd0'rect":rect, "\ufdd0'name":cljs.core.truth_(uia_el.name) ? uia_el.name() : null, "\ufdd0'label":cljs.core.truth_(uia_el.label) ? uia_el.label() : null})
22017
+ }
21893
22018
  };
21894
- goog.provide("calabash_script.log");
21895
- goog.require("cljs.core");
21896
- calabash_script.log.log = function() {
21897
- var log__delegate = function(more) {
21898
- return UIALogger.logMessage(cljs.core.apply.call(null, cljs.core.str, more))
21899
- };
21900
- var log = function(var_args) {
21901
- var more = null;
21902
- if(goog.isDef(var_args)) {
21903
- more = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0)
21904
- }
21905
- return log__delegate.call(this, more)
21906
- };
21907
- log.cljs$lang$maxFixedArity = 0;
21908
- log.cljs$lang$applyTo = function(arglist__2934) {
21909
- var more = cljs.core.seq(arglist__2934);
21910
- return log__delegate(more)
21911
- };
21912
- log.cljs$lang$arity$variadic = log__delegate;
21913
- return log
21914
- }();
21915
- calabash_script.log.logTree = function logTree(el) {
21916
- return el.logElementTree()
22019
+ cljs.reader.escape_char_map = function escape_char_map(c) {
22020
+ if(c === "t") {
22021
+ return"\t"
22022
+ }else {
22023
+ if(c === "r") {
22024
+ return"\r"
22025
+ }else {
22026
+ if(c === "n") {
22027
+ return"\n"
22028
+ }else {
22029
+ if(c === "\\") {
22030
+ return"\\"
22031
+ }else {
22032
+ if(c === '"') {
22033
+ return'"'
22034
+ }else {
22035
+ if(c === "b") {
22036
+ return"\b"
22037
+ }else {
22038
+ if(c === "f") {
22039
+ return"\f"
22040
+ }else {
22041
+ if("\ufdd0'else") {
22042
+ return null
22043
+ }else {
22044
+ return null
22045
+ }
22046
+ }
22047
+ }
22048
+ }
22049
+ }
22050
+ }
22051
+ }
22052
+ }
21917
22053
  };
21918
- goog.provide("calabash_script.query");
21919
- goog.require("cljs.core");
21920
- goog.require("calabash_script.utils");
21921
- goog.require("calabash_script.convert");
21922
- goog.require("calabash_script.uia");
21923
- goog.require("calabash_script.log");
21924
- calabash_script.query.dir_QMARK_ = cljs.core.PersistentHashSet.fromArray(["\ufdd0'parent", "\ufdd0'child", "\ufdd0'descendant"]);
21925
- calabash_script.query.desc = function desc(el, acc) {
21926
- var temp__3971__auto__ = cljs.core.seq.call(null, el);
21927
- if(temp__3971__auto__) {
21928
- var els = temp__3971__auto__;
21929
- var children = cljs.core.mapcat.call(null, function(p1__2935_SHARP_) {
21930
- return desc.call(null, p1__2935_SHARP_, cljs.core.PersistentVector.EMPTY)
21931
- }, els);
21932
- return cljs.core.reduce.call(null, cljs.core.conj, acc, cljs.core.cons.call(null, el, children))
22054
+ cljs.reader.read_2_chars = function read_2_chars(reader) {
22055
+ return(new goog.string.StringBuffer(cljs.reader.read_char.call(null, reader), cljs.reader.read_char.call(null, reader))).toString()
22056
+ };
22057
+ cljs.reader.read_4_chars = function read_4_chars(reader) {
22058
+ return(new goog.string.StringBuffer(cljs.reader.read_char.call(null, reader), cljs.reader.read_char.call(null, reader), cljs.reader.read_char.call(null, reader), cljs.reader.read_char.call(null, reader))).toString()
22059
+ };
22060
+ cljs.reader.unicode_2_pattern = cljs.core.re_pattern.call(null, "[0-9A-Fa-f]{2}");
22061
+ cljs.reader.unicode_4_pattern = cljs.core.re_pattern.call(null, "[0-9A-Fa-f]{4}");
22062
+ cljs.reader.validate_unicode_escape = function validate_unicode_escape(unicode_pattern, reader, escape_char, unicode_str) {
22063
+ if(cljs.core.truth_(cljs.core.re_matches.call(null, unicode_pattern, unicode_str))) {
22064
+ return unicode_str
21933
22065
  }else {
21934
- return cljs.core.conj.call(null, acc, el)
22066
+ return cljs.reader.reader_error.call(null, reader, "Unexpected unicode escape \\", escape_char, unicode_str)
21935
22067
  }
21936
22068
  };
21937
- calabash_script.query.dir_seq = function() {
21938
- var method_table__2556__auto__ = cljs.core.atom.call(null, cljs.core.ObjMap.EMPTY);
21939
- var prefer_table__2557__auto__ = cljs.core.atom.call(null, cljs.core.ObjMap.EMPTY);
21940
- var method_cache__2558__auto__ = cljs.core.atom.call(null, cljs.core.ObjMap.EMPTY);
21941
- var cached_hierarchy__2559__auto__ = cljs.core.atom.call(null, cljs.core.ObjMap.EMPTY);
21942
- var hierarchy__2560__auto__ = cljs.core._lookup.call(null, cljs.core.ObjMap.EMPTY, "\ufdd0'hierarchy", cljs.core.global_hierarchy);
21943
- return new cljs.core.MultiFn("dir-seq", function(dir, _) {
21944
- return dir
21945
- }, "\ufdd0'default", hierarchy__2560__auto__, method_table__2556__auto__, prefer_table__2557__auto__, method_cache__2558__auto__, cached_hierarchy__2559__auto__)
21946
- }();
21947
- cljs.core._add_method.call(null, calabash_script.query.dir_seq, "\ufdd0'parent", function(_, coll) {
21948
- var no_parent_QMARK_ = function(el) {
21949
- var or__3824__auto__ = cljs.core.not.call(null, el.parent);
21950
- if(or__3824__auto__) {
21951
- return or__3824__auto__
22069
+ cljs.reader.make_unicode_char = function make_unicode_char(code_str) {
22070
+ var code = parseInt(code_str, 16);
22071
+ return String.fromCharCode(code)
22072
+ };
22073
+ cljs.reader.escape_char = function escape_char(buffer, reader) {
22074
+ var ch = cljs.reader.read_char.call(null, reader);
22075
+ var mapresult = cljs.reader.escape_char_map.call(null, ch);
22076
+ if(cljs.core.truth_(mapresult)) {
22077
+ return mapresult
22078
+ }else {
22079
+ if(ch === "x") {
22080
+ return cljs.reader.make_unicode_char.call(null, cljs.reader.validate_unicode_escape.call(null, cljs.reader.unicode_2_pattern, reader, ch, cljs.reader.read_2_chars.call(null, reader)))
21952
22081
  }else {
21953
- var or__3824__auto____$1 = el.parent() == null;
21954
- if(or__3824__auto____$1) {
21955
- return or__3824__auto____$1
21956
- }else {
21957
- return cljs.core.instance_QMARK_.call(null, UIAApplication, el.parent())
21958
- }
21959
- }
21960
- };
21961
- var parents = function(el, acc) {
21962
- while(true) {
21963
- if(cljs.core.truth_(no_parent_QMARK_.call(null, el))) {
21964
- return acc
22082
+ if(ch === "u") {
22083
+ return cljs.reader.make_unicode_char.call(null, cljs.reader.validate_unicode_escape.call(null, cljs.reader.unicode_4_pattern, reader, ch, cljs.reader.read_4_chars.call(null, reader)))
21965
22084
  }else {
21966
- var p = el.parent();
21967
- var G__2936 = p;
21968
- var G__2937 = cljs.core.conj.call(null, acc, p);
21969
- el = G__2936;
21970
- acc = G__2937;
21971
- continue
22085
+ if(cljs.reader.numeric_QMARK_.call(null, ch)) {
22086
+ return String.fromCharCode(ch)
22087
+ }else {
22088
+ if("\ufdd0'else") {
22089
+ return cljs.reader.reader_error.call(null, reader, "Unexpected unicode escape \\", ch)
22090
+ }else {
22091
+ return null
22092
+ }
22093
+ }
21972
22094
  }
21973
- break
21974
22095
  }
21975
- };
21976
- return cljs.core.mapcat.call(null, function(x) {
21977
- return parents.call(null, x, cljs.core.PersistentVector.EMPTY)
21978
- }, coll)
21979
- });
21980
- cljs.core._add_method.call(null, calabash_script.query.dir_seq, "\ufdd0'child", function(_, coll) {
21981
- return cljs.core.mapcat.call(null, cljs.core.seq, coll)
21982
- });
21983
- cljs.core._add_method.call(null, calabash_script.query.dir_seq, "\ufdd0'descendant", function(_, coll) {
21984
- return cljs.core.mapcat.call(null, function(p1__2938_SHARP_) {
21985
- return calabash_script.query.desc.call(null, p1__2938_SHARP_, cljs.core.PersistentVector.EMPTY)
21986
- }, coll)
21987
- });
21988
- calabash_script.query.valid_QMARK_ = function valid_QMARK_(el) {
21989
- return!function() {
21990
- var or__3824__auto__ = el == null;
21991
- if(or__3824__auto__) {
21992
- return or__3824__auto__
22096
+ }
22097
+ };
22098
+ cljs.reader.read_past = function read_past(pred, rdr) {
22099
+ var ch = cljs.reader.read_char.call(null, rdr);
22100
+ while(true) {
22101
+ if(cljs.core.truth_(pred.call(null, ch))) {
22102
+ var G__3669 = cljs.reader.read_char.call(null, rdr);
22103
+ ch = G__3669;
22104
+ continue
21993
22105
  }else {
21994
- return cljs.core.instance_QMARK_.call(null, UIAElementNil, el)
22106
+ return ch
21995
22107
  }
21996
- }()
22108
+ break
22109
+ }
21997
22110
  };
21998
- calabash_script.query.filter_by_type = function filter_by_type(type, coll) {
21999
- var uia_class = calabash_script.uia.classes.call(null, type);
22000
- return cljs.core.filter.call(null, function(x) {
22001
- var and__3822__auto__ = calabash_script.query.valid_QMARK_.call(null, x);
22002
- if(cljs.core.truth_(and__3822__auto__)) {
22003
- return cljs.core.instance_QMARK_.call(null, uia_class, x)
22111
+ cljs.reader.read_delimited_list = function read_delimited_list(delim, rdr, recursive_QMARK_) {
22112
+ var a = cljs.core.transient$.call(null, cljs.core.PersistentVector.EMPTY);
22113
+ while(true) {
22114
+ var ch = cljs.reader.read_past.call(null, cljs.reader.whitespace_QMARK_, rdr);
22115
+ if(cljs.core.truth_(ch)) {
22004
22116
  }else {
22005
- return and__3822__auto__
22117
+ cljs.reader.reader_error.call(null, rdr, "EOF while reading")
22006
22118
  }
22007
- }, coll)
22119
+ if(delim === ch) {
22120
+ return cljs.core.persistent_BANG_.call(null, a)
22121
+ }else {
22122
+ var temp__3971__auto__ = cljs.reader.macros.call(null, ch);
22123
+ if(cljs.core.truth_(temp__3971__auto__)) {
22124
+ var macrofn = temp__3971__auto__;
22125
+ var mret = macrofn.call(null, rdr, ch);
22126
+ var G__3670 = mret === rdr ? a : cljs.core.conj_BANG_.call(null, a, mret);
22127
+ a = G__3670;
22128
+ continue
22129
+ }else {
22130
+ cljs.reader.unread.call(null, rdr, ch);
22131
+ var o = cljs.reader.read.call(null, rdr, true, null, recursive_QMARK_);
22132
+ var G__3671 = o === rdr ? a : cljs.core.conj_BANG_.call(null, a, o);
22133
+ a = G__3671;
22134
+ continue
22135
+ }
22136
+ }
22137
+ break
22138
+ }
22008
22139
  };
22009
- calabash_script.query.matches_QMARK_ = function matches_QMARK_(sel, obj, val) {
22010
- if(function() {
22011
- var or__3824__auto__ = cljs.core.keyword_QMARK_.call(null, sel);
22012
- if(or__3824__auto__) {
22013
- return or__3824__auto__
22140
+ cljs.reader.not_implemented = function not_implemented(rdr, ch) {
22141
+ return cljs.reader.reader_error.call(null, rdr, "Reader for ", ch, " not implemented yet")
22142
+ };
22143
+ cljs.reader.read_dispatch = function read_dispatch(rdr, _) {
22144
+ var ch = cljs.reader.read_char.call(null, rdr);
22145
+ var dm = cljs.reader.dispatch_macros.call(null, ch);
22146
+ if(cljs.core.truth_(dm)) {
22147
+ return dm.call(null, rdr, _)
22148
+ }else {
22149
+ var temp__3971__auto__ = cljs.reader.maybe_read_tagged_type.call(null, rdr, ch);
22150
+ if(cljs.core.truth_(temp__3971__auto__)) {
22151
+ var obj = temp__3971__auto__;
22152
+ return obj
22014
22153
  }else {
22015
- return cljs.core.string_QMARK_.call(null, sel)
22154
+ return cljs.reader.reader_error.call(null, rdr, "No dispatch macro for ", ch)
22016
22155
  }
22017
- }()) {
22018
- var kw_sel = cljs.core.keyword.call(null, sel);
22019
- if(cljs.core._EQ_.call(null, "\ufdd0'marked", kw_sel)) {
22020
- var or__3824__auto__ = cljs.core._EQ_.call(null, obj.name(), val);
22156
+ }
22157
+ };
22158
+ cljs.reader.read_unmatched_delimiter = function read_unmatched_delimiter(rdr, ch) {
22159
+ return cljs.reader.reader_error.call(null, rdr, "Unmached delimiter ", ch)
22160
+ };
22161
+ cljs.reader.read_list = function read_list(rdr, _) {
22162
+ return cljs.core.apply.call(null, cljs.core.list, cljs.reader.read_delimited_list.call(null, ")", rdr, true))
22163
+ };
22164
+ cljs.reader.read_comment = cljs.reader.skip_line;
22165
+ cljs.reader.read_vector = function read_vector(rdr, _) {
22166
+ return cljs.reader.read_delimited_list.call(null, "]", rdr, true)
22167
+ };
22168
+ cljs.reader.read_map = function read_map(rdr, _) {
22169
+ var l = cljs.reader.read_delimited_list.call(null, "}", rdr, true);
22170
+ if(cljs.core.odd_QMARK_.call(null, cljs.core.count.call(null, l))) {
22171
+ cljs.reader.reader_error.call(null, rdr, "Map literal must contain an even number of forms")
22172
+ }else {
22173
+ }
22174
+ return cljs.core.apply.call(null, cljs.core.hash_map, l)
22175
+ };
22176
+ cljs.reader.read_number = function read_number(reader, initch) {
22177
+ var buffer = new goog.string.StringBuffer(initch);
22178
+ var ch = cljs.reader.read_char.call(null, reader);
22179
+ while(true) {
22180
+ if(cljs.core.truth_(function() {
22181
+ var or__3824__auto__ = ch == null;
22021
22182
  if(or__3824__auto__) {
22022
22183
  return or__3824__auto__
22023
22184
  }else {
22024
- var or__3824__auto____$1 = cljs.core._EQ_.call(null, obj.label(), val);
22185
+ var or__3824__auto____$1 = cljs.reader.whitespace_QMARK_.call(null, ch);
22025
22186
  if(or__3824__auto____$1) {
22026
22187
  return or__3824__auto____$1
22027
22188
  }else {
22028
- var and__3822__auto__ = obj.value;
22029
- if(cljs.core.truth_(and__3822__auto__)) {
22030
- return cljs.core._EQ_.call(null, obj.value(), val)
22189
+ return cljs.reader.macros.call(null, ch)
22190
+ }
22191
+ }
22192
+ }())) {
22193
+ cljs.reader.unread.call(null, reader, ch);
22194
+ var s = buffer.toString();
22195
+ var or__3824__auto__ = cljs.reader.match_number.call(null, s);
22196
+ if(cljs.core.truth_(or__3824__auto__)) {
22197
+ return or__3824__auto__
22198
+ }else {
22199
+ return cljs.reader.reader_error.call(null, reader, "Invalid number format [", s, "]")
22200
+ }
22201
+ }else {
22202
+ var G__3672 = function() {
22203
+ buffer.append(ch);
22204
+ return buffer
22205
+ }();
22206
+ var G__3673 = cljs.reader.read_char.call(null, reader);
22207
+ buffer = G__3672;
22208
+ ch = G__3673;
22209
+ continue
22210
+ }
22211
+ break
22212
+ }
22213
+ };
22214
+ cljs.reader.read_string_STAR_ = function read_string_STAR_(reader, _) {
22215
+ var buffer = new goog.string.StringBuffer;
22216
+ var ch = cljs.reader.read_char.call(null, reader);
22217
+ while(true) {
22218
+ if(ch == null) {
22219
+ return cljs.reader.reader_error.call(null, reader, "EOF while reading")
22220
+ }else {
22221
+ if("\\" === ch) {
22222
+ var G__3674 = function() {
22223
+ buffer.append(cljs.reader.escape_char.call(null, buffer, reader));
22224
+ return buffer
22225
+ }();
22226
+ var G__3675 = cljs.reader.read_char.call(null, reader);
22227
+ buffer = G__3674;
22228
+ ch = G__3675;
22229
+ continue
22230
+ }else {
22231
+ if('"' === ch) {
22232
+ return buffer.toString()
22233
+ }else {
22234
+ if("\ufdd0'default") {
22235
+ var G__3676 = function() {
22236
+ buffer.append(ch);
22237
+ return buffer
22238
+ }();
22239
+ var G__3677 = cljs.reader.read_char.call(null, reader);
22240
+ buffer = G__3676;
22241
+ ch = G__3677;
22242
+ continue
22031
22243
  }else {
22032
- return and__3822__auto__
22244
+ return null
22033
22245
  }
22034
22246
  }
22035
22247
  }
22036
- }else {
22037
- var res = obj.withValueForKey(val, cljs.core.name.call(null, kw_sel));
22038
- return calabash_script.query.valid_QMARK_.call(null, res)
22039
22248
  }
22249
+ break
22250
+ }
22251
+ };
22252
+ cljs.reader.special_symbols = function special_symbols(t, not_found) {
22253
+ if(t === "nil") {
22254
+ return null
22040
22255
  }else {
22041
- if(cljs.core.vector_QMARK_.call(null, sel)) {
22042
- var G__2940 = cljs.core.count.call(null, sel);
22043
- if(cljs.core._EQ_.call(null, 2, G__2940)) {
22044
- var key = cljs.core.name.call(null, cljs.core.first.call(null, sel));
22045
- var rel = cljs.core.name.call(null, cljs.core.second.call(null, sel));
22046
- return calabash_script.query.valid_QMARK_.call(null, obj.withPredicate([cljs.core.str(key), cljs.core.str(" "), cljs.core.str(rel), cljs.core.str(" "), cljs.core.str(val)].join("")))
22256
+ if(t === "true") {
22257
+ return true
22258
+ }else {
22259
+ if(t === "false") {
22260
+ return false
22047
22261
  }else {
22048
22262
  if("\ufdd0'else") {
22049
- return null
22263
+ return not_found
22050
22264
  }else {
22051
22265
  return null
22052
22266
  }
22053
22267
  }
22054
- }else {
22055
- return null
22056
22268
  }
22057
22269
  }
22058
22270
  };
22059
- calabash_script.query.query_map = function query_map(q, coll, dir) {
22060
- var filter_fn = function(x) {
22061
- return cljs.core.every_QMARK_.call(null, cljs.core.true_QMARK_, cljs.core.map.call(null, function(p__2943) {
22062
- var vec__2944 = p__2943;
22063
- var sel = cljs.core.nth.call(null, vec__2944, 0, null);
22064
- var val = cljs.core.nth.call(null, vec__2944, 1, null);
22065
- return calabash_script.query.matches_QMARK_.call(null, sel, x, val)
22066
- }, q))
22067
- };
22068
- return cljs.core.filter.call(null, filter_fn, coll)
22271
+ cljs.reader.read_symbol = function read_symbol(reader, initch) {
22272
+ var token = cljs.reader.read_token.call(null, reader, initch);
22273
+ if(cljs.core.truth_(goog.string.contains(token, "/"))) {
22274
+ return cljs.core.symbol.call(null, cljs.core.subs.call(null, token, 0, token.indexOf("/")), cljs.core.subs.call(null, token, token.indexOf("/") + 1, token.length))
22275
+ }else {
22276
+ return cljs.reader.special_symbols.call(null, token, cljs.core.symbol.call(null, token))
22277
+ }
22069
22278
  };
22070
- calabash_script.query.IQuery = {};
22071
- calabash_script.query._query = function _query(q, coll, dir) {
22072
- if(function() {
22073
- var and__3822__auto__ = q;
22074
- if(and__3822__auto__) {
22075
- return q.calabash_script$query$IQuery$_query$arity$3
22279
+ cljs.reader.read_keyword = function read_keyword(reader, initch) {
22280
+ var token = cljs.reader.read_token.call(null, reader, cljs.reader.read_char.call(null, reader));
22281
+ var a = cljs.reader.re_matches_STAR_.call(null, cljs.reader.symbol_pattern, token);
22282
+ var token__$1 = a[0];
22283
+ var ns = a[1];
22284
+ var name = a[2];
22285
+ if(cljs.core.truth_(function() {
22286
+ var or__3824__auto__ = function() {
22287
+ var and__3822__auto__ = !(void 0 === ns);
22288
+ if(and__3822__auto__) {
22289
+ return ns.substring(ns.length - 2, ns.length) === ":/"
22290
+ }else {
22291
+ return and__3822__auto__
22292
+ }
22293
+ }();
22294
+ if(cljs.core.truth_(or__3824__auto__)) {
22295
+ return or__3824__auto__
22076
22296
  }else {
22077
- return and__3822__auto__
22297
+ var or__3824__auto____$1 = name[name.length - 1] === ":";
22298
+ if(or__3824__auto____$1) {
22299
+ return or__3824__auto____$1
22300
+ }else {
22301
+ return!(token__$1.indexOf("::", 1) === -1)
22302
+ }
22078
22303
  }
22079
- }()) {
22080
- return q.calabash_script$query$IQuery$_query$arity$3(q, coll, dir)
22304
+ }())) {
22305
+ return cljs.reader.reader_error.call(null, reader, "Invalid token: ", token__$1)
22081
22306
  }else {
22082
- var x__2384__auto__ = q == null ? null : q;
22083
- return function() {
22084
- var or__3824__auto__ = calabash_script.query._query[goog.typeOf(x__2384__auto__)];
22085
- if(or__3824__auto__) {
22086
- return or__3824__auto__
22307
+ if(function() {
22308
+ var and__3822__auto__ = !(ns == null);
22309
+ if(and__3822__auto__) {
22310
+ return ns.length > 0
22087
22311
  }else {
22088
- var or__3824__auto____$1 = calabash_script.query._query["_"];
22089
- if(or__3824__auto____$1) {
22090
- return or__3824__auto____$1
22091
- }else {
22092
- throw cljs.core.missing_protocol.call(null, "IQuery.-query", q);
22093
- }
22312
+ return and__3822__auto__
22094
22313
  }
22095
- }().call(null, q, coll, dir)
22096
- }
22097
- };
22098
- cljs.core.PersistentHashMap.prototype.calabash_script$query$IQuery$ = true;
22099
- cljs.core.PersistentHashMap.prototype.calabash_script$query$IQuery$_query$arity$3 = function(q, coll, dir) {
22100
- return calabash_script.query.query_map.call(null, q, coll, dir)
22101
- };
22102
- cljs.core.PersistentArrayMap.prototype.calabash_script$query$IQuery$ = true;
22103
- cljs.core.PersistentArrayMap.prototype.calabash_script$query$IQuery$_query$arity$3 = function(q, coll, dir) {
22104
- return calabash_script.query.query_map.call(null, q, coll, dir)
22105
- };
22106
- cljs.core.ObjMap.prototype.calabash_script$query$IQuery$ = true;
22107
- cljs.core.ObjMap.prototype.calabash_script$query$IQuery$_query$arity$3 = function(q, coll, dir) {
22108
- return calabash_script.query.query_map.call(null, q, coll, dir)
22109
- };
22110
- cljs.core.PersistentVector.prototype.calabash_script$query$IQuery$ = true;
22111
- cljs.core.PersistentVector.prototype.calabash_script$query$IQuery$_query$arity$3 = function(q, coll, dir) {
22112
- return cljs.core.first.call(null, cljs.core.reduce.call(null, function(p__2945, next) {
22113
- var vec__2946 = p__2945;
22114
- var coll__$1 = cljs.core.nth.call(null, vec__2946, 0, null);
22115
- var dir__$1 = cljs.core.nth.call(null, vec__2946, 1, null);
22116
- if(cljs.core.truth_(calabash_script.query.dir_QMARK_.call(null, next))) {
22117
- return cljs.core.PersistentVector.fromArray([coll__$1, next], true)
22314
+ }()) {
22315
+ return cljs.core.keyword.call(null, ns.substring(0, ns.indexOf("/")), name)
22118
22316
  }else {
22119
- return cljs.core.PersistentVector.fromArray([calabash_script.query._query.call(null, next, coll__$1, dir__$1), dir__$1], true)
22317
+ return cljs.core.keyword.call(null, token__$1)
22120
22318
  }
22121
- }, cljs.core.PersistentVector.fromArray([coll, dir], true), q))
22122
- };
22123
- String.prototype.calabash_script$query$IQuery$ = true;
22124
- String.prototype.calabash_script$query$IQuery$_query$arity$3 = function(kw, coll, dir) {
22125
- return calabash_script.query.filter_by_type.call(null, cljs.core.keyword.call(null, kw), calabash_script.query.dir_seq.call(null, dir, coll))
22126
- };
22127
- cljs.core.Keyword.prototype.calabash_script$query$IQuery$ = true;
22128
- cljs.core.Keyword.prototype.calabash_script$query$IQuery$_query$arity$3 = function(kw, coll, dir) {
22129
- return calabash_script.query.filter_by_type.call(null, kw, calabash_script.query.dir_seq.call(null, dir, coll))
22319
+ }
22130
22320
  };
22131
- goog.provide("calabash_script.tests");
22132
- goog.require("cljs.core");
22133
- goog.require("calabash_script.utils");
22134
- goog.require("calabash_script.log");
22135
- calabash_script.tests.fail = function() {
22136
- var fail__delegate = function(reason, kwargs) {
22137
- var map__2948 = cljs.core.apply.call(null, cljs.core.hash_map, kwargs);
22138
- var map__2948__$1 = cljs.core.seq_QMARK_.call(null, map__2948) ? cljs.core.apply.call(null, cljs.core.hash_map, map__2948) : map__2948;
22139
- var screenshot = cljs.core._lookup.call(null, map__2948__$1, "\ufdd0'screenshot", "screenshot");
22140
- if(cljs.core.truth_(screenshot)) {
22141
- calabash_script.utils.screenshot.call(null, screenshot)
22142
- }else {
22143
- }
22144
- throw new Error(reason);
22145
- };
22146
- var fail = function(reason, var_args) {
22147
- var kwargs = null;
22148
- if(goog.isDef(var_args)) {
22149
- kwargs = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0)
22150
- }
22151
- return fail__delegate.call(this, reason, kwargs)
22152
- };
22153
- fail.cljs$lang$maxFixedArity = 1;
22154
- fail.cljs$lang$applyTo = function(arglist__2949) {
22155
- var reason = cljs.core.first(arglist__2949);
22156
- var kwargs = cljs.core.rest(arglist__2949);
22157
- return fail__delegate(reason, kwargs)
22158
- };
22159
- fail.cljs$lang$arity$variadic = fail__delegate;
22160
- return fail
22161
- }();
22162
- calabash_script.tests.fail_if = function() {
22163
- var fail_if__delegate = function(condition, kwargs) {
22164
- var map__2951 = cljs.core.apply.call(null, cljs.core.hash_map, kwargs);
22165
- var map__2951__$1 = cljs.core.seq_QMARK_.call(null, map__2951) ? cljs.core.apply.call(null, cljs.core.hash_map, map__2951) : map__2951;
22166
- var screenshot = cljs.core._lookup.call(null, map__2951__$1, "\ufdd0'screenshot", "screenshot");
22167
- var message = cljs.core._lookup.call(null, map__2951__$1, "\ufdd0'message", "Failed");
22168
- if(cljs.core.truth_(condition)) {
22169
- return calabash_script.tests.fail.call(null, message, screenshot)
22321
+ cljs.reader.desugar_meta = function desugar_meta(f) {
22322
+ if(cljs.core.symbol_QMARK_.call(null, f)) {
22323
+ return cljs.core.ObjMap.fromObject(["\ufdd0'tag"], {"\ufdd0'tag":f})
22324
+ }else {
22325
+ if(cljs.core.string_QMARK_.call(null, f)) {
22326
+ return cljs.core.ObjMap.fromObject(["\ufdd0'tag"], {"\ufdd0'tag":f})
22170
22327
  }else {
22171
- return null
22172
- }
22173
- };
22174
- var fail_if = function(condition, var_args) {
22175
- var kwargs = null;
22176
- if(goog.isDef(var_args)) {
22177
- kwargs = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0)
22178
- }
22179
- return fail_if__delegate.call(this, condition, kwargs)
22180
- };
22181
- fail_if.cljs$lang$maxFixedArity = 1;
22182
- fail_if.cljs$lang$applyTo = function(arglist__2952) {
22183
- var condition = cljs.core.first(arglist__2952);
22184
- var kwargs = cljs.core.rest(arglist__2952);
22185
- return fail_if__delegate(condition, kwargs)
22186
- };
22187
- fail_if.cljs$lang$arity$variadic = fail_if__delegate;
22188
- return fail_if
22189
- }();
22190
- calabash_script.tests.fail_if_not = function() {
22191
- var fail_if_not__delegate = function(x, kwargs) {
22192
- return cljs.core.apply.call(null, calabash_script.tests.fail_if, cljs.core.not.call(null, x), kwargs)
22193
- };
22194
- var fail_if_not = function(x, var_args) {
22195
- var kwargs = null;
22196
- if(goog.isDef(var_args)) {
22197
- kwargs = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0)
22198
- }
22199
- return fail_if_not__delegate.call(this, x, kwargs)
22200
- };
22201
- fail_if_not.cljs$lang$maxFixedArity = 1;
22202
- fail_if_not.cljs$lang$applyTo = function(arglist__2953) {
22203
- var x = cljs.core.first(arglist__2953);
22204
- var kwargs = cljs.core.rest(arglist__2953);
22205
- return fail_if_not__delegate(x, kwargs)
22206
- };
22207
- fail_if_not.cljs$lang$arity$variadic = fail_if_not__delegate;
22208
- return fail_if_not
22209
- }();
22210
- calabash_script.tests._STAR_uia_tests_STAR_ = cljs.core.atom.call(null, cljs.core.ObjMap.EMPTY);
22211
- calabash_script.tests.define_uia_test = function define_uia_test(doc, test) {
22212
- return cljs.core.swap_BANG_.call(null, calabash_script.tests._STAR_uia_tests_STAR_, cljs.core.assoc, doc, test)
22213
- };
22214
- calabash_script.tests.run_all_BANG_ = function run_all_BANG_() {
22215
- calabash_script.log.log.call(null, "Running tests: ", cljs.core.keys.call(null, cljs.core.deref.call(null, calabash_script.tests._STAR_uia_tests_STAR_)));
22216
- var G__2957_2960 = cljs.core.seq.call(null, cljs.core.deref.call(null, calabash_script.tests._STAR_uia_tests_STAR_));
22217
- while(true) {
22218
- if(G__2957_2960) {
22219
- var vec__2958_2961 = cljs.core.first.call(null, G__2957_2960);
22220
- var name_2962 = cljs.core.nth.call(null, vec__2958_2961, 0, null);
22221
- var test_2963 = cljs.core.nth.call(null, vec__2958_2961, 1, null);
22222
- UIALogger.logStart(name_2962);
22223
- try {
22224
- test_2963.call(null);
22225
- cljs.core.swap_BANG_.call(null, calabash_script.tests._STAR_uia_tests_STAR_, cljs.core.assoc, name_2962, cljs.core.ObjMap.fromObject(["\ufdd0'result"], {"\ufdd0'result":"\ufdd0'pass"}));
22226
- UIALogger.logPass(name_2962)
22227
- }catch(e2959) {
22228
- if(cljs.core.instance_QMARK_.call(null, Object, e2959)) {
22229
- var e_2964 = e2959;
22230
- cljs.core.swap_BANG_.call(null, calabash_script.tests._STAR_uia_tests_STAR_, cljs.core.assoc, name_2962, cljs.core.ObjMap.fromObject(["\ufdd0'result", "\ufdd0'message"], {"\ufdd0'result":"\ufdd0'fail", "\ufdd0'message":[cljs.core.str(e_2964)].join("")}));
22231
- UIALogger.logFail(name_2962)
22328
+ if(cljs.core.keyword_QMARK_.call(null, f)) {
22329
+ return cljs.core.PersistentArrayMap.fromArrays([f], [true])
22330
+ }else {
22331
+ if("\ufdd0'else") {
22332
+ return f
22232
22333
  }else {
22233
- if("\ufdd0'else") {
22234
- throw e2959;
22235
- }else {
22236
- }
22334
+ return null
22237
22335
  }
22238
22336
  }
22239
- var G__2965 = cljs.core.next.call(null, G__2957_2960);
22240
- G__2957_2960 = G__2965;
22241
- continue
22242
- }else {
22243
22337
  }
22244
- break
22245
22338
  }
22246
- return calabash_script.log.log.call(null, cljs.core.deref.call(null, calabash_script.tests._STAR_uia_tests_STAR_))
22247
- };
22248
- goog.provide("calabash_script.core");
22249
- goog.require("cljs.core");
22250
- goog.require("calabash_script.query");
22251
- goog.require("calabash_script.tests");
22252
- goog.require("calabash_script.utils");
22253
- goog.require("calabash_script.convert");
22254
- goog.require("calabash_script.uia");
22255
- goog.require("calabash_script.log");
22256
- goog.require("calabash_script.tests");
22257
- goog.require("calabash_script.query");
22258
- calabash_script.utils.target.call(null).setTimeout(0);
22259
- cljs.core._STAR_print_fn_STAR_ = function() {
22260
- var G__3465__delegate = function(args) {
22261
- return calabash_script.log.log.call(null, cljs.core.apply.call(null, cljs.core.str, args))
22262
- };
22263
- var G__3465 = function(var_args) {
22264
- var args = null;
22265
- if(goog.isDef(var_args)) {
22266
- args = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0)
22267
- }
22268
- return G__3465__delegate.call(this, args)
22269
- };
22270
- G__3465.cljs$lang$maxFixedArity = 0;
22271
- G__3465.cljs$lang$applyTo = function(arglist__3466) {
22272
- var args = cljs.core.seq(arglist__3466);
22273
- return G__3465__delegate(args)
22274
- };
22275
- G__3465.cljs$lang$arity$variadic = G__3465__delegate;
22276
- return G__3465
22277
- }();
22278
- UIAElement.prototype.cljs$core$ISeqable$ = true;
22279
- UIAElement.prototype.cljs$core$ISeqable$_seq$arity$1 = function(this$) {
22280
- return cljs.core.seq.call(null, this$.elements().toArray())
22281
- };
22282
- UIAKey.prototype.cljs$core$ISeqable$ = true;
22283
- UIAKey.prototype.cljs$core$ISeqable$_seq$arity$1 = function(this$) {
22284
- return null
22285
22339
  };
22286
- calabash_script.core.sleep = function sleep(x) {
22287
- return calabash_script.utils.target.call(null).delay(x)
22340
+ cljs.reader.wrapping_reader = function wrapping_reader(sym) {
22341
+ return function(rdr, _) {
22342
+ return cljs.core.list.call(null, sym, cljs.reader.read.call(null, rdr, true, null, true))
22343
+ }
22288
22344
  };
22289
- calabash_script.core.duration_exceeds_QMARK_ = function duration_exceeds_QMARK_(start, max) {
22290
- var end = new Date;
22291
- var dur_sec = (end - start) / 1E3;
22292
- return dur_sec >= max
22345
+ cljs.reader.throwing_reader = function throwing_reader(msg) {
22346
+ return function(rdr, _) {
22347
+ return cljs.reader.reader_error.call(null, rdr, msg)
22348
+ }
22293
22349
  };
22294
- calabash_script.core.wait_for = function wait_for(p__3467, pred) {
22295
- var map__3469 = p__3467;
22296
- var map__3469__$1 = cljs.core.seq_QMARK_.call(null, map__3469) ? cljs.core.apply.call(null, cljs.core.hash_map, map__3469) : map__3469;
22297
- var options = map__3469__$1;
22298
- var screenshot = cljs.core._lookup.call(null, map__3469__$1, "\ufdd0'screenshot", true);
22299
- var message = cljs.core._lookup.call(null, map__3469__$1, "\ufdd0'message", "Timed out waiting...");
22300
- var post_timeout = cljs.core._lookup.call(null, map__3469__$1, "\ufdd0'post-timeout", 0);
22301
- var retry_frequency = cljs.core._lookup.call(null, map__3469__$1, "\ufdd0'retry-frequency", 0.2);
22302
- var timeout = cljs.core._lookup.call(null, map__3469__$1, "\ufdd0'timeout", 30);
22303
- var start = new Date;
22304
- var actions = cljs.core.repeatedly.call(null, function() {
22305
- var res = pred.call(null);
22306
- if(cljs.core.truth_(res)) {
22307
- }else {
22308
- calabash_script.core.sleep.call(null, retry_frequency)
22309
- }
22310
- return res
22311
- });
22312
- var results = cljs.core.filter.call(null, function(res) {
22313
- if(cljs.core.truth_(calabash_script.core.duration_exceeds_QMARK_.call(null, start, timeout))) {
22314
- calabash_script.tests.fail.call(null, message, function() {
22315
- var and__3822__auto__ = screenshot;
22316
- if(cljs.core.truth_(and__3822__auto__)) {
22317
- return"timeout"
22318
- }else {
22319
- return and__3822__auto__
22320
- }
22321
- }())
22322
- }else {
22323
- }
22324
- return res
22325
- }, actions);
22326
- var result = cljs.core.first.call(null, results);
22327
- if(post_timeout > 0) {
22328
- calabash_script.core.sleep.call(null, post_timeout)
22350
+ cljs.reader.read_meta = function read_meta(rdr, _) {
22351
+ var m = cljs.reader.desugar_meta.call(null, cljs.reader.read.call(null, rdr, true, null, true));
22352
+ if(cljs.core.map_QMARK_.call(null, m)) {
22329
22353
  }else {
22354
+ cljs.reader.reader_error.call(null, rdr, "Metadata must be Symbol,Keyword,String or Map")
22330
22355
  }
22331
- return result
22332
- };
22333
- calabash_script.core.query = function() {
22334
- var query = null;
22335
- var query__1 = function(q) {
22336
- return query.call(null, q, cljs.core.list.call(null, calabash_script.utils.window.call(null)))
22337
- };
22338
- var query__2 = function(q, coll) {
22339
- return query.call(null, q, coll, "\ufdd0'descendant")
22340
- };
22341
- var query__3 = function(q, coll, dir) {
22342
- return cljs.core.map.call(null, calabash_script.convert.uia__GT_map, calabash_script.query._query.call(null, q, coll, dir))
22343
- };
22344
- query = function(q, coll, dir) {
22345
- switch(arguments.length) {
22346
- case 1:
22347
- return query__1.call(this, q);
22348
- case 2:
22349
- return query__2.call(this, q, coll);
22350
- case 3:
22351
- return query__3.call(this, q, coll, dir)
22352
- }
22353
- throw new Error("Invalid arity: " + arguments.length);
22354
- };
22355
- query.cljs$lang$arity$1 = query__1;
22356
- query.cljs$lang$arity$2 = query__2;
22357
- query.cljs$lang$arity$3 = query__3;
22358
- return query
22359
- }();
22360
- calabash_script.core.query_el = function() {
22361
- var query_el__delegate = function(args) {
22362
- return cljs.core.map.call(null, "\ufdd0'el", cljs.core.apply.call(null, calabash_script.core.query, args))
22363
- };
22364
- var query_el = function(var_args) {
22365
- var args = null;
22366
- if(goog.isDef(var_args)) {
22367
- args = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0)
22368
- }
22369
- return query_el__delegate.call(this, args)
22370
- };
22371
- query_el.cljs$lang$maxFixedArity = 0;
22372
- query_el.cljs$lang$applyTo = function(arglist__3470) {
22373
- var args = cljs.core.seq(arglist__3470);
22374
- return query_el__delegate(args)
22375
- };
22376
- query_el.cljs$lang$arity$variadic = query_el__delegate;
22377
- return query_el
22378
- }();
22379
- calabash_script.core.log_query = function() {
22380
- var log_query__delegate = function(args) {
22381
- return calabash_script.log.log.call(null, cljs.core.apply.call(null, calabash_script.core.query, args))
22382
- };
22383
- var log_query = function(var_args) {
22384
- var args = null;
22385
- if(goog.isDef(var_args)) {
22386
- args = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0)
22387
- }
22388
- return log_query__delegate.call(this, args)
22389
- };
22390
- log_query.cljs$lang$maxFixedArity = 0;
22391
- log_query.cljs$lang$applyTo = function(arglist__3471) {
22392
- var args = cljs.core.seq(arglist__3471);
22393
- return log_query__delegate(args)
22394
- };
22395
- log_query.cljs$lang$arity$variadic = log_query__delegate;
22396
- return log_query
22397
- }();
22398
- calabash_script.core.perform_on = function() {
22399
- var perform_on__delegate = function(action, args) {
22400
- var temp__3971__auto__ = cljs.core.seq.call(null, cljs.core.apply.call(null, calabash_script.core.query_el, args));
22401
- if(temp__3971__auto__) {
22402
- var res = temp__3971__auto__;
22403
- return action.call(null, res)
22404
- }else {
22405
- return calabash_script.tests.fail.call(null, cljs.core.apply.call(null, cljs.core.str, "No results for query ", args))
22406
- }
22407
- };
22408
- var perform_on = function(action, var_args) {
22409
- var args = null;
22410
- if(goog.isDef(var_args)) {
22411
- args = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0)
22412
- }
22413
- return perform_on__delegate.call(this, action, args)
22414
- };
22415
- perform_on.cljs$lang$maxFixedArity = 1;
22416
- perform_on.cljs$lang$applyTo = function(arglist__3472) {
22417
- var action = cljs.core.first(arglist__3472);
22418
- var args = cljs.core.rest(arglist__3472);
22419
- return perform_on__delegate(action, args)
22420
- };
22421
- perform_on.cljs$lang$arity$variadic = perform_on__delegate;
22422
- return perform_on
22423
- }();
22424
- calabash_script.core.perform_on_first = function() {
22425
- var perform_on_first__delegate = function(action, args) {
22426
- return cljs.core.apply.call(null, calabash_script.core.perform_on, function(els) {
22427
- return action.call(null, cljs.core.first.call(null, els))
22428
- }, args)
22429
- };
22430
- var perform_on_first = function(action, var_args) {
22431
- var args = null;
22432
- if(goog.isDef(var_args)) {
22433
- args = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0)
22434
- }
22435
- return perform_on_first__delegate.call(this, action, args)
22436
- };
22437
- perform_on_first.cljs$lang$maxFixedArity = 1;
22438
- perform_on_first.cljs$lang$applyTo = function(arglist__3474) {
22439
- var action = cljs.core.first(arglist__3474);
22440
- var args = cljs.core.rest(arglist__3474);
22441
- return perform_on_first__delegate(action, args)
22442
- };
22443
- perform_on_first.cljs$lang$arity$variadic = perform_on_first__delegate;
22444
- return perform_on_first
22445
- }();
22446
- calabash_script.core.tap = function() {
22447
- var tap__delegate = function(args) {
22448
- return cljs.core.apply.call(null, calabash_script.core.perform_on_first, function(p1__3473_SHARP_) {
22449
- return p1__3473_SHARP_.tap()
22450
- }, args)
22451
- };
22452
- var tap = function(var_args) {
22453
- var args = null;
22454
- if(goog.isDef(var_args)) {
22455
- args = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0)
22456
- }
22457
- return tap__delegate.call(this, args)
22458
- };
22459
- tap.cljs$lang$maxFixedArity = 0;
22460
- tap.cljs$lang$applyTo = function(arglist__3476) {
22461
- var args = cljs.core.seq(arglist__3476);
22462
- return tap__delegate(args)
22463
- };
22464
- tap.cljs$lang$arity$variadic = tap__delegate;
22465
- return tap
22466
- }();
22467
- calabash_script.core.double_tap = function() {
22468
- var double_tap__delegate = function(args) {
22469
- return cljs.core.apply.call(null, calabash_script.core.perform_on_first, function(p1__3475_SHARP_) {
22470
- return p1__3475_SHARP_.doubleTap()
22471
- }, args)
22472
- };
22473
- var double_tap = function(var_args) {
22474
- var args = null;
22475
- if(goog.isDef(var_args)) {
22476
- args = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0)
22477
- }
22478
- return double_tap__delegate.call(this, args)
22479
- };
22480
- double_tap.cljs$lang$maxFixedArity = 0;
22481
- double_tap.cljs$lang$applyTo = function(arglist__3478) {
22482
- var args = cljs.core.seq(arglist__3478);
22483
- return double_tap__delegate(args)
22484
- };
22485
- double_tap.cljs$lang$arity$variadic = double_tap__delegate;
22486
- return double_tap
22487
- }();
22488
- calabash_script.core.two_finger_tap = function() {
22489
- var two_finger_tap__delegate = function(args) {
22490
- return cljs.core.apply.call(null, calabash_script.core.perform_on_first, function(p1__3477_SHARP_) {
22491
- return p1__3477_SHARP_.twoFingerTap()
22492
- }, args)
22493
- };
22494
- var two_finger_tap = function(var_args) {
22495
- var args = null;
22496
- if(goog.isDef(var_args)) {
22497
- args = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0)
22498
- }
22499
- return two_finger_tap__delegate.call(this, args)
22500
- };
22501
- two_finger_tap.cljs$lang$maxFixedArity = 0;
22502
- two_finger_tap.cljs$lang$applyTo = function(arglist__3479) {
22503
- var args = cljs.core.seq(arglist__3479);
22504
- return two_finger_tap__delegate(args)
22505
- };
22506
- two_finger_tap.cljs$lang$arity$variadic = two_finger_tap__delegate;
22507
- return two_finger_tap
22508
- }();
22509
- calabash_script.core.pan = function() {
22510
- var pan__delegate = function(src_query, tgt_query, kwargs) {
22511
- var map__3482 = kwargs;
22512
- var map__3482__$1 = cljs.core.seq_QMARK_.call(null, map__3482) ? cljs.core.apply.call(null, cljs.core.hash_map, map__3482) : map__3482;
22513
- var duration = cljs.core._lookup.call(null, map__3482__$1, "\ufdd0'duration", 1);
22514
- var src = cljs.core.first.call(null, cljs.core.seq.call(null, calabash_script.core.query.call(null, src_query)));
22515
- var tgt = cljs.core.first.call(null, cljs.core.seq.call(null, calabash_script.core.query.call(null, tgt_query)));
22516
- calabash_script.tests.fail_if_not.call(null, function() {
22517
- var and__3822__auto__ = src;
22518
- if(cljs.core.truth_(and__3822__auto__)) {
22519
- return tgt
22356
+ var o = cljs.reader.read.call(null, rdr, true, null, true);
22357
+ if(function() {
22358
+ var G__3679 = o;
22359
+ if(G__3679) {
22360
+ if(function() {
22361
+ var or__3824__auto__ = G__3679.cljs$lang$protocol_mask$partition0$ & 262144;
22362
+ if(or__3824__auto__) {
22363
+ return or__3824__auto__
22364
+ }else {
22365
+ return G__3679.cljs$core$IWithMeta$
22366
+ }
22367
+ }()) {
22368
+ return true
22520
22369
  }else {
22521
- return and__3822__auto__
22370
+ if(!G__3679.cljs$lang$protocol_mask$partition0$) {
22371
+ return cljs.core.type_satisfies_.call(null, cljs.core.IWithMeta, G__3679)
22372
+ }else {
22373
+ return false
22374
+ }
22522
22375
  }
22523
- }(), cljs.core.apply.call(null, cljs.core.str, "Unable to find results for both of ", src_query, tgt_query));
22524
- return calabash_script.utils.target.call(null).dragFromToForDuration(calabash_script.utils.clj__GT_js.call(null, (new cljs.core.Keyword("\ufdd0'hit-point")).call(null, src)), calabash_script.utils.clj__GT_js.call(null, (new cljs.core.Keyword("\ufdd0'hit-point")).call(null, tgt)), duration)
22525
- };
22526
- var pan = function(src_query, tgt_query, var_args) {
22527
- var kwargs = null;
22528
- if(goog.isDef(var_args)) {
22529
- kwargs = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0)
22530
- }
22531
- return pan__delegate.call(this, src_query, tgt_query, kwargs)
22532
- };
22533
- pan.cljs$lang$maxFixedArity = 2;
22534
- pan.cljs$lang$applyTo = function(arglist__3483) {
22535
- var src_query = cljs.core.first(arglist__3483);
22536
- var tgt_query = cljs.core.first(cljs.core.next(arglist__3483));
22537
- var kwargs = cljs.core.rest(cljs.core.next(arglist__3483));
22538
- return pan__delegate(src_query, tgt_query, kwargs)
22539
- };
22540
- pan.cljs$lang$arity$variadic = pan__delegate;
22541
- return pan
22542
- }();
22543
- calabash_script.core.scroll_to = function() {
22544
- var scroll_to__delegate = function(args) {
22545
- return cljs.core.apply.call(null, calabash_script.core.perform_on_first, function(p1__3480_SHARP_) {
22546
- return p1__3480_SHARP_.scrollToVisible()
22547
- }, args)
22548
- };
22549
- var scroll_to = function(var_args) {
22550
- var args = null;
22551
- if(goog.isDef(var_args)) {
22552
- args = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0)
22553
- }
22554
- return scroll_to__delegate.call(this, args)
22555
- };
22556
- scroll_to.cljs$lang$maxFixedArity = 0;
22557
- scroll_to.cljs$lang$applyTo = function(arglist__3485) {
22558
- var args = cljs.core.seq(arglist__3485);
22559
- return scroll_to__delegate(args)
22560
- };
22561
- scroll_to.cljs$lang$arity$variadic = scroll_to__delegate;
22562
- return scroll_to
22563
- }();
22564
- calabash_script.core.touch_hold = function() {
22565
- var touch_hold__delegate = function(duration, args) {
22566
- return cljs.core.apply.call(null, calabash_script.core.perform_on_first, function(p1__3484_SHARP_) {
22567
- return p1__3484_SHARP_.touchAndHold(duration)
22568
- }, args)
22569
- };
22570
- var touch_hold = function(duration, var_args) {
22571
- var args = null;
22572
- if(goog.isDef(var_args)) {
22573
- args = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0)
22376
+ }else {
22377
+ return cljs.core.type_satisfies_.call(null, cljs.core.IWithMeta, G__3679)
22574
22378
  }
22575
- return touch_hold__delegate.call(this, duration, args)
22576
- };
22577
- touch_hold.cljs$lang$maxFixedArity = 1;
22578
- touch_hold.cljs$lang$applyTo = function(arglist__3486) {
22579
- var duration = cljs.core.first(arglist__3486);
22580
- var args = cljs.core.rest(arglist__3486);
22581
- return touch_hold__delegate(duration, args)
22582
- };
22583
- touch_hold.cljs$lang$arity$variadic = touch_hold__delegate;
22584
- return touch_hold
22585
- }();
22586
- calabash_script.core._STAR_alert_handlers_STAR_ = cljs.core.atom.call(null, cljs.core.list.call(null, cljs.core.constantly.call(null, true)));
22587
- calabash_script.core.set_alert_handler_BANG_ = function set_alert_handler_BANG_(handler) {
22588
- return calabash_script.utils.target.call(null)["onAlert"] = handler
22379
+ }()) {
22380
+ return cljs.core.with_meta.call(null, o, cljs.core.merge.call(null, cljs.core.meta.call(null, o), m))
22381
+ }else {
22382
+ return cljs.reader.reader_error.call(null, rdr, "Metadata can only be applied to IWithMetas")
22383
+ }
22589
22384
  };
22590
- calabash_script.core.add_alert_handler_BANG_ = function add_alert_handler_BANG_(handler) {
22591
- return cljs.core.swap_BANG_.call(null, calabash_script.core._STAR_alert_handlers_STAR_, function(p1__3487_SHARP_) {
22592
- return cljs.core.cons.call(null, handler, p1__3487_SHARP_)
22593
- })
22385
+ cljs.reader.read_set = function read_set(rdr, _) {
22386
+ return cljs.core.set.call(null, cljs.reader.read_delimited_list.call(null, "}", rdr, true))
22594
22387
  };
22595
- calabash_script.core.set_alert_handler_BANG_.call(null, function(alert) {
22596
- var handler_values = cljs.core.map.call(null, function(h) {
22597
- return h.call(null, alert)
22598
- }, cljs.core.deref.call(null, calabash_script.core._STAR_alert_handlers_STAR_));
22599
- return cljs.core.first.call(null, cljs.core.filter.call(null, cljs.core.true_QMARK_, handler_values))
22600
- });
22601
- calabash_script.core.alert = function alert() {
22602
- return calabash_script.utils.normalize.call(null, calabash_script.utils.app.call(null).alert())
22388
+ cljs.reader.read_regex = function read_regex(rdr, ch) {
22389
+ return cljs.core.re_pattern.call(null, cljs.reader.read_string_STAR_.call(null, rdr, ch))
22603
22390
  };
22604
- calabash_script.core.alert_texts = function alert_texts() {
22605
- return null
22391
+ cljs.reader.read_discard = function read_discard(rdr, _) {
22392
+ cljs.reader.read.call(null, rdr, true, null, true);
22393
+ return rdr
22606
22394
  };
22607
- calabash_script.core.keyboard_visible_QMARK_ = function keyboard_visible_QMARK_() {
22608
- return calabash_script.query.valid_QMARK_.call(null, calabash_script.utils.keyboard.call(null))
22395
+ cljs.reader.macros = function macros(c) {
22396
+ if(c === '"') {
22397
+ return cljs.reader.read_string_STAR_
22398
+ }else {
22399
+ if(c === ":") {
22400
+ return cljs.reader.read_keyword
22401
+ }else {
22402
+ if(c === ";") {
22403
+ return cljs.reader.not_implemented
22404
+ }else {
22405
+ if(c === "'") {
22406
+ return cljs.reader.wrapping_reader.call(null, "\ufdd1'quote")
22407
+ }else {
22408
+ if(c === "@") {
22409
+ return cljs.reader.wrapping_reader.call(null, "\ufdd1'deref")
22410
+ }else {
22411
+ if(c === "^") {
22412
+ return cljs.reader.read_meta
22413
+ }else {
22414
+ if(c === "`") {
22415
+ return cljs.reader.not_implemented
22416
+ }else {
22417
+ if(c === "~") {
22418
+ return cljs.reader.not_implemented
22419
+ }else {
22420
+ if(c === "(") {
22421
+ return cljs.reader.read_list
22422
+ }else {
22423
+ if(c === ")") {
22424
+ return cljs.reader.read_unmatched_delimiter
22425
+ }else {
22426
+ if(c === "[") {
22427
+ return cljs.reader.read_vector
22428
+ }else {
22429
+ if(c === "]") {
22430
+ return cljs.reader.read_unmatched_delimiter
22431
+ }else {
22432
+ if(c === "{") {
22433
+ return cljs.reader.read_map
22434
+ }else {
22435
+ if(c === "}") {
22436
+ return cljs.reader.read_unmatched_delimiter
22437
+ }else {
22438
+ if(c === "\\") {
22439
+ return cljs.reader.read_char
22440
+ }else {
22441
+ if(c === "%") {
22442
+ return cljs.reader.not_implemented
22443
+ }else {
22444
+ if(c === "#") {
22445
+ return cljs.reader.read_dispatch
22446
+ }else {
22447
+ if("\ufdd0'else") {
22448
+ return null
22449
+ }else {
22450
+ return null
22451
+ }
22452
+ }
22453
+ }
22454
+ }
22455
+ }
22456
+ }
22457
+ }
22458
+ }
22459
+ }
22460
+ }
22461
+ }
22462
+ }
22463
+ }
22464
+ }
22465
+ }
22466
+ }
22467
+ }
22468
+ }
22609
22469
  };
22610
- calabash_script.core.keyboard_enter_text = function keyboard_enter_text(txt) {
22611
- calabash_script.tests.fail_if_not.call(null, calabash_script.core.keyboard_visible_QMARK_.call(null), "Keyboard not visible");
22612
- return calabash_script.utils.keyboard.call(null).typeString(txt)
22470
+ cljs.reader.dispatch_macros = function dispatch_macros(s) {
22471
+ if(s === "{") {
22472
+ return cljs.reader.read_set
22473
+ }else {
22474
+ if(s === "<") {
22475
+ return cljs.reader.throwing_reader.call(null, "Unreadable form")
22476
+ }else {
22477
+ if(s === '"') {
22478
+ return cljs.reader.read_regex
22479
+ }else {
22480
+ if(s === "!") {
22481
+ return cljs.reader.read_comment
22482
+ }else {
22483
+ if(s === "_") {
22484
+ return cljs.reader.read_discard
22485
+ }else {
22486
+ if("\ufdd0'else") {
22487
+ return null
22488
+ }else {
22489
+ return null
22490
+ }
22491
+ }
22492
+ }
22493
+ }
22494
+ }
22495
+ }
22496
+ };
22497
+ cljs.reader.read = function read(reader, eof_is_error, sentinel, is_recursive) {
22498
+ while(true) {
22499
+ var ch = cljs.reader.read_char.call(null, reader);
22500
+ if(ch == null) {
22501
+ if(cljs.core.truth_(eof_is_error)) {
22502
+ return cljs.reader.reader_error.call(null, reader, "EOF while reading")
22503
+ }else {
22504
+ return sentinel
22505
+ }
22506
+ }else {
22507
+ if(cljs.reader.whitespace_QMARK_.call(null, ch)) {
22508
+ var G__3680 = reader;
22509
+ var G__3681 = eof_is_error;
22510
+ var G__3682 = sentinel;
22511
+ var G__3683 = is_recursive;
22512
+ reader = G__3680;
22513
+ eof_is_error = G__3681;
22514
+ sentinel = G__3682;
22515
+ is_recursive = G__3683;
22516
+ continue
22517
+ }else {
22518
+ if(cljs.reader.comment_prefix_QMARK_.call(null, ch)) {
22519
+ var G__3684 = cljs.reader.read_comment.call(null, reader, ch);
22520
+ var G__3685 = eof_is_error;
22521
+ var G__3686 = sentinel;
22522
+ var G__3687 = is_recursive;
22523
+ reader = G__3684;
22524
+ eof_is_error = G__3685;
22525
+ sentinel = G__3686;
22526
+ is_recursive = G__3687;
22527
+ continue
22528
+ }else {
22529
+ if("\ufdd0'else") {
22530
+ var f = cljs.reader.macros.call(null, ch);
22531
+ var res = cljs.core.truth_(f) ? f.call(null, reader, ch) : cljs.reader.number_literal_QMARK_.call(null, reader, ch) ? cljs.reader.read_number.call(null, reader, ch) : "\ufdd0'else" ? cljs.reader.read_symbol.call(null, reader, ch) : null;
22532
+ if(res === reader) {
22533
+ var G__3688 = reader;
22534
+ var G__3689 = eof_is_error;
22535
+ var G__3690 = sentinel;
22536
+ var G__3691 = is_recursive;
22537
+ reader = G__3688;
22538
+ eof_is_error = G__3689;
22539
+ sentinel = G__3690;
22540
+ is_recursive = G__3691;
22541
+ continue
22542
+ }else {
22543
+ return res
22544
+ }
22545
+ }else {
22546
+ return null
22547
+ }
22548
+ }
22549
+ }
22550
+ }
22551
+ break
22552
+ }
22553
+ };
22554
+ cljs.reader.read_string = function read_string(s) {
22555
+ var r = cljs.reader.push_back_reader.call(null, s);
22556
+ return cljs.reader.read.call(null, r, true, null, false)
22557
+ };
22558
+ cljs.reader.zero_fill_right = function zero_fill_right(s, width) {
22559
+ if(cljs.core._EQ_.call(null, width, cljs.core.count.call(null, s))) {
22560
+ return s
22561
+ }else {
22562
+ if(width < cljs.core.count.call(null, s)) {
22563
+ return s.substring(0, width)
22564
+ }else {
22565
+ if("\ufdd0'else") {
22566
+ var b = new goog.string.StringBuffer(s);
22567
+ while(true) {
22568
+ if(b.getLength() < width) {
22569
+ var G__3692 = b.append("0");
22570
+ b = G__3692;
22571
+ continue
22572
+ }else {
22573
+ return b.toString()
22574
+ }
22575
+ break
22576
+ }
22577
+ }else {
22578
+ return null
22579
+ }
22580
+ }
22581
+ }
22613
22582
  };
22614
- calabash_script.core.enter = function enter() {
22615
- calabash_script.tests.fail_if_not.call(null, calabash_script.core.keyboard_visible_QMARK_.call(null), "Keyboard not visible");
22616
- return calabash_script.utils.keyboard.call(null).typeString("\n")
22583
+ cljs.reader.divisible_QMARK_ = function divisible_QMARK_(num, div) {
22584
+ return num % div === 0
22617
22585
  };
22618
- calabash_script.core.tap_mark = function tap_mark(mark) {
22619
- return calabash_script.core.tap.call(null, cljs.core.PersistentVector.fromArray(["\ufdd0'view", cljs.core.ObjMap.fromObject(["\ufdd0'marked"], {"\ufdd0'marked":mark})], true))
22586
+ cljs.reader.indivisible_QMARK_ = function indivisible_QMARK_(num, div) {
22587
+ return cljs.core.not.call(null, cljs.reader.divisible_QMARK_.call(null, num, div))
22620
22588
  };
22621
- calabash_script.core.element_exists_QMARK_ = function() {
22622
- var element_exists_QMARK___delegate = function(args) {
22623
- return cljs.core.boolean$.call(null, cljs.core.seq.call(null, cljs.core.apply.call(null, calabash_script.core.query, args)))
22624
- };
22625
- var element_exists_QMARK_ = function(var_args) {
22626
- var args = null;
22627
- if(goog.isDef(var_args)) {
22628
- args = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0)
22629
- }
22630
- return element_exists_QMARK___delegate.call(this, args)
22631
- };
22632
- element_exists_QMARK_.cljs$lang$maxFixedArity = 0;
22633
- element_exists_QMARK_.cljs$lang$applyTo = function(arglist__3488) {
22634
- var args = cljs.core.seq(arglist__3488);
22635
- return element_exists_QMARK___delegate(args)
22636
- };
22637
- element_exists_QMARK_.cljs$lang$arity$variadic = element_exists_QMARK___delegate;
22638
- return element_exists_QMARK_
22639
- }();
22640
- calabash_script.core.element_does_not_exist_QMARK_ = function() {
22641
- var element_does_not_exist_QMARK___delegate = function(args) {
22642
- return cljs.core.not.call(null, cljs.core.apply.call(null, calabash_script.core.element_exists_QMARK_, args))
22643
- };
22644
- var element_does_not_exist_QMARK_ = function(var_args) {
22645
- var args = null;
22646
- if(goog.isDef(var_args)) {
22647
- args = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0)
22589
+ cljs.reader.leap_year_QMARK_ = function leap_year_QMARK_(year) {
22590
+ var and__3822__auto__ = cljs.reader.divisible_QMARK_.call(null, year, 4);
22591
+ if(cljs.core.truth_(and__3822__auto__)) {
22592
+ var or__3824__auto__ = cljs.reader.indivisible_QMARK_.call(null, year, 100);
22593
+ if(cljs.core.truth_(or__3824__auto__)) {
22594
+ return or__3824__auto__
22595
+ }else {
22596
+ return cljs.reader.divisible_QMARK_.call(null, year, 400)
22648
22597
  }
22649
- return element_does_not_exist_QMARK___delegate.call(this, args)
22650
- };
22651
- element_does_not_exist_QMARK_.cljs$lang$maxFixedArity = 0;
22652
- element_does_not_exist_QMARK_.cljs$lang$applyTo = function(arglist__3489) {
22653
- var args = cljs.core.seq(arglist__3489);
22654
- return element_does_not_exist_QMARK___delegate(args)
22655
- };
22656
- element_does_not_exist_QMARK_.cljs$lang$arity$variadic = element_does_not_exist_QMARK___delegate;
22657
- return element_does_not_exist_QMARK_
22598
+ }else {
22599
+ return and__3822__auto__
22600
+ }
22601
+ };
22602
+ cljs.reader.days_in_month = function() {
22603
+ var dim_norm = cljs.core.PersistentVector.fromArray([null, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], true);
22604
+ var dim_leap = cljs.core.PersistentVector.fromArray([null, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], true);
22605
+ return function(month, leap_year_QMARK_) {
22606
+ return cljs.core._lookup.call(null, cljs.core.truth_(leap_year_QMARK_) ? dim_leap : dim_norm, month, null)
22607
+ }
22658
22608
  }();
22659
- calabash_script.core.check_element_exists = function() {
22660
- var check_element_exists__delegate = function(args) {
22661
- if(cljs.core.truth_(cljs.core.apply.call(null, calabash_script.core.element_exists_QMARK_, args))) {
22662
- return null
22609
+ cljs.reader.parse_and_validate_timestamp = function() {
22610
+ var timestamp = /(\d\d\d\d)(?:-(\d\d)(?:-(\d\d)(?:[T](\d\d)(?::(\d\d)(?::(\d\d)(?:[.](\d+))?)?)?)?)?)?(?:[Z]|([-+])(\d\d):(\d\d))?/;
22611
+ var check = function(low, n, high, msg) {
22612
+ if(function() {
22613
+ var and__3822__auto__ = low <= n;
22614
+ if(and__3822__auto__) {
22615
+ return n <= high
22616
+ }else {
22617
+ return and__3822__auto__
22618
+ }
22619
+ }()) {
22663
22620
  }else {
22664
- return calabash_script.tests.fail.call(null, "Element does not exist: ", cljs.core.apply.call(null, cljs.core.str, args))
22665
- }
22666
- };
22667
- var check_element_exists = function(var_args) {
22668
- var args = null;
22669
- if(goog.isDef(var_args)) {
22670
- args = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0)
22621
+ throw new Error([cljs.core.str("Assert failed: "), cljs.core.str([cljs.core.str(msg), cljs.core.str(" Failed: "), cljs.core.str(low), cljs.core.str("<="), cljs.core.str(n), cljs.core.str("<="), cljs.core.str(high)].join("")), cljs.core.str("\n"), cljs.core.str(cljs.core.pr_str.call(null, cljs.core.with_meta(cljs.core.list("\ufdd1'<=", "\ufdd1'low", "\ufdd1'n", "\ufdd1'high"), cljs.core.hash_map("\ufdd0'line", 474))))].join(""));
22671
22622
  }
22672
- return check_element_exists__delegate.call(this, args)
22673
- };
22674
- check_element_exists.cljs$lang$maxFixedArity = 0;
22675
- check_element_exists.cljs$lang$applyTo = function(arglist__3490) {
22676
- var args = cljs.core.seq(arglist__3490);
22677
- return check_element_exists__delegate(args)
22623
+ return n
22678
22624
  };
22679
- check_element_exists.cljs$lang$arity$variadic = check_element_exists__delegate;
22680
- return check_element_exists
22681
- }();
22682
- calabash_script.core.check_element_does_not_exist = function() {
22683
- var check_element_does_not_exist__delegate = function(args) {
22684
- if(cljs.core.truth_(cljs.core.apply.call(null, calabash_script.core.element_exists_QMARK_, args))) {
22685
- return calabash_script.tests.fail.call(null, "Element does exist: ", cljs.core.apply.call(null, cljs.core.str, args))
22625
+ return function(ts) {
22626
+ var temp__3974__auto__ = cljs.core.map.call(null, cljs.core.vec, cljs.core.split_at.call(null, 8, cljs.core.re_matches.call(null, timestamp, ts)));
22627
+ if(cljs.core.truth_(temp__3974__auto__)) {
22628
+ var vec__3697 = temp__3974__auto__;
22629
+ var vec__3698 = cljs.core.nth.call(null, vec__3697, 0, null);
22630
+ var _ = cljs.core.nth.call(null, vec__3698, 0, null);
22631
+ var years = cljs.core.nth.call(null, vec__3698, 1, null);
22632
+ var months = cljs.core.nth.call(null, vec__3698, 2, null);
22633
+ var days = cljs.core.nth.call(null, vec__3698, 3, null);
22634
+ var hours = cljs.core.nth.call(null, vec__3698, 4, null);
22635
+ var minutes = cljs.core.nth.call(null, vec__3698, 5, null);
22636
+ var seconds = cljs.core.nth.call(null, vec__3698, 6, null);
22637
+ var milliseconds = cljs.core.nth.call(null, vec__3698, 7, null);
22638
+ var vec__3699 = cljs.core.nth.call(null, vec__3697, 1, null);
22639
+ var ___$1 = cljs.core.nth.call(null, vec__3699, 0, null);
22640
+ var ___$2 = cljs.core.nth.call(null, vec__3699, 1, null);
22641
+ var ___$3 = cljs.core.nth.call(null, vec__3699, 2, null);
22642
+ var V = vec__3697;
22643
+ var vec__3700 = cljs.core.map.call(null, function(v) {
22644
+ return cljs.core.map.call(null, function(p1__3696_SHARP_) {
22645
+ return parseInt(p1__3696_SHARP_, 10)
22646
+ }, v)
22647
+ }, cljs.core.map.call(null, function(p1__3694_SHARP_, p2__3693_SHARP_) {
22648
+ return cljs.core.update_in.call(null, p2__3693_SHARP_, cljs.core.PersistentVector.fromArray([0], true), p1__3694_SHARP_)
22649
+ }, cljs.core.PersistentVector.fromArray([cljs.core.constantly.call(null, null), function(p1__3695_SHARP_) {
22650
+ if(cljs.core._EQ_.call(null, p1__3695_SHARP_, "-")) {
22651
+ return"-1"
22652
+ }else {
22653
+ return"1"
22654
+ }
22655
+ }], true), V));
22656
+ var vec__3701 = cljs.core.nth.call(null, vec__3700, 0, null);
22657
+ var ___$4 = cljs.core.nth.call(null, vec__3701, 0, null);
22658
+ var y = cljs.core.nth.call(null, vec__3701, 1, null);
22659
+ var mo = cljs.core.nth.call(null, vec__3701, 2, null);
22660
+ var d = cljs.core.nth.call(null, vec__3701, 3, null);
22661
+ var h = cljs.core.nth.call(null, vec__3701, 4, null);
22662
+ var m = cljs.core.nth.call(null, vec__3701, 5, null);
22663
+ var s = cljs.core.nth.call(null, vec__3701, 6, null);
22664
+ var ms = cljs.core.nth.call(null, vec__3701, 7, null);
22665
+ var vec__3702 = cljs.core.nth.call(null, vec__3700, 1, null);
22666
+ var offset_sign = cljs.core.nth.call(null, vec__3702, 0, null);
22667
+ var offset_hours = cljs.core.nth.call(null, vec__3702, 1, null);
22668
+ var offset_minutes = cljs.core.nth.call(null, vec__3702, 2, null);
22669
+ var offset = offset_sign * (offset_hours * 60 + offset_minutes);
22670
+ return cljs.core.PersistentVector.fromArray([cljs.core.not.call(null, years) ? 1970 : y, cljs.core.not.call(null, months) ? 1 : check.call(null, 1, mo, 12, "timestamp month field must be in range 1..12"), cljs.core.not.call(null, days) ? 1 : check.call(null, 1, d, cljs.reader.days_in_month.call(null, mo, cljs.reader.leap_year_QMARK_.call(null, y)), "timestamp day field must be in range 1..last day in month"), cljs.core.not.call(null, hours) ? 0 : check.call(null, 0, h, 23, "timestamp hour field must be in range 0..23"),
22671
+ cljs.core.not.call(null, minutes) ? 0 : check.call(null, 0, m, 59, "timestamp minute field must be in range 0..59"), cljs.core.not.call(null, seconds) ? 0 : check.call(null, 0, s, cljs.core._EQ_.call(null, m, 59) ? 60 : 59, "timestamp second field must be in range 0..60"), cljs.core.not.call(null, milliseconds) ? 0 : check.call(null, 0, ms, 999, "timestamp millisecond field must be in range 0..999"), offset], true)
22686
22672
  }else {
22687
22673
  return null
22688
22674
  }
22689
- };
22690
- var check_element_does_not_exist = function(var_args) {
22691
- var args = null;
22692
- if(goog.isDef(var_args)) {
22693
- args = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0)
22694
- }
22695
- return check_element_does_not_exist__delegate.call(this, args)
22696
- };
22697
- check_element_does_not_exist.cljs$lang$maxFixedArity = 0;
22698
- check_element_does_not_exist.cljs$lang$applyTo = function(arglist__3491) {
22699
- var args = cljs.core.seq(arglist__3491);
22700
- return check_element_does_not_exist__delegate(args)
22701
- };
22702
- check_element_does_not_exist.cljs$lang$arity$variadic = check_element_does_not_exist__delegate;
22703
- return check_element_does_not_exist
22704
- }();
22705
- calabash_script.core.names = function() {
22706
- var names__delegate = function(args) {
22707
- return cljs.core.map.call(null, "\ufdd0'name", cljs.core.apply.call(null, calabash_script.core.query, args))
22708
- };
22709
- var names = function(var_args) {
22710
- var args = null;
22711
- if(goog.isDef(var_args)) {
22712
- args = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0)
22713
- }
22714
- return names__delegate.call(this, args)
22715
- };
22716
- names.cljs$lang$maxFixedArity = 0;
22717
- names.cljs$lang$applyTo = function(arglist__3492) {
22718
- var args = cljs.core.seq(arglist__3492);
22719
- return names__delegate(args)
22720
- };
22721
- names.cljs$lang$arity$variadic = names__delegate;
22722
- return names
22675
+ }
22723
22676
  }();
22724
- calabash_script.core.set_location = function set_location(location) {
22725
- return calabash_script.utils.target.call(null).setLocation(calabash_script.utils.clj__GT_js.call(null, location))
22677
+ cljs.reader.parse_timestamp = function parse_timestamp(ts) {
22678
+ var temp__3971__auto__ = cljs.reader.parse_and_validate_timestamp.call(null, ts);
22679
+ if(cljs.core.truth_(temp__3971__auto__)) {
22680
+ var vec__3704 = temp__3971__auto__;
22681
+ var years = cljs.core.nth.call(null, vec__3704, 0, null);
22682
+ var months = cljs.core.nth.call(null, vec__3704, 1, null);
22683
+ var days = cljs.core.nth.call(null, vec__3704, 2, null);
22684
+ var hours = cljs.core.nth.call(null, vec__3704, 3, null);
22685
+ var minutes = cljs.core.nth.call(null, vec__3704, 4, null);
22686
+ var seconds = cljs.core.nth.call(null, vec__3704, 5, null);
22687
+ var ms = cljs.core.nth.call(null, vec__3704, 6, null);
22688
+ var offset = cljs.core.nth.call(null, vec__3704, 7, null);
22689
+ return new Date(Date.UTC(years, months - 1, days, hours, minutes, seconds, ms) - offset * 60 * 1E3)
22690
+ }else {
22691
+ return cljs.reader.reader_error.call(null, null, [cljs.core.str("Unrecognized date/time syntax: "), cljs.core.str(ts)].join(""))
22692
+ }
22693
+ };
22694
+ cljs.reader.read_date = function read_date(s) {
22695
+ if(cljs.core.string_QMARK_.call(null, s)) {
22696
+ return cljs.reader.parse_timestamp.call(null, s)
22697
+ }else {
22698
+ return cljs.reader.reader_error.call(null, null, "Instance literal expects a string for its timestamp.")
22699
+ }
22700
+ };
22701
+ cljs.reader.read_queue = function read_queue(elems) {
22702
+ if(cljs.core.vector_QMARK_.call(null, elems)) {
22703
+ return cljs.core.into.call(null, cljs.core.PersistentQueue.EMPTY, elems)
22704
+ }else {
22705
+ return cljs.reader.reader_error.call(null, null, "Queue literal expects a vector for its elements.")
22706
+ }
22707
+ };
22708
+ cljs.reader.read_uuid = function read_uuid(uuid) {
22709
+ if(cljs.core.string_QMARK_.call(null, uuid)) {
22710
+ return new cljs.core.UUID(uuid)
22711
+ }else {
22712
+ return cljs.reader.reader_error.call(null, null, "UUID literal expects a string as its representation.")
22713
+ }
22714
+ };
22715
+ cljs.reader._STAR_tag_table_STAR_ = cljs.core.atom.call(null, cljs.core.ObjMap.fromObject(["inst", "uuid", "queue"], {"inst":cljs.reader.read_date, "uuid":cljs.reader.read_uuid, "queue":cljs.reader.read_queue}));
22716
+ cljs.reader.maybe_read_tagged_type = function maybe_read_tagged_type(rdr, initch) {
22717
+ var tag = cljs.reader.read_symbol.call(null, rdr, initch);
22718
+ var temp__3971__auto__ = cljs.core._lookup.call(null, cljs.core.deref.call(null, cljs.reader._STAR_tag_table_STAR_), cljs.core.name.call(null, tag), null);
22719
+ if(cljs.core.truth_(temp__3971__auto__)) {
22720
+ var pfn = temp__3971__auto__;
22721
+ return pfn.call(null, cljs.reader.read.call(null, rdr, true, null, false))
22722
+ }else {
22723
+ return cljs.reader.reader_error.call(null, rdr, "Could not find tag parser for ", cljs.core.name.call(null, tag), " in ", cljs.core.pr_str.call(null, cljs.core.keys.call(null, cljs.core.deref.call(null, cljs.reader._STAR_tag_table_STAR_))))
22724
+ }
22725
+ };
22726
+ cljs.reader.register_tag_parser_BANG_ = function register_tag_parser_BANG_(tag, f) {
22727
+ var tag__$1 = cljs.core.name.call(null, tag);
22728
+ var old_parser = cljs.core._lookup.call(null, cljs.core.deref.call(null, cljs.reader._STAR_tag_table_STAR_), tag__$1, null);
22729
+ cljs.core.swap_BANG_.call(null, cljs.reader._STAR_tag_table_STAR_, cljs.core.assoc, tag__$1, f);
22730
+ return old_parser
22731
+ };
22732
+ cljs.reader.deregister_tag_parser_BANG_ = function deregister_tag_parser_BANG_(tag) {
22733
+ var tag__$1 = cljs.core.name.call(null, tag);
22734
+ var old_parser = cljs.core._lookup.call(null, cljs.core.deref.call(null, cljs.reader._STAR_tag_table_STAR_), tag__$1, null);
22735
+ cljs.core.swap_BANG_.call(null, cljs.reader._STAR_tag_table_STAR_, cljs.core.dissoc, tag__$1);
22736
+ return old_parser
22726
22737
  };
22727
22738
  goog.provide("uia");
22728
22739
  goog.require("cljs.core");
@@ -22732,23 +22743,23 @@ goog.require("calabash_script.core");
22732
22743
  goog.require("calabash_script.log");
22733
22744
  uia.wrap_query_fn = function wrap_query_fn(qfn) {
22734
22745
  return function() {
22735
- var G__2915__delegate = function(args) {
22746
+ var G__2932__delegate = function(args) {
22736
22747
  return calabash_script.utils.clj__GT_js.call(null, cljs.core.apply.call(null, qfn, cljs.core.map.call(null, cljs.reader.read_string, args)))
22737
22748
  };
22738
- var G__2915 = function(var_args) {
22749
+ var G__2932 = function(var_args) {
22739
22750
  var args = null;
22740
22751
  if(goog.isDef(var_args)) {
22741
22752
  args = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0)
22742
22753
  }
22743
- return G__2915__delegate.call(this, args)
22754
+ return G__2932__delegate.call(this, args)
22744
22755
  };
22745
- G__2915.cljs$lang$maxFixedArity = 0;
22746
- G__2915.cljs$lang$applyTo = function(arglist__2916) {
22747
- var args = cljs.core.seq(arglist__2916);
22748
- return G__2915__delegate(args)
22756
+ G__2932.cljs$lang$maxFixedArity = 0;
22757
+ G__2932.cljs$lang$applyTo = function(arglist__2933) {
22758
+ var args = cljs.core.seq(arglist__2933);
22759
+ return G__2932__delegate(args)
22749
22760
  };
22750
- G__2915.cljs$lang$arity$variadic = G__2915__delegate;
22751
- return G__2915
22761
+ G__2932.cljs$lang$arity$variadic = G__2932__delegate;
22762
+ return G__2932
22752
22763
  }()
22753
22764
  };
22754
22765
  uia.query = uia.wrap_query_fn.call(null, calabash_script.core.query);
@@ -22801,9 +22812,11 @@ uia.tapMark = function tapMark(mark) {
22801
22812
  return calabash_script.core.tap_mark.call(null, mark)
22802
22813
  };
22803
22814
  goog.exportSymbol("uia.tapMark", uia.tapMark);
22815
+ uia.tapOffset = function tapOffset(offset) {
22816
+ return calabash_script.core.tap_offset.call(null, cljs.reader.read_string.call(null, offset))
22817
+ };
22818
+ goog.exportSymbol("uia.tapOffset", uia.tapOffset);
22804
22819
  uia.setLocation = function setLocation(location) {
22805
22820
  return calabash_script.core.set_location.call(null, cljs.reader.read_string.call(null, location))
22806
22821
  };
22807
22822
  goog.exportSymbol("uia.setLocation", uia.setLocation);
22808
- goog.provide("calabash_script.ext");
22809
- goog.require("cljs.core");