betaflight-configurator/test/karma.conf.js

55 lines
1.8 KiB
JavaScript
Raw Normal View History

2020-10-24 06:36:36 +00:00
const commonjs = require("@rollup/plugin-commonjs");
const resolve = require("@rollup/plugin-node-resolve").default;
const rollupReplace = require("@rollup/plugin-replace");
const NODE_ENV = process.env.NODE_ENV || 'test';
2018-05-29 21:53:35 +00:00
module.exports = function(config) {
config.set({
reporters: ['tfs', 'spec'],
2018-06-01 16:46:10 +00:00
basePath: '../',
2018-05-29 21:53:35 +00:00
frameworks: ['mocha', 'chai', 'sinon-chai'],
files: [
'./node_modules/jquery/dist/jquery.min.js',
2019-11-07 18:12:37 +00:00
'./node_modules/jquery-textcomplete/dist/jquery.textcomplete.min.js',
'./node_modules/bluebird/js/browser/bluebird.min.js',
2019-11-07 18:12:37 +00:00
'./node_modules/jbox/dist/jBox.min.js',
2018-05-29 21:53:35 +00:00
'./src/js/serial.js',
'./src/js/data_storage.js',
2020-10-24 06:36:36 +00:00
{ pattern: './src/js/localization.js', type: 'module', watched: false },
2018-05-29 21:53:35 +00:00
'./src/js/gui.js',
'./src/js/CliAutoComplete.js',
2018-05-29 21:53:35 +00:00
'./src/js/tabs/cli.js',
Cordova framework integration, Android support, mobile UI & options tab Cordova integration and android platform : - Added cordova directory with required config - Added cordova applications generation in gulpfile - Added cordova development instructions - Used cordova plugins to simulate missing chrome api plugins (chrome.serial and chrome.fileSystem) - Added cordova clipboard support - Added android operating system and Cordova gui mode - Fixed some css and js files to make them working on Android as well as on computers - Added --skipdep argument to accelerate cordova build (gulp task) - Added a webview helper to help people to update the webview app of their device New options tab : - Added options tab replacing the options dropdown - Added option to switch between phones UI and computers UI Mobile interface and global interface improvements : - Simplified the structure of the header with flex css - Made headerbar and tab container responsive (compact headerbar and side menu) - All tabs are adapted to mobile interface (except firmware flasher) - The servos and adjustments tabs are not fully adapted but are "usable" - Improved header bar animation - Improved log expandation animation - Added swipe gesture to toggle side menu Fixes during the development : - Logo position - Dark mode - Auto connection - Error messages (cordova_chromeapi.js) - Responsive grid - Testing - Disconnection - Width of boxes inside the OSD tab - Fixed cli tab - OSD tab - Motor stop switch - White spaces in boxes - Dialogs size - Connect button state - Prevent tablet with a height larger than 575px to switch to computers ui - Fixed logging tab - Fixed code smell - Fixed yarn cordova plugin install issue - Fixed content_wrapper - Fixed vibrations when scrolling - Fixed scrolling bar alignment - Fixed dialogReportProblem height - Fixed rates logo - Fixed auto connection default value (true) - Fixed D to D max - Fixed dialogs Added required messages in locales/en/messages.json file Requested changes
2020-07-03 14:18:55 +00:00
'./src/js/phones_ui.js',
'./test/**/*.js',
2018-05-29 21:53:35 +00:00
],
2018-06-01 16:46:10 +00:00
browsers: ['ChromeHeadlessNoSandbox'],
customLaunchers: {
ChromeHeadlessNoSandbox: {
base: 'ChromeHeadless',
flags: ['--no-sandbox'],
},
2018-06-01 16:46:10 +00:00
},
2019-11-06 14:58:27 +00:00
tfsReporter: {
outputDir: 'testresults',
outputFile: 'test_results.xml',
2019-11-06 14:58:27 +00:00
},
singleRun: true,
2020-10-24 06:36:36 +00:00
preprocessors: {
'./src/js/localization.js': ['rollup'],
},
rollupPreprocessor: {
plugins: [
rollupReplace({
'process.env.NODE_ENV': JSON.stringify(NODE_ENV),
}),
resolve(),
commonjs(),
],
output: {
format: 'esm',
},
},
2018-05-29 21:53:35 +00:00
});
};