Completely separate UI func and unit tests
We're no longer using Intern for unit-testing, so we need to move all intern-related files to a separate directory (tests/functional). It's needed to setup eslint properly - unit and functional tests are run in a different environments (node and browsers) and require different configuration. Change-Id: I9b938faed5a2b280645a022e47cc12958fd1ddfd
This commit is contained in:
parent
cd52d7c318
commit
7419625bbe
|
@ -100,7 +100,7 @@ function runIntern(params) {
|
|||
var baseDir = 'static';
|
||||
var runner = './node_modules/.bin/intern-runner';
|
||||
var browser = argv.browser || process.env.BROWSER || 'firefox';
|
||||
var options = [['config', 'tests/intern-' + browser + '.js']];
|
||||
var options = [['config', 'tests/functional/config/intern-' + browser + '.js']];
|
||||
var suiteOptions = [];
|
||||
['suites', 'functionalSuites'].forEach(function(suiteType) {
|
||||
if (params[suiteType]) {
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
---
|
||||
rules:
|
||||
prefer-arrow-callback: 0
|
||||
object-shorthand: 0
|
||||
env:
|
||||
node: true
|
||||
globals:
|
||||
sinon: false
|
|
@ -17,8 +17,5 @@
|
|||
define(['./intern'], function(config) {
|
||||
'use strict';
|
||||
config.environments = [{browserName: 'phantomjs'}];
|
||||
config.loader.shim.react = {
|
||||
deps: ['vendor/npm/es5-shim/es5-shim']
|
||||
};
|
||||
return config;
|
||||
});
|
|
@ -20,16 +20,9 @@ define(function() {
|
|||
return {
|
||||
proxyPort: 9057,
|
||||
proxyUrl: 'http://localhost:9057/',
|
||||
capabilities: {
|
||||
'selenium-version': '2.45.0'
|
||||
},
|
||||
maxConcurrency: 1,
|
||||
useLoader: {
|
||||
'host-node': 'requirejs',
|
||||
'host-browser': '/vendor/npm/requirejs/require.js'
|
||||
},
|
||||
grep: /^/,
|
||||
excludeInstrumentation: /^/,
|
||||
reporters: ['console', 'tests/screenshot_on_fail']
|
||||
reporters: ['console', 'tests/functional/screenshot_on_fail']
|
||||
};
|
||||
});
|
|
@ -18,7 +18,7 @@ define([
|
|||
'intern/dojo/node!lodash',
|
||||
'tests/functional/pages/modal',
|
||||
'intern/dojo/node!leadfoot/helpers/pollUntil',
|
||||
'../../helpers'
|
||||
'tests/functional/helpers'
|
||||
], function(_, ModalWindow, pollUntil) {
|
||||
'use strict';
|
||||
function ClusterPage(remote) {
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
define([
|
||||
'intern/dojo/node!lodash',
|
||||
'tests/functional/pages/modal',
|
||||
'../../helpers'
|
||||
'tests/functional/helpers'
|
||||
], function(_, ModalWindow) {
|
||||
'use strict';
|
||||
function ClustersPage(remote) {
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
define([
|
||||
'intern/dojo/node!lodash',
|
||||
'intern/chai!assert',
|
||||
'../../helpers',
|
||||
'tests/functional/helpers',
|
||||
'tests/functional/pages/login',
|
||||
'tests/functional/pages/welcome',
|
||||
'tests/functional/pages/cluster',
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
define([
|
||||
'tests/functional/pages/modal',
|
||||
'../../helpers'
|
||||
'tests/functional/helpers'
|
||||
], function(ModalWindow) {
|
||||
'use strict';
|
||||
function DashboardPage(remote) {
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
**/
|
||||
|
||||
define([
|
||||
'../../helpers'
|
||||
'tests/functional/helpers'
|
||||
], function(Helpers) {
|
||||
'use strict';
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
define([
|
||||
'intern/dojo/node!leadfoot/helpers/pollUntil',
|
||||
'../../helpers'
|
||||
'tests/functional/helpers'
|
||||
], function(pollUntil) {
|
||||
'use strict';
|
||||
function ModalWindow(remote) {
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
**/
|
||||
|
||||
define([
|
||||
'../../helpers'
|
||||
'tests/functional/helpers'
|
||||
], function() {
|
||||
'use strict';
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
define([
|
||||
'tests/functional/pages/modal',
|
||||
'../../helpers'
|
||||
'tests/functional/helpers'
|
||||
], function(ModalWindow) {
|
||||
'use strict';
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
**/
|
||||
|
||||
define([
|
||||
'../../helpers'
|
||||
'tests/functional/helpers'
|
||||
], function() {
|
||||
'use strict';
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
* under the License.
|
||||
**/
|
||||
|
||||
define(['../../helpers'], function() {
|
||||
define(['tests/functional/helpers'], function() {
|
||||
'use strict';
|
||||
function WelcomePage(remote) {
|
||||
this.remote = remote;
|
||||
|
|
|
@ -18,7 +18,7 @@ define([
|
|||
'intern/dojo/node!lodash',
|
||||
'intern!object',
|
||||
'intern/chai!assert',
|
||||
'tests/helpers',
|
||||
'tests/functional/helpers',
|
||||
'tests/functional/pages/common',
|
||||
'tests/functional/pages/cluster',
|
||||
'tests/functional/pages/dashboard',
|
||||
|
|
|
@ -18,7 +18,7 @@ define([
|
|||
'intern/dojo/node!lodash',
|
||||
'intern!object',
|
||||
'intern/chai!assert',
|
||||
'tests/helpers',
|
||||
'tests/functional/helpers',
|
||||
'tests/functional/pages/common',
|
||||
'tests/functional/pages/cluster'
|
||||
], function(_, registerSuite, assert, helpers, Common, ClusterPage) {
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
define([
|
||||
'intern!object',
|
||||
'intern/chai!assert',
|
||||
'tests/helpers',
|
||||
'tests/functional/helpers',
|
||||
'tests/functional/pages/common',
|
||||
'tests/functional/pages/cluster',
|
||||
'tests/functional/pages/settings',
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
define([
|
||||
'intern!object',
|
||||
'intern/chai!assert',
|
||||
'tests/helpers',
|
||||
'tests/functional/helpers',
|
||||
'tests/functional/pages/common'
|
||||
], function(registerSuite, assert, helpers, Common) {
|
||||
'use strict';
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
define([
|
||||
'intern!object',
|
||||
'intern/chai!assert',
|
||||
'tests/helpers',
|
||||
'tests/functional/helpers',
|
||||
'tests/functional/pages/login',
|
||||
'tests/functional/pages/common'
|
||||
], function(registerSuite, assert, helpers, LoginPage, Common) {
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
define([
|
||||
'intern!object',
|
||||
'tests/helpers',
|
||||
'tests/functional/helpers',
|
||||
'tests/functional/pages/interfaces',
|
||||
'tests/functional/pages/common'
|
||||
], function(registerSuite, helpers, InterfacesPage, Common) {
|
||||
|
|
|
@ -20,7 +20,7 @@ define([
|
|||
'tests/functional/pages/common',
|
||||
'tests/functional/pages/cluster',
|
||||
'tests/functional/pages/dashboard',
|
||||
'tests/helpers'
|
||||
'tests/functional/helpers'
|
||||
], function(registerSuite, assert, Common, ClusterPage, DashboardPage) {
|
||||
'use strict';
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ define([
|
|||
'tests/functional/pages/modal',
|
||||
'tests/functional/pages/common',
|
||||
'tests/functional/pages/cluster',
|
||||
'tests/helpers'
|
||||
'tests/functional/helpers'
|
||||
], function(registerSuite, assert, NodeComponent, ModalWindow, Common, ClusterPage) {
|
||||
'use strict';
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
define([
|
||||
'intern!object',
|
||||
'intern/chai!assert',
|
||||
'tests/helpers',
|
||||
'tests/functional/helpers',
|
||||
'tests/functional/pages/login',
|
||||
'tests/functional/pages/welcome'
|
||||
], function(registerSuite, assert, helpers, LoginPage, WelcomePage) {
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
define([
|
||||
'intern!object',
|
||||
'intern/chai!assert',
|
||||
'tests/helpers',
|
||||
'tests/functional/helpers',
|
||||
'tests/functional/pages/common',
|
||||
'tests/functional/pages/modal'
|
||||
], function(registerSuite, assert, helpers, Common, Modal) {
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
prefer-arrow-callback: 0
|
||||
object-shorthand: 0
|
||||
env:
|
||||
node: true
|
||||
mocha: true
|
||||
globals:
|
||||
assert: false
|
Loading…
Reference in New Issue