Daniel Zlotin 7 years ago
parent
commit
d13f42bbf9
3 changed files with 6 additions and 11 deletions
  1. 1
    2
      package.json
  2. 5
    8
      playground/src/containers/ModalScreen.js
  3. 0
    1
      scripts/travis.sh

+ 1
- 2
package.json View File

26
   "main": "src/index.js",
26
   "main": "src/index.js",
27
   "scripts": {
27
   "scripts": {
28
     "build": ":",
28
     "build": ":",
29
-    "lint": "eslint src integration scripts playground/src playground/e2e playground/scripts",
30
-    "test-js": "BABEL_ENV=test jest --coverage",
29
+    "test-js": "eslint src integration scripts playground/src playground/e2e playground/scripts && BABEL_ENV=test jest --coverage",
31
     "test-android": "node ./scripts/test.android.js",
30
     "test-android": "node ./scripts/test.android.js",
32
     "test-ios": "node ./scripts/test.ios.js",
31
     "test-ios": "node ./scripts/test.ios.js",
33
     "test": "npm run lint && npm run test-js && npm run test-android && npm run test-ios",
32
     "test": "npm run lint && npm run test-js && npm run test-android && npm run test-ios",

+ 5
- 8
playground/src/containers/ModalScreen.js View File

31
         {this.props.previousModalIds ? (<Button title="Dismiss ALL Previous Modals" onPress={this.onClickDismissAllPreviousModals} />) : undefined}
31
         {this.props.previousModalIds ? (<Button title="Dismiss ALL Previous Modals" onPress={this.onClickDismissAllPreviousModals} />) : undefined}
32
         {this.props.previousModalIds ? (<Button title="Dismiss First In Stack" onPress={this.onClickDismissFirstInStack} />) : undefined}
32
         {this.props.previousModalIds ? (<Button title="Dismiss First In Stack" onPress={this.onClickDismissFirstInStack} />) : undefined}
33
         <Text style={styles.footer}>{`this.props.id = ${this.props.id}`}</Text>
33
         <Text style={styles.footer}>{`this.props.id = ${this.props.id}`}</Text>
34
-        
34
+
35
       </View>
35
       </View>
36
     );
36
     );
37
   }
37
   }
53
   onClickDismissPreviousModal() {
53
   onClickDismissPreviousModal() {
54
     Navigation.dismissModal(this.getPreviousModalId());
54
     Navigation.dismissModal(this.getPreviousModalId());
55
   }
55
   }
56
-  
56
+
57
   onClickDismissUnknownModal() {
57
   onClickDismissUnknownModal() {
58
     Navigation.dismissModal('unknown');
58
     Navigation.dismissModal('unknown');
59
   }
59
   }
60
-  
60
+
61
   onClickDismissAllPreviousModals() {
61
   onClickDismissAllPreviousModals() {
62
     _.forEach(this.props.previousModalIds, (id) => Navigation.dismissModal(id));
62
     _.forEach(this.props.previousModalIds, (id) => Navigation.dismissModal(id));
63
   }
63
   }
64
-  
65
-  
64
+
66
   onClickDismissFirstInStack() {
65
   onClickDismissFirstInStack() {
67
-    console.log('RANG', 'getFirstInStackModalId', _.head(this.props.previousModalIds));;
68
     Navigation.dismissModal(_.head(this.props.previousModalIds));
66
     Navigation.dismissModal(_.head(this.props.previousModalIds));
69
   }
67
   }
70
 
68
 
71
-  
72
   getModalPosition() {
69
   getModalPosition() {
73
     return (this.props.modalPosition || 1);
70
     return (this.props.modalPosition || 1);
74
   }
71
   }
75
-  
72
+
76
   getPreviousModalId() {
73
   getPreviousModalId() {
77
     return _.last(this.props.previousModalIds);
74
     return _.last(this.props.previousModalIds);
78
   }
75
   }

+ 0
- 1
scripts/travis.sh View File

20
 }
20
 }
21
 
21
 
22
 run_f "yarn install"
22
 run_f "yarn install"
23
-run_f "yarn run lint"
24
 run_f "yarn run test-js"
23
 run_f "yarn run test-js"
25
 run_f "yarn run test-android"
24
 run_f "yarn run test-android"
26
 run_f "yarn run test-ios"
25
 run_f "yarn run test-ios"