Commit b522cc29 authored by Pedro Eduardo Trujillo's avatar Pedro Eduardo Trujillo
Browse files

Revisa detalles de rutas de tests

parent 26dfed45
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -5,20 +5,20 @@ module.exports = function(args) {
		_intern = require('./_intern')(args),
		_functions = require('./_functions'),

		testsPath = args.testsPath,
		testPath = args.testPath,
		role = args.role,
		user = args.user,
		pass = args.pass,
		suitesGroups = args.suitesGroups,
		functionalSuites = args.functionalSuites,

		pathPrefix = path.join(testsPath, 'functional'),
		suitesPrefix = path.join(testPath, 'functional'),
		config = {};

	if (functionalSuites) {
		config.functionalSuites = _functions.getParameterValueAsArray(functionalSuites);
	} else if (suitesGroups) {
		config.functionalSuites = _functions.getSuites(pathPrefix, suitesGroups);
		config.functionalSuites = _functions.getSuites(suitesPrefix, suitesGroups);
	} else {
		var suitesLimitedByRole;

@@ -26,8 +26,8 @@ module.exports = function(args) {
			suitesLimitedByRole = ['common', 'catalog', 'catalogDetails', 'viewers', 'products'];
		}

		var defaultFunctionalSuites = _functions.getSuites(pathPrefix, suitesLimitedByRole),
			excludePattern = '!' + path.join(pathPrefix, 'component', '**');
		var defaultFunctionalSuites = _functions.getSuites(suitesPrefix, suitesLimitedByRole),
			excludePattern = '!' + path.join(suitesPrefix, 'component', '**');

		defaultFunctionalSuites.push(excludePattern);
		config.functionalSuites = defaultFunctionalSuites;
+64 −66
Original line number Diff line number Diff line
@@ -2,19 +2,17 @@ module.exports = function(args) {

	var path = require('path'),
		deepmerge = require('deepmerge'),

		_intern = require('./_intern')(args),
		_functions = require('./_functions'),

		testsPath = 'test',
		suitesGroups = args.suitesGroups,	// TODO por ahora no funciona, porque se recorre desde directorio no controlable
		// TODO por ahora no funciona, porque se busca desde '/__intern/browser/'
		suitesGroups = args.suitesGroups,
		suites = args.suites,

		pathPrefix = path.join(testsPath, 'unit'),
		suitesPrefix = pathPrefix + '/',
		testPath = args.testPath,
		suitesPrefix = path.join(testPath, 'unit/');

	// TODO cuando se arreglen todos, importar con un glob pattern todos y eliminar la variable, como en functional
		config = {
	var config = {
		suites: [
			// Funcionalidades básicas
			suitesPrefix + 'util/testRedmicLocalStorage'
@@ -80,7 +78,7 @@ module.exports = function(args) {
	if (suites) {
		config.suites = _functions.getParameterValueAsArray(suites);
	} else if (suitesGroups) {
		config.suites = _functions.getSuites(pathPrefix, suitesGroups);
		config.suites = _functions.getSuites(suitesPrefix, suitesGroups);
	}

	return deepmerge.all([_intern, config], {
+2 −2
Original line number Diff line number Diff line
@@ -5,7 +5,7 @@ module.exports = function(args) {
		browserDojoConfig = JSON.parse(JSON.stringify(dojoConfig)),
		environments = require('./_environments')(args),

		testsPath = args.testsPath,
		testPath = args.testPath,
		coverage = args.coverage,
		reporters = args.reporters,
		grep = args.grep,
@@ -89,7 +89,7 @@ module.exports = function(args) {
		reporters: ['pretty'],

		plugins: [{
			script: path.join(testsPath, 'support', 'CustomReporter.js')
			script: path.join(testPath, 'support', 'CustomReporter.js')
		}]
	};

+7 −7
Original line number Diff line number Diff line
@@ -40,7 +40,7 @@ module.exports = function(grunt) {

			configPath = path.join(rootPath, outputPath, configDirName),
			reportersOutputPath = path.join(rootPath, outputPath, currOutputDirName),
			absoluteTestsPath = path.join(rootPath, testPath),
			absoluteTestPath = path.join(rootPath, testPath),
			userDataDir = outputPath + '/' + configDirName;

		grunt.file['delete'](configPath);
@@ -82,18 +82,18 @@ module.exports = function(grunt) {

			functionalReporters = [].concat(commonReporters),

			testUnitLocalPath = path.join(absoluteTestsPath, 'intern-unit-local'),
			testUnitRemotePath = path.join(absoluteTestsPath, 'intern-unit-remote'),
			testFunctionalLocalPath = path.join(absoluteTestsPath, 'intern-functional-local'),
			testFunctionalRemotePath = path.join(absoluteTestsPath, 'intern-functional-remote'),
			testUnitLocalPath = path.join(absoluteTestPath, 'intern-unit-local'),
			testUnitRemotePath = path.join(absoluteTestPath, 'intern-unit-remote'),
			testFunctionalLocalPath = path.join(absoluteTestPath, 'intern-functional-local'),
			testFunctionalRemotePath = path.join(absoluteTestPath, 'intern-functional-remote'),

			ipGetterPath = path.join(absoluteTestsPath, 'IpGetter'),
			ipGetterPath = path.join(absoluteTestPath, 'IpGetter'),
			IpGetter = require(ipGetterPath)(),
			localIp = IpGetter.getIp(),

			testParams = {
				srcPath: srcPath,
				testsPath: testPath,
				testPath: testPath,
				ownServerPort: ownServerPort,
				ownSocketPort: ownSocketPort,
				ownTunnelPort: ownTunnelPort,