From ca9003ca7aa4cb3eb42d69a13819600bb2cee408 Mon Sep 17 00:00:00 2001 From: Kilian Hofmann Date: Sun, 17 Apr 2016 21:46:21 +0200 Subject: [PATCH] UI Test --- .../xcdebugger/Breakpoints_v2.xcbkptlist | 130 ----------------- .../xcdebugger/Expressions.xcexplist | 4 + FMC Planner 2UITests/FMC_Planner_2UITests.m | 131 ++++++++++++++++++ 3 files changed, 135 insertions(+), 130 deletions(-) create mode 100644 FMC PLanner 2.xcworkspace/xcuserdata/Kili2.xcuserdatad/xcdebugger/Expressions.xcexplist diff --git a/FMC PLanner 2.xcworkspace/xcuserdata/Kili2.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/FMC PLanner 2.xcworkspace/xcuserdata/Kili2.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist index a17d576..ed9a9b4 100644 --- a/FMC PLanner 2.xcworkspace/xcuserdata/Kili2.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist +++ b/FMC PLanner 2.xcworkspace/xcuserdata/Kili2.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -2,134 +2,4 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/FMC PLanner 2.xcworkspace/xcuserdata/Kili2.xcuserdatad/xcdebugger/Expressions.xcexplist b/FMC PLanner 2.xcworkspace/xcuserdata/Kili2.xcuserdatad/xcdebugger/Expressions.xcexplist new file mode 100644 index 0000000..1f7c506 --- /dev/null +++ b/FMC PLanner 2.xcworkspace/xcuserdata/Kili2.xcuserdatad/xcdebugger/Expressions.xcexplist @@ -0,0 +1,4 @@ + + + diff --git a/FMC Planner 2UITests/FMC_Planner_2UITests.m b/FMC Planner 2UITests/FMC_Planner_2UITests.m index 2a7f2e3..2f0c33f 100644 --- a/FMC Planner 2UITests/FMC_Planner_2UITests.m +++ b/FMC Planner 2UITests/FMC_Planner_2UITests.m @@ -39,4 +39,135 @@ [super tearDown]; } +- (void)test +{ + XCUIApplication *app = [[XCUIApplication alloc] init]; + XCUIElement *tButton = app.buttons[@"T"]; + [tButton tap]; + + XCUIElement *eButton = app.buttons[@"E"]; + [eButton tap]; + [app.buttons[@"S"] tap]; + [tButton tap]; + + XCUIElement *element = + [[[[[[app childrenMatchingType:XCUIElementTypeWindow] + elementBoundByIndex:0] + childrenMatchingType:XCUIElementTypeOther] + .element childrenMatchingType:XCUIElementTypeOther] + elementBoundByIndex:1] childrenMatchingType:XCUIElementTypeOther] + .element; + XCUIElement *staticText = [[element + childrenMatchingType:XCUIElementTypeStaticText] elementBoundByIndex:4]; + [staticText tap]; + + [app.sheets[@"Load or replace?"].collectionViews.buttons[@"Replace"] tap]; + + [eButton tap]; + + XCUIElement *dButton = app.buttons[@"D"]; + [dButton tap]; + [dButton tap]; + [app.buttons[@"F"] tap]; + + XCUIElement *staticText2 = [[element + childrenMatchingType:XCUIElementTypeStaticText] elementBoundByIndex:3]; + [staticText2 tap]; + [eButton tap]; + [dButton tap]; + [dButton tap]; + + XCUIElement *mButton = app.buttons[@"M"]; + [mButton tap]; + + XCUIElement *staticText3 = [[element + childrenMatchingType:XCUIElementTypeStaticText] elementBoundByIndex:7]; + [staticText3 tap]; + + XCUIElement *rTEButton = app.buttons[@"R T E"]; + [rTEButton tap]; + [dButton tap]; + [app.buttons[@"K"] tap]; + + XCUIElement *bButton = app.buttons[@"B"]; + [bButton tap]; + [staticText tap]; + [tButton tap]; + + XCUIElement *numButton = app.buttons[@"NUM"]; + [numButton tap]; + + XCUIElement *button = app.buttons[@"1"]; + [button tap]; + + XCUIElement *button2 = app.buttons[@"0"]; + [button2 tap]; + + XCUIElement *button3 = app.buttons[@"4"]; + [button3 tap]; + [staticText3 tap]; + [app.buttons[@"LET"] tap]; + [bButton tap]; + [app.buttons[@"U"] tap]; + [app.buttons[@"R"] tap]; + [app.buttons[@"A"] tap]; + [mButton tap]; + + XCUIElement *staticText4 = [[element + childrenMatchingType:XCUIElementTypeStaticText] elementBoundByIndex:8]; + [staticText4 tap]; + + XCUIElement *pERFButton = app.buttons[@"P E R F"]; + [pERFButton tap]; + [numButton tap]; + + XCUIElement *button4 = app.buttons[@"5"]; + [button4 tap]; + + XCUIElement *button5 = app.buttons[@"."]; + [button5 tap]; + [button2 tap]; + [staticText2 tap]; + [button3 tap]; + + XCUIElement *button6 = app.buttons[@"6"]; + [button6 tap]; + [button5 tap]; + + XCUIElement *button7 = app.buttons[@"2"]; + [button7 tap]; + [staticText3 tap]; + [button4 tap]; + [button5 tap]; + [button2 tap]; + [[[element childrenMatchingType:XCUIElementTypeStaticText] + elementBoundByIndex:11] tap]; + [button4 tap]; + [button tap]; + [button5 tap]; + [button7 tap]; + [app.staticTexts[@"46.2"] tap]; + [button4 tap]; + [button6 tap]; + [button5 tap]; + [button7 tap]; + [[[element childrenMatchingType:XCUIElementTypeStaticText] + elementBoundByIndex:15] tap]; + [app.buttons[@"8"] tap]; + [button4 tap]; + [app.staticTexts[@"COST INDEX"] tap]; + [app.staticTexts[@"FLIGHT LVL"] tap]; + [staticText tap]; + [button7 tap]; + [button4 tap]; + [button2 tap]; + [staticText4 tap]; + [button4 tap]; + [[[element childrenMatchingType:XCUIElementTypeStaticText] + elementBoundByIndex:12] tap]; + + XCUIElement *mENUButton = app.buttons[@"M E N U"]; + [mENUButton tap]; +} + @end