@@ -36,7 +36,7 @@ class Fojusi_UI_Tests: XCTestCase {
3636 super. tearDown ( )
3737 }
3838
39- func testSelectingBreakDisablesOtherButtons ( ) {
39+ func testSelectingBreak_DisablesOtherButtons ( ) {
4040 XCTAssertTrue ( procrastinateButton. enabled)
4141 XCTAssertTrue ( workButton. enabled)
4242 XCTAssertTrue ( breakButton. enabled)
@@ -51,7 +51,7 @@ class Fojusi_UI_Tests: XCTestCase {
5151 app. alerts [ " Stop? " ] . collectionViews. buttons [ " Stop " ] . tap ( )
5252 }
5353
54- func testSelectingWorkDisablesOtherButtons ( ) {
54+ func testSelectingWork_DisablesOtherButtons ( ) {
5555 XCTAssertTrue ( procrastinateButton. enabled)
5656 XCTAssertTrue ( workButton. enabled)
5757 XCTAssertTrue ( breakButton. enabled)
@@ -66,7 +66,7 @@ class Fojusi_UI_Tests: XCTestCase {
6666 app. alerts [ " Stop? " ] . collectionViews. buttons [ " Stop " ] . tap ( )
6767 }
6868
69- func testSelectingProcrastinateDisablesOtherButtons ( ) {
69+ func testSelectingProcrastinate_DisablesOtherButtons ( ) {
7070 XCTAssertTrue ( procrastinateButton. enabled)
7171 XCTAssertTrue ( workButton. enabled)
7272 XCTAssertTrue ( breakButton. enabled)
@@ -81,4 +81,45 @@ class Fojusi_UI_Tests: XCTestCase {
8181 app. alerts [ " Stop? " ] . collectionViews. buttons [ " Stop " ] . tap ( )
8282 }
8383
84+ func testTimerValues_CanBeChangedInSettings( ) {
85+
86+ app. buttons [ " Settings " ] . tap ( )
87+
88+ app. pickerWheels. element. adjustToPickerWheelValue ( " 55 min " )
89+ XCTAssertTrue ( app. staticTexts [ " 55 min " ] . exists)
90+ app. pickerWheels. element. adjustToPickerWheelValue ( " 10 min " )
91+ XCTAssertTrue ( app. staticTexts [ " 10 min " ] . exists)
92+ app. pickerWheels. element. adjustToPickerWheelValue ( " 25 min " )
93+ XCTAssertTrue ( app. staticTexts [ " 25 min " ] . exists)
94+
95+ app. staticTexts [ " Break duration " ] . tap ( )
96+ app. childrenMatchingType ( . Window) . elementBoundByIndex ( 0 ) . childrenMatchingType ( . Other) . element. childrenMatchingType ( . Other) . element. tap ( )
97+ app. pickerWheels. element. adjustToPickerWheelValue ( " 1 min " )
98+ XCTAssertTrue ( app. staticTexts [ " 1 min " ] . exists)
99+ app. pickerWheels. element. adjustToPickerWheelValue ( " 10 min " )
100+ XCTAssertTrue ( app. staticTexts [ " 10 min " ] . exists)
101+ app. pickerWheels. element. adjustToPickerWheelValue ( " 5 min " )
102+ XCTAssertTrue ( app. staticTexts [ " 5 min " ] . exists)
103+
104+ app. navigationBars [ " Settings " ] . buttons [ " Done " ] . tap ( )
105+ }
106+
107+ func testCanShowTwitter_InAbout( ) {
108+
109+ app. buttons [ " About " ] . tap ( )
110+ app. buttons [ " Twitter " ] . tap ( )
111+ XCTAssertTrue ( app. toolbars. buttons [ " OpenInSafari " ] . exists)
112+ XCTAssertTrue ( app. toolbars. buttons [ " Share " ] . exists)
113+ app. buttons [ " Done " ] . tap ( )
114+ }
115+
116+ func testCanShowGithub_InAbout( ) {
117+
118+ app. buttons [ " About " ] . tap ( )
119+ app. buttons [ " Github " ] . tap ( )
120+ XCTAssertTrue ( app. toolbars. buttons [ " OpenInSafari " ] . exists)
121+ XCTAssertTrue ( app. toolbars. buttons [ " Share " ] . exists)
122+ app. buttons [ " Done " ] . tap ( )
123+ }
124+
84125}
0 commit comments