react-native-navigation的迁移库

SplitView.test.js 964B

12345678910111213141516171819202122232425262728
  1. const Utils = require('./Utils');
  2. const TestIDs = require('../playground/src/testIDs');
  3. const cocktailsList = require('../playground/src/assets/cocktails').default;
  4. const { elementByLabel, elementById } = Utils;
  5. describe(':ios: SplitView', () => {
  6. beforeEach(async () => {
  7. await device.relaunchApp();
  8. await elementById(TestIDs.SPLIT_VIEW_BUTTON).tap();
  9. });
  10. it('master screen updates details screen', async () => {
  11. const secondCocktail = cocktailsList[1];
  12. await elementById(secondCocktail.id).tap();
  13. await expect(elementByLabel(secondCocktail.description)).toBeVisible();
  14. });
  15. it('push screen to master screen', async () => {
  16. await elementById(TestIDs.PUSH_MASTER_BTN).tap();
  17. await expect(elementByLabel('Pushed Screen')).toBeVisible();
  18. });
  19. it('push screen to detail screen', async () => {
  20. await elementById(TestIDs.PUSH_DETAILS_BTN).tap();
  21. await expect(elementByLabel('Pushed Screen')).toBeVisible();
  22. });
  23. });