react-native-navigation的迁移库

12345678910111213141516171819202122232425262728
  1. describe('app', () => {
  2. beforeEach((done) => {
  3. global.simulator.relaunchApp(done);
  4. });
  5. it('shows welcome screen', () => {
  6. expect(elementByLabel('React Native Navigation!')).toBeVisible();
  7. });
  8. it('switch to tab based app', () => {
  9. elementById('btnSwitchToTabs').tap();
  10. expect(elementByLabel('This is a tab screen')).toBeVisible();
  11. });
  12. xit('switch to tabs with side menus', () => {
  13. elementById('btnSwitchToTabsWithMenus').tap();
  14. expect(elementByLabel('This is a tab screen')).toBeVisible();
  15. });
  16. });
  17. function elementByLabel(label) {
  18. return element(by.label(label));
  19. }
  20. function elementById(id) {
  21. return element(by.id(id));
  22. }