mirror of
https://github.com/hanzoai/Detox.git
synced 2026-09-24 16:55:12 +00:00
This PR brings DeviceRegistry, an entity which synchronizes device distribution across processes, enabling parallel test execution on any supported test runner.
22 lines
682 B
JavaScript
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');
|
|
});
|
|
});
|