react-native-navigation的迁移库

ExternalComponent.test.js 790B

123456789101112131415161718192021222324
  1. const Utils = require('./Utils');
  2. const TestIDs = require('../playground/src/testIDs');
  3. const Android = require('./AndroidUtils');
  4. const { elementByLabel, elementById } = Utils;
  5. describe('External Component', () => {
  6. beforeEach(async () => {
  7. await device.relaunchApp();
  8. await elementById(TestIDs.NAVIGATION_TAB).tap();
  9. await elementById(TestIDs.EXTERNAL_COMP_BTN).tap();
  10. });
  11. test('Push external component', async () => {
  12. await elementById(TestIDs.PUSH_BTN).tap();
  13. await expect(elementByLabel('This is an external component')).toBeVisible();
  14. });
  15. test('Show external component in deep stack in modal', async () => {
  16. await elementById(TestIDs.MODAL_BTN).tap();
  17. await expect(elementByLabel('External component in deep stack')).toBeVisible();
  18. });
  19. });