MCPcopy
hub / github.com/codeceptjs/CodeceptJS / seeOrientationIs

Method seeOrientationIs

lib/helper/Appium.js:738–748  ·  view source on GitHub ↗

* 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)

Source from the content-addressed store, hash-verified

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

Callers 4

Appium_ios_test.jsFile · 0.80
Appium_test.jsFile · 0.80
AppiumTs.types.tsFile · 0.80
Appium.types.tsFile · 0.80

Calls 3

_buildAppiumEndpointMethod · 0.95
truthFunction · 0.90
assertMethod · 0.80

Tested by

no test coverage detected