* Check the device orientation * * ```js * I.seeOrientationIs('PORTRAIT'); * I.seeOrientationIs('LANDSCAPE') * ``` * * @return {Promise } * * @param {'LANDSCAPE'|'PORTRAIT'} orientation LANDSCAPE or PORTRAIT * * Appium: support Android and iOS
(orientation)
| 736 | * Appium: support Android and iOS |
| 737 | */ |
| 738 | async seeOrientationIs(orientation) { |
| 739 | onlyForApps.call(this) |
| 740 | |
| 741 | const res = await this.axios({ |
| 742 | method: 'get', |
| 743 | url: `${this._buildAppiumEndpoint()}/orientation`, |
| 744 | }) |
| 745 | |
| 746 | const currentOrientation = res.data.value |
| 747 | return truth('orientation', `to be ${orientation}`).assert(currentOrientation === orientation) |
| 748 | } |
| 749 | |
| 750 | /** |
| 751 | * Set a device orientation. Will fail, if app will not set orientation |
no test coverage detected