File tree Expand file tree Collapse file tree 1 file changed +24
-2
lines changed Expand file tree Collapse file tree 1 file changed +24
-2
lines changed Original file line number Diff line number Diff line change @@ -14,11 +14,33 @@ class SwiftWeatherUITests: QuickSpec {
1414
1515 beforeSuite {
1616 self . continueAfterFailure = false
17- XCUIDevice . shared ( ) . orientation = . portrait
17+
1818 app. launch ( )
1919 }
2020
2121 describe ( " a wheather viewcontroller " ) {
22+ context ( " when the app orientation is portrait " ) {
23+ beforeEach {
24+ XCUIDevice . shared ( ) . orientation = . portrait
25+ }
26+ itBehavesLike ( " a regular wheather viewcontroller " )
27+ }
28+
29+ context ( " when the app orientation is landscape " ) {
30+ beforeEach {
31+ XCUIDevice . shared ( ) . orientation = . landscapeLeft
32+ }
33+ itBehavesLike ( " a regular wheather viewcontroller " )
34+ }
35+ }
36+ }
37+ }
38+
39+ class RegularWheatherViewControllerConfiguration : QuickConfiguration {
40+ override class func configure( _ configuration: Configuration ) {
41+ let app = XCUIApplication ( )
42+
43+ sharedExamples ( " a regular wheather viewcontroller " ) { ( context: SharedExampleContext ) in
2244 it ( " shows city " ) {
2345 expect ( app. staticTexts [ " a11y_current_city " ] . exists) . to ( beTruthy ( ) )
2446 }
@@ -32,5 +54,5 @@ class SwiftWeatherUITests: QuickSpec {
3254 }
3355 }
3456 }
35-
3657}
58+
You can’t perform that action at this time.
0 commit comments