diff --git a/RxExample/RxExample.xcodeproj/project.pbxproj b/RxExample/RxExample.xcodeproj/project.pbxproj index 958c22ed..1105929f 100644 --- a/RxExample/RxExample.xcodeproj/project.pbxproj +++ b/RxExample/RxExample.xcodeproj/project.pbxproj @@ -12,6 +12,8 @@ 0706E19D1B176EE200BA2D3A /* String+extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0706E19C1B176EE200BA2D3A /* String+extensions.swift */; }; 0706E19F1B17703E00BA2D3A /* RandomUserAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0706E19E1B17703E00BA2D3A /* RandomUserAPI.swift */; }; 075F13101B4E9D5A000D7861 /* APIWrappersViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 075F130F1B4E9D5A000D7861 /* APIWrappersViewController.swift */; }; + 07A5C3DB1B70B703001EFE5C /* CalculatorViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A5C3DA1B70B703001EFE5C /* CalculatorViewController.swift */; }; + 07A5C3DC1B70B703001EFE5C /* CalculatorViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A5C3DA1B70B703001EFE5C /* CalculatorViewController.swift */; }; 07E300071B14995F00F00100 /* TableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07E300061B14995F00F00100 /* TableViewController.swift */; }; 07E300091B149A2A00F00100 /* User.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07E300081B149A2A00F00100 /* User.swift */; }; 07E3C2331B03605B0010338D /* Dependencies.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07E3C2321B03605B0010338D /* Dependencies.swift */; }; @@ -332,6 +334,7 @@ 0706E19C1B176EE200BA2D3A /* String+extensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "String+extensions.swift"; sourceTree = ""; }; 0706E19E1B17703E00BA2D3A /* RandomUserAPI.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RandomUserAPI.swift; sourceTree = ""; }; 075F130F1B4E9D5A000D7861 /* APIWrappersViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = APIWrappersViewController.swift; sourceTree = ""; }; + 07A5C3DA1B70B703001EFE5C /* CalculatorViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CalculatorViewController.swift; sourceTree = ""; }; 07E300061B14995F00F00100 /* TableViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TableViewController.swift; sourceTree = ""; }; 07E300081B149A2A00F00100 /* User.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = User.swift; sourceTree = ""; }; 07E3C2321B03605B0010338D /* Dependencies.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = Dependencies.swift; path = Examples/Dependencies.swift; sourceTree = ""; }; @@ -625,6 +628,15 @@ path = APIWrappers; sourceTree = ""; }; + 07A5C3D91B70B6B8001EFE5C /* 06 Calculator */ = { + isa = PBXGroup; + children = ( + 07A5C3DA1B70B703001EFE5C /* CalculatorViewController.swift */, + ); + name = "06 Calculator"; + path = Calculator; + sourceTree = ""; + }; 07E300051B14994500F00100 /* 05 TableView */ = { isa = PBXGroup; children = ( @@ -1045,14 +1057,14 @@ path = Services; sourceTree = ""; }; - C859B9A21B45C5D900D012D7 /* 06 PartialUpdates */ = { + C859B9A21B45C5D900D012D7 /* 07 PartialUpdates */ = { isa = PBXGroup; children = ( C859B9A31B45C5D900D012D7 /* PartialUpdatesViewController.swift */, C859B9AB1B45CF9100D012D7 /* NumberCell.swift */, C859B9AD1B45CFAB00D012D7 /* NumberSectionView.swift */, ); - name = "06 PartialUpdates"; + name = "07 PartialUpdates"; path = PartialUpdates; sourceTree = ""; }; @@ -1064,8 +1076,9 @@ C86E2F301AE5A0CA00C31024 /* 03 WikipediaImageSearch */, 075F130E1B4E9D10000D7861 /* 04 APIWrappers */, 07E300051B14994500F00100 /* 05 TableView */, - C859B9A21B45C5D900D012D7 /* 06 PartialUpdates */, - C8A57F711B40AF4E00D5570A /* 06 CoreData */, + 07A5C3D91B70B6B8001EFE5C /* 06 Calculator */, + C859B9A21B45C5D900D012D7 /* 07 PartialUpdates */, + C8A57F711B40AF4E00D5570A /* 08 CoreData */, ); path = Examples; sourceTree = ""; @@ -1150,12 +1163,12 @@ path = DataSources; sourceTree = ""; }; - C8A57F711B40AF4E00D5570A /* 06 CoreData */ = { + C8A57F711B40AF4E00D5570A /* 08 CoreData */ = { isa = PBXGroup; children = ( C8A57F721B40AF7C00D5570A /* Random.xcdatamodeld */, ); - name = "06 CoreData"; + name = "08 CoreData"; path = CoreData; sourceTree = ""; }; @@ -1364,6 +1377,7 @@ C8297FD61B6CF953000589EA /* UITextField+Rx.swift in Sources */, C8297E331B6CF905000589EA /* NumberCell.swift in Sources */, C8297FBB1B6CF953000589EA /* RxCollectionViewDataSourceProxy.swift in Sources */, + 07A5C3DC1B70B703001EFE5C /* CalculatorViewController.swift in Sources */, C8297FA61B6CF953000589EA /* KVOObserver.swift in Sources */, C8297F321B6CF94B000589EA /* Switch.swift in Sources */, C8297E341B6CF905000589EA /* UIImageView+Extensions.swift in Sources */, @@ -1545,6 +1559,7 @@ C88C788F1B3F14FD0061C5AB /* Changeset.swift in Sources */, C8C46DA81B47F7110020D71E /* CollectionViewImageCell.swift in Sources */, C8C46DAC1B47F7110020D71E /* WikipediaSearchViewController.swift in Sources */, + 07A5C3DB1B70B703001EFE5C /* CalculatorViewController.swift in Sources */, 0706E19D1B176EE200BA2D3A /* String+extensions.swift in Sources */, C88C78731B3EB0A00061C5AB /* SectionModel.swift in Sources */, C86E2F3F1AE5A0CA00C31024 /* SearchViewModel.swift in Sources */, diff --git a/RxExample/RxExample/Examples/Calculator/CalculatorViewController.swift b/RxExample/RxExample/Examples/Calculator/CalculatorViewController.swift new file mode 100644 index 00000000..e5125b79 --- /dev/null +++ b/RxExample/RxExample/Examples/Calculator/CalculatorViewController.swift @@ -0,0 +1,226 @@ +// +// CalculatorViewController.swift +// RxExample +// +// Created by Carlos GarcĂ­a on 4/8/15. +// Copyright (c) 2015 Krunoslav Zaher. All rights reserved. +// + +import UIKit +#if !RX_NO_MODULE +import RxSwift +import RxCocoa +#endif + +class CalculatorViewController: ViewController { + + enum Operator { + case Addition + case Subtraction + case Multiplication + case Division + } + + enum Action { + case Clear + case ChangeSign + case Percent + case Operation(Operator) + case Equal + case AddNumber(Character) + case AddDot + } + + struct CalState { + let previousNumber: String! + let action: Action + let currentNumber: String! + let inScreen: String + let replace: Bool + } + + @IBOutlet weak var lastSignLabel: UILabel! + @IBOutlet weak var resultLabel: UILabel! + + @IBOutlet weak var allClearButton: UIButton! + @IBOutlet weak var changeSignButton: UIButton! + @IBOutlet weak var percentButton: UIButton! + + @IBOutlet weak var divideButton: UIButton! + @IBOutlet weak var multiplyButton: UIButton! + @IBOutlet weak var minusButton: UIButton! + @IBOutlet weak var plusButton: UIButton! + @IBOutlet weak var equalButton: UIButton! + + @IBOutlet weak var dotButton: UIButton! + + @IBOutlet weak var zeroButton: UIButton! + @IBOutlet weak var oneButton: UIButton! + @IBOutlet weak var twoButton: UIButton! + @IBOutlet weak var threeButton: UIButton! + @IBOutlet weak var fourButton: UIButton! + @IBOutlet weak var fiveButton: UIButton! + @IBOutlet weak var sixButton: UIButton! + @IBOutlet weak var sevenButton: UIButton! + @IBOutlet weak var eightButton: UIButton! + @IBOutlet weak var nineButton: UIButton! + + let CLEAR_STATE = CalState(previousNumber: nil, action: .Clear, currentNumber: "0", inScreen: "0", replace: true) + + let diposeBag = DisposeBag() + + override func viewDidLoad() { + + let commands: [Observable] = [ + allClearButton.rx_tap >- map { _ in .Clear }, + + changeSignButton.rx_tap >- map { _ in .ChangeSign }, + percentButton.rx_tap >- map { _ in .Percent }, + + divideButton.rx_tap >- map { _ in .Operation(.Division) }, + multiplyButton.rx_tap >- map { _ in .Operation(.Multiplication) }, + minusButton.rx_tap >- map { _ in .Operation(.Subtraction) }, + plusButton.rx_tap >- map { _ in .Operation(.Addition) }, + + equalButton.rx_tap >- map { _ in .Equal }, + + dotButton.rx_tap >- map { _ in .AddDot }, + + zeroButton.rx_tap >- map { _ in .AddNumber("0") }, + oneButton.rx_tap >- map { _ in .AddNumber("1") }, + twoButton.rx_tap >- map { _ in .AddNumber("2") }, + threeButton.rx_tap >- map { _ in .AddNumber("3") }, + fourButton.rx_tap >- map { _ in .AddNumber("4") }, + fiveButton.rx_tap >- map { _ in .AddNumber("5") }, + sixButton.rx_tap >- map { _ in .AddNumber("6") }, + sevenButton.rx_tap >- map { _ in .AddNumber("7") }, + eightButton.rx_tap >- map { _ in .AddNumber("8") }, + nineButton.rx_tap >- map { _ in .AddNumber("9") } + ] + + + merge(from(commands)) + >- scan(CLEAR_STATE) { a, x in + return self.tranformState(a, x) + } + >- debug("debugging") + >- subscribeNext { [weak self] calState in + self?.resultLabel.text = self?.prettyFormat(calState.inScreen) + switch calState.action { + case .Operation(let operation): + switch operation { + case .Addition: + self?.lastSignLabel.text = "+" + case .Subtraction: + self?.lastSignLabel.text = "-" + case .Multiplication: + self?.lastSignLabel.text = "x" + case .Division: + self?.lastSignLabel.text = "/" + } + default: + self?.lastSignLabel.text = "" + } + } >- diposeBag.addDisposable + } + + func tranformState(a: CalState, _ x: Action) -> CalState { + switch x { + case .Clear: + return CLEAR_STATE + case .AddNumber(let c): + return addNumber(a, c) + case .AddDot: + return addDot(a) + case .ChangeSign: + let d = "\(-a.inScreen.toDouble()!)" + return CalState(previousNumber: a.previousNumber, action: a.action, currentNumber: d, inScreen: d, replace: true) + case .Percent: + let d = "\(a.inScreen.toDouble()!/100)" + return CalState(previousNumber: a.previousNumber, action: a.action, currentNumber: d, inScreen: d, replace: true) + case .Operation(let o): + return performOperation(a, o) + case .Equal: + return performEqual(a) + } + } + + func addNumber(a: CalState, _ char: Character) -> CalState { + let cn = a.currentNumber == nil || a.replace ? String(char) : a.inScreen + String(char) + return CalState(previousNumber: a.previousNumber, action: a.action, currentNumber: cn, inScreen: cn, replace: false) + } + + func addDot(a: CalState) -> CalState { + let cn = a.inScreen.rangeOfString(".") == nil ? a.currentNumber + "." : a.currentNumber + return CalState(previousNumber: a.previousNumber, action: a.action, currentNumber: cn, inScreen: cn, replace: false) + } + + func performOperation(a: CalState, _ o: Operator) -> CalState { + + if a.previousNumber == nil { + return CalState(previousNumber: a.currentNumber, action: .Operation(o), currentNumber: nil, inScreen: a.currentNumber, replace: true) + } + else { + let previous = a.previousNumber.toDouble()! + let current = a.inScreen.toDouble()! + + switch a.action { + case .Operation(let op): + switch op { + case .Addition: + let result = "\(previous + current)" + return CalState(previousNumber: result, action: .Operation(o), currentNumber: nil, inScreen: result, replace: true) + case .Subtraction: + let result = "\(previous - current)" + return CalState(previousNumber: result, action: .Operation(o), currentNumber: nil, inScreen: result, replace: true) + case .Multiplication: + let result = "\(previous * current)" + return CalState(previousNumber: result, action: .Operation(o), currentNumber: nil, inScreen: result, replace: true) + case .Division: + let result = "\(previous / current)" + return CalState(previousNumber: result, action: .Operation(o), currentNumber: nil, inScreen: result, replace: true) + } + default: + return CalState(previousNumber: nil, action: .Operation(o), currentNumber: a.currentNumber, inScreen: a.inScreen, replace: true) + } + + } + + } + + func performEqual(a: CalState) -> CalState { + let previous = (a.previousNumber ?? "0").toDouble() + let current = a.inScreen.toDouble()! + + switch a.action { + case .Operation(let op): + switch op { + case .Addition: + let result = "\(previous! + current)" + return CalState(previousNumber: nil, action: .Clear, currentNumber: result, inScreen: result, replace: true) + case .Subtraction: + let result = "\(previous! - current)" + return CalState(previousNumber: nil, action: .Clear, currentNumber: result, inScreen: result, replace: true) + case .Multiplication: + let result = "\(previous! * current)" + return CalState(previousNumber: nil, action: .Clear, currentNumber: result, inScreen: result, replace: true) + case .Division: + let result = previous! / current + let resultText = result == Double.infinity ? "0" : "\(result)" + return CalState(previousNumber: nil, action: .Clear, currentNumber: resultText, inScreen: resultText, replace: true) + } + default: + return CalState(previousNumber: nil, action: .Clear, currentNumber: a.currentNumber, inScreen: a.inScreen, replace: true) + } + } + + + func prettyFormat(str: String) -> String { + if str.hasSuffix(".0") { + return str.substringToIndex(str.endIndex.predecessor().predecessor()) + } + return str + } +} + + diff --git a/RxExample/RxExample/iOS/Main.storyboard b/RxExample/RxExample/iOS/Main.storyboard index 3e59fb91..de1ce440 100644 --- a/RxExample/RxExample/iOS/Main.storyboard +++ b/RxExample/RxExample/iOS/Main.storyboard @@ -1,7 +1,8 @@ - + + @@ -25,7 +26,7 @@ - + @@ -66,12 +67,12 @@ - + - + @@ -123,12 +124,12 @@ - + - + @@ -231,7 +232,7 @@ - + @@ -258,7 +259,7 @@ - + @@ -283,7 +284,7 @@ - + @@ -337,12 +338,12 @@ - + - + @@ -373,29 +374,6 @@ - - - - - - - - - - - - - @@ -419,6 +397,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -486,7 +510,7 @@ - + @@ -536,12 +560,12 @@ This is only showcase app, not intended for production purposes. - + - + @@ -644,7 +668,362 @@ This is only showcase app, not intended for production purposes. - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/scripts/automation-tests/01_githubSignUp.js b/scripts/automation-tests/01_githubSignUp.js index 83374dd4..b6f5d848 100644 --- a/scripts/automation-tests/01_githubSignUp.js +++ b/scripts/automation-tests/01_githubSignUp.js @@ -10,7 +10,7 @@ test("----- githubSignUp -----", function (check, pass) { return false; } - UIATarget.localTarget().frontMostApp().mainWindow().tableViews()[0].cells()[0].tapWithOptions({tapOffset:{x:0.24, y:0.20}}); + UIATarget.localTarget().frontMostApp().mainWindow().tableViews()[0].cells()[0].tap(); UIATarget.localTarget().frontMostApp().mainWindow().textFields()[0].tap(); writeInElement(UIATarget.localTarget().frontMostApp().mainWindow().textFields()[0], "rxrevolution") diff --git a/scripts/automation-tests/02_searchWikipedia.js b/scripts/automation-tests/02_searchWikipedia.js index 381300f4..95aed62c 100644 --- a/scripts/automation-tests/02_searchWikipedia.js +++ b/scripts/automation-tests/02_searchWikipedia.js @@ -4,7 +4,7 @@ test("----- searchWikipedia -----", function (check, pass) { var width = UIATarget.localTarget().frontMostApp().mainWindow().rect().size.width - UIATarget.localTarget().frontMostApp().mainWindow().tableViews()[0].cells()[1].tap(); + UIATarget.localTarget().frontMostApp().mainWindow().tableViews()[0].cells()[3].tap(); UIATarget.localTarget().frontMostApp().mainWindow().searchBars()[0].searchBars()[0].tap(); writeInElement(UIATarget.localTarget().frontMostApp().mainWindow().searchBars()[0].searchBars()[0], "banana") diff --git a/scripts/automation-tests/03_masterDetail.js b/scripts/automation-tests/03_masterDetail.js index e8a07772..b2b8f0a6 100644 --- a/scripts/automation-tests/03_masterDetail.js +++ b/scripts/automation-tests/03_masterDetail.js @@ -7,7 +7,7 @@ test("----- masterDetail -----", function (check, pass) { } - UIATarget.localTarget().frontMostApp().mainWindow().tableViews()[0].cells()[2].tapWithOptions({tapOffset:{x:0.24, y:0.20}}); + UIATarget.localTarget().frontMostApp().mainWindow().tableViews()[0].cells()[1].tap(); UIATarget.localTarget().frontMostApp().navigationBar().rightButton().tap(); UIATarget.localTarget().frontMostApp().mainWindow().dragInsideWithOptions({startOffset:{x:0.93, y:yOffset(300)}, endOffset:{x:0.95, y:yOffset(200)}, duration:1.5}); UIATarget.localTarget().frontMostApp().mainWindow().dragInsideWithOptions({startOffset:{x:0.93, y:yOffset(300)}, endOffset:{x:0.95, y:yOffset(100)}, duration:1.5}); diff --git a/scripts/automation-tests/04_controlsTests.js b/scripts/automation-tests/04_controlsTests.js index f03306fc..5e82e0dd 100644 --- a/scripts/automation-tests/04_controlsTests.js +++ b/scripts/automation-tests/04_controlsTests.js @@ -5,7 +5,7 @@ test("----- UIBarButtonItem tap -----", function (check, pass) { - UIATarget.localTarget().frontMostApp().mainWindow().tableViews()[0].cells()[3].tapWithOptions({tapOffset:{x:0.24, y:0.20}}); + UIATarget.localTarget().frontMostApp().mainWindow().tableViews()[0].cells()[4](); UIATarget.localTarget().frontMostApp().navigationBar().rightButton().tap(); @@ -21,7 +21,7 @@ test("----- UIBarButtonItem tap -----", function (check, pass) { test("----- UIBarButtonItem tap -----", function (check, pass) { - UIATarget.localTarget().frontMostApp().mainWindow().tableViews()[0].cells()[3].tapWithOptions({tapOffset:{x:0.24, y:0.20}}); + UIATarget.localTarget().frontMostApp().mainWindow().tableViews()[0].cells()[4](); UIATarget.localTarget().frontMostApp().mainWindow().buttons()["TapMe"].tap(); @@ -39,7 +39,7 @@ test("----- UIBarButtonItem tap -----", function (check, pass) { test("----- UISegmentedControl tap -----", function (check, pass) { - UIATarget.localTarget().frontMostApp().mainWindow().tableViews()[0].cells()[3].tapWithOptions({tapOffset:{x:0.24, y:0.20}}); + UIATarget.localTarget().frontMostApp().mainWindow().tableViews()[0].cells()[4](); UIATarget.localTarget().frontMostApp().mainWindow().segmentedControls()[0].buttons()["Second"].tap(); @@ -63,7 +63,7 @@ test("----- UISegmentedControl tap -----", function (check, pass) { test("----- UISwitch tap -----", function (check, pass) { - UIATarget.localTarget().frontMostApp().mainWindow().tableViews()[0].cells()[3].tapWithOptions({tapOffset:{x:0.24, y:0.20}}); + UIATarget.localTarget().frontMostApp().mainWindow().tableViews()[0].cells()[4](); UIATarget.localTarget().frontMostApp().mainWindow().switches()[0].setValue(0); @@ -87,7 +87,7 @@ test("----- UISwitch tap -----", function (check, pass) { test("----- UITextField text -----", function (check, pass) { - UIATarget.localTarget().frontMostApp().mainWindow().tableViews()[0].cells()[3].tapWithOptions({tapOffset:{x:0.24, y:0.20}}); + UIATarget.localTarget().frontMostApp().mainWindow().tableViews()[0].cells()[4](); UIATarget.localTarget().frontMostApp().mainWindow().textFields()[0].textFields()[0].tap(); // UIATarget.localTarget().frontMostApp().keyboard().typeString("t");// fails if software keyboard is disabled @@ -107,7 +107,7 @@ test("----- UITextField text -----", function (check, pass) { test("----- UISlider value -----", function (check, pass) { - UIATarget.localTarget().frontMostApp().mainWindow().tableViews()[0].cells()[3].tapWithOptions({tapOffset:{x:0.24, y:0.20}}); + UIATarget.localTarget().frontMostApp().mainWindow().tableViews()[0].cells()[4](); UIATarget.localTarget().frontMostApp().mainWindow().sliders()[0].dragToValue(0.00); @@ -124,7 +124,7 @@ test("----- UISlider value -----", function (check, pass) { test("----- UIDatePicker date -----", function (check, pass) { - UIATarget.localTarget().frontMostApp().mainWindow().tableViews()[0].cells()[3].tapWithOptions({tapOffset:{x:0.24, y:0.20}}); + UIATarget.localTarget().frontMostApp().mainWindow().tableViews()[0].cells()[4](); UIATarget.localTarget().frontMostApp().mainWindow().pickers()[0].wheels()[0].tapWithOptions({tapOffset:{x:0.49, y:0.65}}); UIATarget.localTarget().frontMostApp().mainWindow().pickers()[0].wheels()[1].tapWithOptions({tapOffset:{x:0.35, y:0.64}}); @@ -143,7 +143,7 @@ test("----- UIDatePicker date -----", function (check, pass) { test("----- UIActionSheet tap -----", function (check, pass) { - UIATarget.localTarget().frontMostApp().mainWindow().tableViews()[0].cells()[3].tapWithOptions({tapOffset:{x:0.24, y:0.20}}); + UIATarget.localTarget().frontMostApp().mainWindow().tableViews()[0].cells()[4](); UIATarget.localTarget().frontMostApp().mainWindow().buttons()["Open ActionSheet"].tap(); UIATarget.localTarget().frontMostApp().actionSheet().collectionViews()[0].cells()["OK"].buttons()["OK"].tap(); @@ -161,7 +161,7 @@ test("----- UIActionSheet tap -----", function (check, pass) { test("----- UIAlertView tap -----", function (check, pass) { - UIATarget.localTarget().frontMostApp().mainWindow().tableViews()[0].cells()[3].tapWithOptions({tapOffset:{x:0.24, y:0.20}}); + UIATarget.localTarget().frontMostApp().mainWindow().tableViews()[0].cells()[4](); UIATarget.localTarget().onAlert = function(alert){ UIATarget.localTarget().onAlert = null diff --git a/scripts/automation-tests/05_reactivePartialUpdates.js b/scripts/automation-tests/05_reactivePartialUpdates.js index e7da2c19..1186165c 100644 --- a/scripts/automation-tests/05_reactivePartialUpdates.js +++ b/scripts/automation-tests/05_reactivePartialUpdates.js @@ -2,7 +2,7 @@ test("----- reactivePartialUpdates -----", function (check, pass) { - UIATarget.localTarget().frontMostApp().mainWindow().tableViews()[0].cells()[4].tapWithOptions({tapOffset:{x:0.24, y:0.20}}); + UIATarget.localTarget().frontMostApp().mainWindow().tableViews()[0].cells()[5].tap(); UIATarget.localTarget().frontMostApp().navigationBar().rightButton().tap(); UIATarget.localTarget().frontMostApp().navigationBar().rightButton().tap(); UIATarget.localTarget().frontMostApp().navigationBar().rightButton().tap();