react-native-navigation的迁移库

DeviceLocked.test.js 1.1KB

1234567891011121314151617181920212223242526272829303132333435
  1. const Utils = require('./Utils');
  2. const Android = require('./AndroidUtils');
  3. const { elementByLabel } = Utils;
  4. xdescribe(':android: Android phone locked tests', () => {
  5. beforeEach(async () => {
  6. await device.relaunchApp();
  7. });
  8. test('launch from locked screen', async () => {
  9. await device.terminateApp();
  10. await Android.pressLockButton();
  11. await Android.pressLockButton();
  12. await device.launchApp();
  13. await Android.swipeUp();
  14. // The device should be locked using PIN 1234
  15. await Android.enterText('1234');
  16. await Android.pressEnter();
  17. await expect(elementByLabel('React Native Navigation!')).toBeVisible();
  18. });
  19. test('launch app from unlocked screen', async () => {
  20. await device.terminateApp();
  21. await Android.pressLockButton();
  22. await Android.pressLockButton();
  23. await Android.swipeUp();
  24. // The device should be locked using PIN 1234
  25. await Android.enterText('1234');
  26. await Android.pressEnter();
  27. await device.launchApp();
  28. await expect(elementByLabel('React Native Navigation!')).toBeVisible();
  29. });
  30. });