react-native-navigation的迁移库

StaticLifecycleEvents.test.js 809B

12345678910111213141516171819
  1. const Utils = require('./Utils');
  2. const testIDs = require('../playground/src/testIDs');
  3. const { elementByLabel, elementById } = Utils;
  4. describe('static lifecycle events', () => {
  5. beforeEach(async () => {
  6. await device.relaunchApp();
  7. });
  8. it(':android: didAppear didDisappear', async () => {
  9. await elementById(testIDs.PUSH_STATIC_LIFECYCLE_BUTTON).tap();
  10. await expect(elementByLabel('Static Lifecycle Events Overlay')).toBeVisible();
  11. await expect(elementByLabel('didAppear | navigation.playground.StaticLifecycleOverlay')).toBeVisible();
  12. await elementByLabel('PUSH').tap();
  13. await expect(elementByLabel('didAppear | navigation.playground.PushedScreen')).toBeVisible();
  14. await expect(elementByLabel('didDisappear | navigation.playground.WelcomeScreen')).toBeVisible();
  15. });
  16. });