Files
Detox/detox/test/e2e/06.device-orientation.test.js
Doron PearlandRotem Mizrachi-Meidan 2dda61c5f6 Support parallel test execution (#609)
This PR brings DeviceRegistry, an entity which synchronizes device distribution across processes, enabling parallel test execution on any supported test runner.
2018-05-29 00:40:51 +03:00

22 lines
682 B
JavaScript

describe('Device Orientation', () => {
beforeEach(async() => {
await device.reloadReactNative();
await element(by.text('Orientation')).tap();
await expect(element(by.id('currentOrientation'))).toExist();
});
it('OrientationLandscape', async () => {
await device.setOrientation('landscape');
await expect(element(by.id('currentOrientation'))).toHaveText('Landscape');
});
it('OrientationPortrait', async() => {
// As default is portrait we need to set it otherwise
await device.setOrientation('landscape');
await device.setOrientation('portrait');
await expect(element(by.id('currentOrientation'))).toHaveText('Portrait');
});
});