Open sourced ProgressBarTest

Reviewed By: andreicoman11

Differential Revision: D3287396

fbshipit-source-id: 1a814b72ebcb5d13106c6a612b341f217c4dc5a6
This commit is contained in:
Konstantin Raev
2016-05-12 04:05:36 -07:00
committed by Facebook Github Bot 1
parent 36b085422d
commit 9b56ff6bab
5 changed files with 192 additions and 1 deletions

View File

@@ -0,0 +1,54 @@
/**
* Copyright (c) 2013-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
* @providesModule ProgressBarTestModule
*/
"use strict";
var BatchedBridge = require('BatchedBridge');
var React = require('React');
var ProgressBar = require('ProgressBarAndroid');
var View = require('View');
var renderApplication = require('renderApplication');
var ProgressBarSampleApp = React.createClass({
render: function() {
return (
<View>
<ProgressBar styleAttr="Horizontal" testID="Horizontal"/>
<ProgressBar styleAttr="Small" testID="Small"/>
<ProgressBar styleAttr="Large" testID="Large"/>
<ProgressBar styleAttr="Normal" testID="Normal"/>
<ProgressBar styleAttr="Inverse" testID="Inverse"/>
<ProgressBar styleAttr="SmallInverse" testID="SmallInverse"/>
<ProgressBar styleAttr="LargeInverse" testID="LargeInverse"/>
<View style={{width:200}}>
<ProgressBar styleAttr="Horizontal" testID="Horizontal200" />
</View>
</View>
);
},
getInitialState: function() {
return {};
},
});
var ProgressBarTestModule = {
renderProgressBarApplication: function(rootTag) {
renderApplication(ProgressBarSampleApp, {}, rootTag);
},
};
BatchedBridge.registerCallableModule(
'ProgressBarTestModule',
ProgressBarTestModule
);
module.exports = ProgressBarTestModule;

View File

@@ -13,8 +13,9 @@
console.disableYellowBox = true;
// Include modules used by integration tests
require('ScrollViewTestModule');
require('PickerAndroidTestModule');
require('ProgressBarTestModule');
require('ScrollViewTestModule');
require('SwipeRefreshLayoutTestModule');
require('TextInputTestModule');