Test fixtures for travis.

Signed-Off-By: Piyush Vijay <piyushvijay.1997@gmail.com>
This commit is contained in:
Piyush Vijay 2018-08-02 21:06:20 +05:30
parent 61e97801d4
commit 733b0296b3
No known key found for this signature in database
GPG Key ID: FC77A75558658D35
10 changed files with 29 additions and 41 deletions

View File

@ -94,7 +94,6 @@ export let AJAX = {
* @return self For chaining
*/
registerOnload: function (file, func) {
var eventName = 'onload_' + this.hash(file);
$(document).on(eventName, func);
if (this._debug) {

View File

@ -63,4 +63,4 @@ export function PMA_createProfilingChart (target, data) {
]
});
return chart;
}
}

View File

@ -38,4 +38,4 @@ export function matchFile (fname) {
changePluginOpts();
}
}
}
}

View File

@ -497,7 +497,6 @@ export function navFilterStateRestore () {
) {
let $obj = $('#pma_navigation_tree');
if (! $obj.data('fastFilter')) {
$obj.data(
'fastFilter',
new PMA_fastFilter.filter($obj, '')
@ -528,7 +527,6 @@ export function navFilterStateRestore () {
return true;
}
if (! $obj.data('fastFilter')) {
$obj.data(
'fastFilter',
new PMA_fastFilter.filter($obj, '')

View File

@ -365,9 +365,6 @@ class FormDisplay
return $htmlOutput;
}
public function getFormParams () {
return $this->_formParams;
}
/**
* Prepares data for input field display and outputs HTML code

View File

@ -9,22 +9,24 @@ if [ -n "$GATEWAY_INTERFACE" ] ; then
exit 1
fi
# Going back into the direcory
cd ..
if [ -f package.json ] ; then
echo "Running Yarn Install"
yarn install
echo "Creating production build of js files"
yarn prod:build
if [ -d node_modules ] ; then
echo "Creating production build of js files"
yarn prod:build
fi
fi
#Performing cleanup
#Removing yarn files
rm yarn.lock
if [ -f yarn.lock ] ; then
rm -f yarn.lock
fi
if [ -f yarn-error.log ] ; then
rm yarn-error.log
rm -f yarn-error.log
fi
#Removing node_modules from the directory
rm -rf node_modules
@ -33,7 +35,8 @@ rm -rf js/lib
#Removing JavaScript source code
rm -rf js/src
#Removing babel files as they are not required in production
rm .babelrc
rm webpack.config.babel.js
rm -f .babelrc
rm -f webpack.config.babel.js
rm -f .jshintrc
echo "Finished building js files"

View File

@ -216,7 +216,7 @@ rm -rf .github
rm -rf PMAStandard
# Testsuite setup
rm -f .travis.yml .coveralls.yml .scrutinizer.yml .jshintrc .weblate codecov.yml
rm -f .travis.yml .coveralls.yml .scrutinizer.yml .weblate codecov.yml
# Remove readme for github
rm -f README.rst
@ -274,10 +274,7 @@ if [ ! -d libraries/tcpdf ] ; then
fi
fi
if [ -f package.json ] ; then
echo "* Running Yarn"
yarn install --production
fi
./scripts/build-js.sh
# Remove git metadata
rm .git
@ -334,7 +331,6 @@ for kit in $KITS ; do
rm doc/html/.buildinfo doc/html/objects.inv
# Javascript sources
rm -rf js/vendor/openlayers/src/
rm -rf node_modules
fi
# Remove developer scripts

View File

@ -539,10 +539,10 @@ class FormDisplayTemplateTest extends TestCase
$this->assertEquals(
[
'validateField(\'testID\', \'PMA_\\\';\', true, '
'[\'testID\', \'PMA_\\\';\', true, '
. '[\'\\\\r\\\\n\\\\\\\''
. '<scrIpt></\\\' + \\\'script>\'])',
'validateField(\'testID\', \'PMA_\', true)'
. '<scrIpt></\\\' + \\\'script>\']]',
'[\'testID\', \'PMA_\', true]'
],
$js
);
@ -564,16 +564,11 @@ class FormDisplayTemplateTest extends TestCase
$this->assertEquals(
'<script type="text/javascript">' . "\n"
. 'if (typeof configInlineParams === "undefined"'
. ' || !Array.isArray(configInlineParams)) '
. 'configInlineParams = [];' . "\n"
. 'configInlineParams.push(function() {' . "\n"
. 'var i = 1;' . "\n"
. 'i++;' . "\n"
. '});' . "\n"
. 'if (typeof configScriptLoaded !== "undefined"'
. ' && configInlineParams) loadInlineConfig();'
. "\n" . '</script>' . "\n",
. 'getConfigData(' . "\n"
. 'var i = 1,' . "\n"
. 'i++' . "\n"
. ');' . "\n"
. '</script>' . "\n",
$result
);
}

View File

@ -73,9 +73,9 @@ class PageSettingsTest extends PmaTestCase
);
$this->assertContains(
"validateField('MaxRows', 'PMA_validatePositiveNumber', true);\n"
. "validateField('RepeatCells', 'PMA_validateNonNegativeNumber', true);\n"
. "validateField('LimitChars', 'PMA_validatePositiveNumber', true);\n",
"['MaxRows', 'PMA_validatePositiveNumber', true],\n"
. "['RepeatCells', 'PMA_validateNonNegativeNumber', true],\n"
. "['LimitChars', 'PMA_validatePositiveNumber', true],\n",
$html
);
}

View File

@ -3,7 +3,7 @@ import webpack from 'webpack';
import BundleAnalyzerPlugin from 'webpack-bundle-analyzer';
function WebpackConfig (env) {
let BindleAnalyzer = BundleAnalyzerPlugin.BundleAnalyzerPlugin;
let BundleAnalyzer = BundleAnalyzerPlugin.BundleAnalyzerPlugin;
// environment either development or production
var MODE;
@ -49,7 +49,7 @@ function WebpackConfig (env) {
new webpack.NoEmitOnErrorsPlugin()
];
if (MODE === 'development') {
plugins.push(new BindleAnalyzer());
plugins.push(new BundleAnalyzer());
}
return {