-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Daniel Schmidt
committed
Nov 24, 2018
1 parent
1395964
commit 2cce220
Showing
3 changed files
with
77 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/** | ||
This code is generated. | ||
For more information see generation/README.md. | ||
*/ | ||
|
||
|
||
|
||
class DetoxViewActions { | ||
static getConstraints(element) { | ||
return { | ||
target: element, | ||
method: "getConstraints", | ||
args: [] | ||
}; | ||
} | ||
|
||
static getDescription(element) { | ||
return { | ||
target: element, | ||
method: "getDescription", | ||
args: [] | ||
}; | ||
} | ||
|
||
static click() { | ||
return { | ||
target: { | ||
type: "Class", | ||
value: "com.wix.detox.espresso.DetoxViewActions" | ||
}, | ||
method: "click", | ||
args: [] | ||
}; | ||
} | ||
|
||
} | ||
|
||
module.exports = DetoxViewActions; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,68 +1,57 @@ | ||
#!/usr/bin/env node | ||
const generateIOSAdapters = require("./adapters/ios"); | ||
const generateAndroidAdapters = require("./adapters/android"); | ||
const downloadEspressoFileByClass = require("./utils/downloadEspresso"); | ||
const downloadFile = require("./utils/downloadFile"); | ||
const generateIOSAdapters = require('./adapters/ios'); | ||
const generateAndroidAdapters = require('./adapters/android'); | ||
const downloadEspressoFileByClass = require('./utils/downloadEspresso'); | ||
const downloadFile = require('./utils/downloadFile'); | ||
|
||
const iosFiles = { | ||
"../detox/ios/EarlGrey/EarlGrey/Action/GREYActions.h": | ||
"../detox/src/ios/earlgreyapi/GREYActions.js", | ||
"../detox/ios/Detox/GREYMatchers+Detox.h": | ||
"../detox/src/ios/earlgreyapi/GREYMatchers+Detox.js", | ||
"../detox/ios/EarlGrey/EarlGrey/Matcher/GREYMatchers.h": | ||
"../detox/src/ios/earlgreyapi/GREYMatchers.js", | ||
"../detox/ios/EarlGrey/EarlGrey/Core/GREYInteraction.h": | ||
"../detox/src/ios/earlgreyapi/GREYInteraction.js", | ||
"../detox/ios/Detox/GREYCondition+Detox.h": | ||
"../detox/src/ios/earlgreyapi/GREYConditionDetox.js", | ||
"../detox/ios/EarlGrey/EarlGrey/Synchronization/GREYCondition.h": | ||
"../detox/src/ios/earlgreyapi/GREYCondition.js", | ||
"../detox/ios/Detox/GREYConfiguration+Detox.h": | ||
"../detox/src/ios/earlgreyapi/GREYConfigurationDetox.js", | ||
"../detox/ios/EarlGrey/EarlGrey/Common/GREYConfiguration.h": | ||
"../detox/src/ios/earlgreyapi/GREYConfiguration.js", | ||
"../detox/ios/EarlGrey/EarlGrey/Core/EarlGreyImpl.h": | ||
"../detox/src/ios/earlgreyapi/EarlGreyImpl.js" | ||
'../detox/ios/EarlGrey/EarlGrey/Action/GREYActions.h': '../detox/src/ios/earlgreyapi/GREYActions.js', | ||
'../detox/ios/Detox/GREYMatchers+Detox.h': '../detox/src/ios/earlgreyapi/GREYMatchers+Detox.js', | ||
'../detox/ios/EarlGrey/EarlGrey/Matcher/GREYMatchers.h': '../detox/src/ios/earlgreyapi/GREYMatchers.js', | ||
'../detox/ios/EarlGrey/EarlGrey/Core/GREYInteraction.h': '../detox/src/ios/earlgreyapi/GREYInteraction.js', | ||
'../detox/ios/Detox/GREYCondition+Detox.h': '../detox/src/ios/earlgreyapi/GREYConditionDetox.js', | ||
'../detox/ios/EarlGrey/EarlGrey/Synchronization/GREYCondition.h': '../detox/src/ios/earlgreyapi/GREYCondition.js', | ||
'../detox/ios/Detox/GREYConfiguration+Detox.h': '../detox/src/ios/earlgreyapi/GREYConfigurationDetox.js', | ||
'../detox/ios/EarlGrey/EarlGrey/Common/GREYConfiguration.h': '../detox/src/ios/earlgreyapi/GREYConfiguration.js', | ||
'../detox/ios/EarlGrey/EarlGrey/Core/EarlGreyImpl.h': '../detox/src/ios/earlgreyapi/EarlGreyImpl.js' | ||
}; | ||
|
||
generateIOSAdapters(iosFiles); | ||
//TODO - network failing on CI, check ASAP | ||
// const espressoFilesToDownload = { | ||
// "android.support.test.espresso.action.ViewActions": | ||
// "../detox/src/android/espressoapi/ViewActions.js" | ||
// 'android.support.test.espresso.action.ViewActions': '../detox/src/android/espressoapi/ViewActions.js' | ||
// }; | ||
// | ||
// const downloadedEspressoFilesMap = Object.entries( | ||
// espressoFilesToDownload | ||
// ).reduce( | ||
// (obj, [fullyQualifiedClass, dest]) => ({ | ||
// ...obj, | ||
// [downloadEspressoFileByClass(fullyQualifiedClass)]: dest | ||
// }), | ||
// {} | ||
|
||
// const downloadedEspressoFilesMap = Object.entries(espressoFilesToDownload).reduce( | ||
// (obj, [fullyQualifiedClass, dest]) => ({ | ||
// ...obj, | ||
// [downloadEspressoFileByClass(fullyQualifiedClass)]: dest | ||
// }), | ||
// {} | ||
// ); | ||
// | ||
|
||
// const externalFilesToDownload = { | ||
// 'https://android.googlesource.com/platform/frameworks/uiautomator/+/master/src/com/android/uiautomator/core/UiDevice.java?format=TEXT': '../detox/src/android/espressoapi/UIDevice.js' | ||
// } | ||
// | ||
// const downloadedAndroidFilesMap = Object.entries( | ||
// externalFilesToDownload | ||
// ).reduce( | ||
// (obj, [url, dest]) => ({ | ||
// ...obj, | ||
// [downloadFile(url)]: dest | ||
// }), | ||
// {} | ||
// 'https://android.googlesource.com/platform/frameworks/uiautomator/+/master/src/com/android/uiautomator/core/UiDevice.java?format=TEXT': | ||
// '../detox/src/android/espressoapi/UIDevice.js' | ||
// }; | ||
|
||
// const downloadedAndroidFilesMap = Object.entries(externalFilesToDownload).reduce( | ||
// (obj, [url, dest]) => ({ | ||
// ...obj, | ||
// [downloadFile(url)]: dest | ||
// }), | ||
// {} | ||
// ); | ||
// | ||
|
||
// const androidFiles = { | ||
// ...downloadedAndroidFilesMap, | ||
// ...downloadedEspressoFilesMap, | ||
// '../detox/android/detox/src/main/java/com/wix/detox/espresso/DetoxAction.java': '../detox/src/android/espressoapi/DetoxAction.js', | ||
// '../detox/android/detox/src/main/java/com/wix/detox/espresso/DetoxViewActions.java': | ||
// '../detox/src/android/espressoapi/DetoxViewActions.js', | ||
// '../detox/android/detox/src/main/java/com/wix/detox/espresso/DetoxMatcher.java': '../detox/src/android/espressoapi/DetoxMatcher.js', | ||
// '../detox/android/detox/src/main/java/com/wix/detox/Detox.java': '../detox/src/android/espressoapi/Detox.js', | ||
// '../detox/android/detox/src/main/java/com/wix/detox/espresso/EspressoDetox.java': '../detox/src/android/espressoapi/EspressoDetox.js', | ||
// '../detox/android/detox/src/main/java/com/wix/detox/uiautomator/UiAutomator.java': '../detox/src/android/espressoapi/UIAutomator.js', | ||
// '../detox/android/detox/src/main/java/com/wix/detox/uiautomator/UiAutomator.java': '../detox/src/android/espressoapi/UIAutomator.js' | ||
// }; | ||
// generateAndroidAdapters(androidFiles); |