react-native-navigation的迁移库

app.test.js 808B

1234567891011121314151617181920212223242526
  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, passProps and functions', () => {
  9. elementByLabel('Switch to tab based app').tap();
  10. expect(elementByLabel('This is tab 1')).toBeVisible();
  11. expect(elementByLabel('Hello from a function!')).toBeVisible();
  12. });
  13. xit('switch to tabs with side menus', () => {
  14. elementByLabel('Switch to tab based app with side menus').tap();
  15. elementByLabel('Switch to tab based app with side menus').swipeRight();
  16. expect(elementByLabel('This is a side menu screen')).toBeVisible();
  17. });
  18. });
  19. function elementByLabel(label) {
  20. return element(by.label(label));
  21. }