@@ -12,7 +12,9 @@ public final class BolusScreen: BaseScreen {
12
12
// MARK: Elements
13
13
14
14
private var bolusTitleText : XCUIElement { app. navigationBars. staticTexts [ " Bolus " ] }
15
- private var bolusEntryTextField : XCUIElement { app. textFields [ " dismissibleKeyboardTextField " ] }
15
+ private var currentGlucoseEntryTextField : XCUIElement { app. textFields [ " textField_CurrentGlucose " ] }
16
+ private var bolusEntryTextField : XCUIElement { app. textFields [ " textField_Bolus " ] }
17
+ private var carbohydratesTextField : XCUIElement { app. textFields [ " textField_Carbohydrates " ] }
16
18
private var bolusCancelButton : XCUIElement { app. navigationBars. buttons [ " Cancel " ] }
17
19
private var simpleBolusCalculatorTitle : XCUIElement { app. navigationBars. staticTexts [ " Simple Bolus Calculator " ] }
18
20
private var bolusActionButton : XCUIElement { app. buttons [ " button_bolusAction " ] }
@@ -27,9 +29,18 @@ public final class BolusScreen: BaseScreen {
27
29
public var getActiveCarbsText : String { activeCarbsText. getLableSafe ( ) }
28
30
29
31
public func tapCancelBolusButton( ) { bolusCancelButton. safeTap ( ) }
32
+ public func tapCurrentGlucoseEntryTextField( ) { currentGlucoseEntryTextField. safeTap ( ) }
30
33
public func tapBolusEntryTextField( ) { bolusEntryTextField. safeTap ( ) }
31
34
public func tapBolusActionButton( ) { bolusActionButton. safeForceTap ( ) }
35
+ public func getBolusFieldValue( ) -> String { bolusEntryTextField. getValueSafe ( ) }
36
+ public func getCurrentGlucoseFieldValue( ) -> String { currentGlucoseEntryTextField. getValueSafe ( ) }
32
37
38
+ public func clearCurrentGlucoseEntryTextField( ) {
39
+ let currentTextLength = currentGlucoseEntryTextField. getValueSafe ( ) . count
40
+
41
+ currentGlucoseEntryTextField
42
+ . typeText ( String ( repeating: XCUIKeyboardKey . delete. rawValue, count: currentTextLength) )
43
+ }
33
44
public func clearBolusEntryTextField( ) {
34
45
let currentTextLength = bolusEntryTextField. getValueSafe ( ) . count
35
46
@@ -48,6 +59,7 @@ public final class BolusScreen: BaseScreen {
48
59
}
49
60
50
61
public func setBolusEntryTextField( value: String ) { bolusEntryTextField. typeText ( value) }
62
+ public func setCurrentGlucoseEntryTextField( value: String ) { currentGlucoseEntryTextField. typeText ( value) }
51
63
public func tapKeyboardDoneButton( ) { keyboardDoneButton. safeTap ( ) }
52
64
53
65
// MARK: Verifications
0 commit comments